In ServiceNow, import sets act as an intermediate table between an external data source and a ServiceNow table. You can map fields between an import set and the main table with a transform map. Then you can sync the data from Exalate to an import set. This is useful if you don't want to immediately sync or import your data into a table.
This article shows how to sync data from Exalate to an import set.
In this article
- How to create a ServiceNow import set
- Script example
How to create a ServiceNow import set?
Exalate can sync data only to import sets that meet these requirements:
- Coalesce on Empty Fields is checked.
- There is a field in the import set that is mapped to the
sys_idfield in the ServiceNow table. It has the Coalesce option enabled.
2. Fill in the fields for the import set.
To sync data successfully, you need to check Create transform map and fill in these fields: Label, Name, Target table.
|Label||The name of the import set. Required field|
|Name||The internal name of the import set in ServiceNow. It is used by Exalate to sync data into the import set. Required field|
|Copy fields from target table||With this option, you can automatically create matching fields with the target table on the import set table|
|Create transform map||With this option, the import set will be created with fields that match the target table|
|Target table||The ServiceNow table you want to map to the import set. The field appears only if Create transform map is checked|
3. Fill in the Web Service Fields.
There are two ways to fill in the fields:
- Copy the identical fields from the target table by checking the Copy fields from target table.
- Fill in each field manually in the Web Service Fields table.
4. Click Create.
If Create transform map is checked, you will be redirected to the Table Transform Map screen to configure the transform map.
5. Fill in the fields for the transform map.
Make sure to check the Create new record on empty coalesce fields checkbox, so Exalate could sync entities to the import set. If the box is checked, a new record will be created when all coalesce fields are empty. Otherwise, ServiceNow updates the existing record.
6. Save the transform map.
You can save the transform map with either of these methods:
- Configure mapping automatically by clicking Auto Map Matching Fields.
- Click Submit and add the fields later in the Field Maps or Transform Scripts tab.
7. Create a field that will be mapped to the sys_id of the ServiceNow table.
Enter the field name in the Insert a new row field and click . This field will be used by Exalate to sync the
8. Map the created field to the sys_id field.
To map a field to the
- Select the transform map in the Web Service Transform Maps table.
- Select New in the Field Maps tab.
- Select the created field in the Source field dropdown.
- Select Sys ID in the Target Field dropdown.
- Check Coalesce. If this box is checked, this field will be updated if there are fields with the same target field and source field mapping.
- click Submit.
The data is synced to import sets by adding the script to the incoming sync.
The example below shows how to sync data to the import set mapped to the Incident table.
In order to sync data to an import set, you need to enter the name of the import set field. For example, to sync the short description, enter
u_short_description is the name of the import set field mapped to the
short_description field in the Incident table.
|Internal name of the import set|
|Internal name of the field that is used for public comments|
|Internal name of the field that is used for private comments|
|Internal name of the field you created to map to the production table's|
You can check the internal names of the fields in the Name column of the Web Service Fields table.