Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Scripted Rest API - Bulk Operation

Khanna Ji
Tera Guru

Hi Friends,

 

I am working on an interface where third party will be pushing the data into ServiceNow in one by one through Scripted Rest API. Entries created will be like 100K per hour. To improve the performance, I want to use import sets and transform map to that I can manage the data load as well as transform in bulk way rather than keeping the system busy for such transaction. Interface will be real time but I would like to run the transform map only once in an hour so that performance is improved. Also I do not want to keep the logic or lot of script in the scripted rest API. Maybe a fields on the import set table can be used in the scripted rest API to map/accept data from third party through scripted Rest API.

 

Please help me how can I proceed with this approach and things I need to be aware of it.

 

Appreciate your help and guidance on this.

11 REPLIES 11

But if you look at my screenshot and your comment which I quotes below. Its synchronous but I do not see separate Import set for each record. Do you know why its happening and when new import set will be created?

 


@Ankur Bawiskar wrote:

yes that's correct, it will be separate import set for each record.


 

royashok
Tera Contributor

One Tips:
1. Make sure you create an entry in sys_rest_insert_multiple table mentioning the required source table and transformation type as "Asynchronous". In this case the multiple record insertion will happen in source table and each record import would not wait for one-by-one record transformation.
2. Also please do proper column mappings. As an example: Type is "JSON" and Column Mapping is "Column Name".