- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2023 07:52 AM
I've created both Staging and Target tables with fields such as u_short_description and u_urgency. Staging table extends sys_import_set_row (adding the u_* fields like u_short_description). I'm able to POST the following JSON using insertMultiple without errors, but the u_* fields like u_short_description and u_urgency end up blank (empty) in both Staging and Target tables. The POST is being done with headers "application/json" for both content-type and accept. The posted JSON:
{"records":[{"parent":"","made_sla":"true","watch_list":"","u_upon_reject":"cancel","sys_updated_on":"2016-08-10 16:10:41","u_task_effective_number":"CHG0040003","approval_history":"","u_number":"CHG0040003","sys_updated_by":"admin","opened_by":{"link":"https://devxxxxxx.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441","value":"6816f79cc0a8016401c5a33be04be441"},"user_input":"","sys_created_on":"2016-08-10 16:10:41","sys_domain":{"link":"https://dev120673.service-now.com/api/now/table/sys_user_group/global","value":"global"},"state":"-5","route_reason":"","sys_created_by":"admin","knowledge":"false","order":"","closed_at":"","cmdb_ci":{"link":"https://devxxxxxx.service-now.com/api/now/table/cmdb_ci/b0ccabf1c0a80009001f14fd151d8df0","value":"b0ccabf1c0a80009001f14fd151d8df0"},"delivery_plan":"","contract":"","u_impact":"3","active":"true","work_notes_list":"","business_service":"","priority":"4","sys_domain_path":"/","time_worked":"","expected_start":"","opened_at":"2016-08-10 16:10:41","business_duration":"","group_list":"","work_end":"","approval_set":"","work_notes":"","universal_request":"","u_short_description":"Please reboot ApplicationServerHelpdesk","correlation_display":"","delivery_task":"","work_start":"","assignment_group":{"link":"https://devxxxxxx.service-now.com/api/now/table/sys_user_group/5f721d93c0a8010e015533746de18bf9","value":"5f721d93c0a8010e015533746de18bf9"},"additional_assignee_list":"","description":"","calendar_duration":"","close_notes":"","service_offering":"","sys_class_name":"change_request","closed_by":"","follow_up":"","sys_id":"0126961347c12200e0ef563dbb9a717e","contact_type":"","u_urgency":"3","company":"","reassignment_count":"0","activity_due":"","assigned_to":"","comments":"","approval":"approved","sla_due":"","comments_and_work_notes":"","due_date":"","sys_mod_count":"0","sys_tags":"","escalation":"0","u_upon_approval":"proceed","correlation_id":"","location":""}]}
I've tried this with a number of variations for the Transform Map, with and without a source script. It always imports empty fields for u_*. It's clear that the input JSON is being parsed by the import engine, because trying with 2 or 3 objects in the array imports 2 or 3 rows into Staging and Target tables, but always with blank u_* values.
What am I doing wrong?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2023 02:50 AM
Hello @Dave Oshinsky
Couple of things to check:
1. Is REST insert multiple configured? example below:
2. Check KB https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1210160
Thanks,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2023 02:50 AM
Hello @Dave Oshinsky
Couple of things to check:
1. Is REST insert multiple configured? example below:
2. Check KB https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1210160
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2023 05:02 AM
Hello @Ahmmed Ali You hit the nail on the head! I saw the KB article, and application/json was being properly set in HTTP POST headers. However, I missed something in step 1 in this article:
insertMultiple Import set API - ServiceNow Community
"Also create within the Rest Insert Multiples record a related Column mappings where the Column mapping is Column name (the default is Label)."
Yet another undocumented system table (besides sys_rest_insert_multiple) must be populated to get the desired behavior: sys_rest_insert_multiple_column_mapping (refers to sys_rest_insert_multiple)
Running all of this via REST API's is very tricky, and undocumented. Even all steps to run it manually via the web UI is not documented in the API documentation for insertMultiple!
Thank you very much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 07:22 PM
I know this is a late reply on this one but ensure that you have only one active record in sys_rest_insert_multiple table otherwise your entries will still be inserted blank.