Import Set and Transform map :
Import Set :
Import set is poweful tool to import data from external application and then map into service-now table.
Tranform Map :
Transform map is responsible for determining relationship between fields of import set table and service-now table.
Load Data : It loads the record (file-xml,excel etc)
Import Set :
Load data :
- Create table
- Add label – Incident data
- Choose a file to upload
- Sheet number : sheet number of a excel file
- Header row : row number on which table fields are present
Creating Transform map:
- Name :Map-incident
- Select source table
- Select Destination table
- save
- Transform map
- List –open
- Automap mapping fields
- Set coalesce value (The field that is used as a unique key. If match is found with the help of this field then the record is updated . If no match found then new record is inserted into database table. If match found and the same record is loaded as data then it is ignored)
- click Transform
- Run Transform – for existing table
- Go to transform history to check number of records inserted /updated/rejected
Choice Action :
- The field is available if the target field is reference field or choice list
- The field specifies what to do if the import set contains value other than those available in reference or choice field.
Create : Create new choice or record in a reference table
Ignore : Ignore new value from the source table
reject : Skip the entire row containing new value and consider next row.
Transform Script :
A transform script allows you to apply extra business logic a specified stage of the transformation.
Transfrom map allow a script to run as a event occur while import set being tranformed into service-now table.
There are two types of transform map script :
- Explicit Transform Map scripts, which explicitly define mapping relationships
- Transformation Event scripts, which modify the processing of events at different stages of a transformation
onStart : The onStart event script is processed at the start of an import run, before any data rows are read.
onComplete : The onComplete event script is processed at the end of an import run, after all data rows are read and transformed.
onBefore : The onBefore event script is processed at the start of a row transformation, before the source row is transformed into the target row.
onAfter : The onAfter event script is processed at the end of a row transformation, after the source row has been transformed into the target row and saved.
onChoiceCreate : The onChoiceCreate event script is processed at the start of a choice value creation, before the new choice value is created.
onForeignInsert : The onForeignInsert event script is processed at the start of the creation of a related, referenced record, before the record is created
onReject : The onReject event script is processed during the occurrence of a foreign record or choice creation, and the foreign record or choice is rejected, the entire transformation row is not saved