The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to run a Transform Map from a script

mattmurdock
Tera Contributor

I have an initiative that I am working on which requires data from an external system to be imported into ServiceNow into a custom table. My current approach so far has been to create an outbound REST message which retrieves data from the external system. I then call this message from a script include which uses  the GlideRecord to insert each object in the response payload into an Import Set Table.  I have also created a TransformMap which will transform and load the data into the desired custom target table.

 

My question is, how do I run/execute the TransformMap from a script?

1 ACCEPTED SOLUTION

Aniket1498
Giga Guru

Hi @mattmurdock ,

Use the Import set API  to load the data into the import set table. Once the records are inserted into the import set table, the transform map will automatically run and transform the values to the target table and you need not to right any scripts.

 

Please mark this as helpful and accept the solution if this works for you.

 

Best Regards,

Aniket Dey

View solution in original post

1 REPLY 1

Aniket1498
Giga Guru

Hi @mattmurdock ,

Use the Import set API  to load the data into the import set table. Once the records are inserted into the import set table, the transform map will automatically run and transform the values to the target table and you need not to right any scripts.

 

Please mark this as helpful and accept the solution if this works for you.

 

Best Regards,

Aniket Dey