- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 07:10 AM
Hi,
Am trying to explore Import set API, have created Import set table and Transform map. Through postman am able to create/update single record using below API. u_email field is set as Coalesce.
Source : u_import_user
Target : sys_user
POST https://dev322281.service-now.com/api/now/import/{stagingTableName}
Request : {
"u_first_name": "Load",
"u_last_name": "Test",
"u_department": "Finance",
"u_email": "load.test@example.com"
}
But am not able to process multiple record in single request ,
POST https://dev322281.service-now.com/api/now/import/{stagingTableName}/insertMultiple
Multiple Request :
{
"records": [
{
"u_first_name": "Load",
"u_last_name": "Test",
"u_department": "Finance",
"u_email": "load.test@example.com"
},
{
"u_first_name": "Demo",
"u_last_name": "Test",
"u_department": "Finance",
"u_email": "demo.test@example.com"
}
]
}
Error Message : Unable to resolve target record, coalesce values not present: u_email
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 08:43 AM
Hi @ChaithraSandeep
1. Did you create an entry in the table "sys_rest_insert_multiple", like below?
Source would be your source table "u_import_user"
2. Did you create entry in the table "sys_rest_insert_multiple_column_mapping"?
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 07:55 AM
@ChaithraSandeep , Please share the script.
You need to loop over JSON and insert each record into a table. Please find the example script.
var data = JSON.parse(body);
for(var i =0; i<data.length; i++){
var record = data[i];
var gr = new GlideRecord("TABLE");
gr.intialize();
gr.u_name = record.name;
gr.insert();
}
If my response solves your query, please marked helpful by selecting Accept as Solution and Helpful.
Thanks,
Mohammad Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 08:43 AM
Hi @ChaithraSandeep
1. Did you create an entry in the table "sys_rest_insert_multiple", like below?
Source would be your source table "u_import_user"
2. Did you create entry in the table "sys_rest_insert_multiple_column_mapping"?
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 09:25 AM
Hi @Saurabh Gupta ,
Thank you, after creating an entry in both the tables, multiple insert is working.
Regards,
Chaithra