Import Step
This section describes how to add and set up the connection for the Import step applicable to the tasks in the interface. For more information about steps, see Defining Steps
Import step is intended for data transfer from an endpoint to Schema. To create the Import step, navigate to Interfaces> {Specific Interface}> Tasks> {Specific Task} > Steps >New >New Import Step.
To import your data, follow the steps below:
- Select your ServiceNowREST connection from the Connection drop-down list. Click Open for your reference, or if modifications or any changes are required in the pre-defined connection.
Warning: If you can't find the necessary Connection in the list, go to the connection page and make sure the Is Active and Is Source checkboxes are enabled.
- Select the required action from the Action drop-down list:
- Insert: Import data into the schema.
- Update: Add the latest data to the existing schema fields.
- Delete: Delete data from the schema.
- Upsert: Depending on the key- either update or insert data to the schema.
Note: On selecting Update, Delete, Upsert from Action drop-down list, the Schema Column and Source Column appear. These fields associate a specific field in the source system to a specific field in the Schema. The rows from the source system will Update/Delete or Upsert rows in the Schema based on this association. Select required columns to enable automatic updates. Click Refresh to update the list of source columns.
- Fill in the Query box following the pattern:
1st row – entity;
2nd row (optional) – parameters.
Warning: The parameter query should start with sysparm_query=.
Warning: Each new parameter should be written in a new row.
For more information about the available parameters, please, refer to ServiceNow Documentation.
Note: To work with attachments, define the query following this pattern: attachment/{sys_id}/file, where sys_id is a unique record ID. The ID can be taken from the relative ServiceNow object (e.g., Case> Copy sys_id) or uploaded to IConduct schema in a pre-defined import step.
Query Examples:
1) Get all data for the alm_asset entity:
2) Get data on alm_asset entity with a serial number PF0XLWDH:
3) Get data for the sn_customerservice_case entity, updated on January 30, 2019. The u_customer_visible should be marked as ‘true’ in this query result:
4) Get data on the sys_id, u_customer_visible fields of the sn_customerservice_case entity:
5) Get 10 records from the sn_customerservice_case entity:
6) Get attachment for file 2345:
Note: Click Show Entities to get the list of all supported entities.
Note: Click Test Query to test the query and check if it returns required data (optional).
- Click Save from the toolbar to keep the new Import Step. Proceed with Schema mappings.
Note: The “Entity.Value" and "Entity.Link" fields appear in Source Columns list for the ServiceNow linked objects. To preserve the linking, map the respective Entity.Value field.