Bi-Directional Integration Using Import Set API
Bi-Directional Integration Using Import Set API
Step 1.
Create import set (staging table) at Destination end.
Step 2: Create Transform Maps and Mapped fields accordingly.
Configure Sys_Id
Step 3: Generate Endpoint through REST API Explorer.
Click on send.
After clicking on the send button on link is generated.
Create two different HTTP methods for Incident create and update.
Incident Create
Incident Update
Now create a business rule to trigger the REST Message
script Include:
Now Test integration through creating incidents from source to destination End also update the
same always remember that the Import set API first update is reflected in the staging table and
then reflected at the Incident Table.
Before creating an Incident open two Table on for the Incident table and one for our staging
Table, then create the Incident.
While creating an Incident select the Assignment that we mentioned in the Business rule.
Staging Table
Incident Table
1. Use the Import Set API instead of the Table API. The Import Set API is designed
specifically for importing data into ServiceNow. It provides a number of features
that are not available with the Table API, such as data validation, transformation,
and error handling.
2. Use the insertMultiple method to import multiple records. The insertMultiple
method is more efficient than using the insert method to import multiple records.
3. Use the transformMap parameter to specify how data should be transformed
during the import process. The transformMap parameter allows you to map fields
from the source data to fields in the target table.
4. Use the errorHandling parameter to specify how errors should be handled during
the import process. The errorHandling parameter allows you to specify whether
errors should be ignored, logged, or rejected.
5. Use the sys_import_set_row table to track the status of imported records. The
sys_import_set_row table contains information about each record that is
imported into an import set. This information can be used to track the status of
imported records and to identify any errors that occurred during the import
process.
6. Use the Import Set Transformer Scripting API to extend the functionality of the
Import Set API. The Import Set Transformer Scripting API allows you to write
scripts that can be used to transform data during the import process.
7. Use the Import Set Web Services to import data from external sources. The
Import Set Web Services provide a REST API that can be used to import data
from external sources.
8. Use the Import Set History table to track changes to import sets. The Import Set
History table contains a record of all changes that are made to import sets. This
information can be used to track changes to import sets and to identify any
problems that may have occurred during the import process.
9. Use the Import Set Preview feature to preview the results of an import. The
Import Set Preview feature allows you to preview the results of an import before
the import is performed. This can be used to identify any potential problems with
the import data.