Creating Import set and transform map for adding/updating records to CIs in Servicenow (Automated on daily basis)

Rajanmehta
Mega Guru

Hello 

We are on Newyork version.

I have Data brought in via REST API from another tool and want to create import set and Transform map, so that data can be added/updated with existing records in Servicenow regularly (On Daily basis).

Please see snap below for type of data.( Mainly they are Servers and NW devices) 

Please guide me what steps I should follow ( step by step).

Thanks,

Rajan 

find_real_file.png

 

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, I'd suggest you start by reviewing Toney Vecchio's scripted API presentation
I think he covers all the basics, except for the need to loop through the records in your payload (assuming that there can\will be more than 1 record per payload).

https://community.servicenow.com/community?id=community_article&sys_id=d5c94462dbf557002328f3231f96197a

https://www.youtube.com/watch?v=DyIuma1cZrg

and some detail on payload loop here

https://community.servicenow.com/community?id=community_question&sys_id=853ace90dbe6445013b5fb24399619d9

Once you have the data into a temp import table, you can use OOB import set\transform map functionlity to validate\coalesce and update your records.

 

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, I'd suggest you start by reviewing Toney Vecchio's scripted API presentation
I think he covers all the basics, except for the need to loop through the records in your payload (assuming that there can\will be more than 1 record per payload).

https://community.servicenow.com/community?id=community_article&sys_id=d5c94462dbf557002328f3231f96197a

https://www.youtube.com/watch?v=DyIuma1cZrg

and some detail on payload loop here

https://community.servicenow.com/community?id=community_question&sys_id=853ace90dbe6445013b5fb24399619d9

Once you have the data into a temp import table, you can use OOB import set\transform map functionlity to validate\coalesce and update your records.

 

Vikas-Malhotra
Mega Guru

Hi Rajan,

 

If you say you have already brought in data, have you brought in data in an import set?

If so, then just create transform map for the staging table and run the transform from that import set and put the data into your target table.

 

If you have already put the data in your target table then, no point having an import set now.

 

When you import data from REST API. Kindly follow these steps:

1. Create a Staging table.

2. Use Import set API to import the data

3. Create a transform map with relevant mappings and transform scripts if needed.

 

Thanks!

Vikas

Hello Vikas,

I am able to  bring  the data using REST API. (In snap shot I am showing execution of script in Background). 

Can you please guide me, how do I go further from there?

Thanks,

Rajan