Wanting to Import data using external REST service on a schedule using Import Set / Transform Map

james_whitt
Kilo Contributor

We're running into an issue where right now we are using Scheduled Jobs to kick off a script include that uses a MID Server to connect to a 3rd party system for importing data into a ServiceNow table directly. What we want to do is use Import Sets and Transform maps also, so that we aren't pulling for 3rd part software using REST and entering data directly into the tables using the script.

With that said, we are stuck on figuring out how exactly how to "Load Data" into the import set and then kicking off then "Run Transform". We know the transform map needs to be asynchronous and that if we were using odbc, file, xml, we would go the Import Sources route, but we can't. Have to be ServiceNow scheduled import using MID server to consume the REST services.

Any help would be appreciated.

48 REPLIES 48

Here are a couple of articles that may be helpful to you...

This references a handle ImportSetUtils library available in the instance:
http://www.john-james-andersen.com/blog/service-now/converting-xml-to-a-record-in-servicenow.html

The following link is an article that talks about SOAP responses, but an XML REST response would be handled in the same way as far as getting it into an import set:
http://www.john-james-andersen.com/blog/service-now/tutorial-handling-a-soap-response-in-servicenow.html


Jacob - were you ever able to figure this out? I'm in the same situation where I have a JSON formatted REST response that I'm looking to write to an import table.



I looked at both of John Andersen's links and tried going down the path of converting the response into XML and then using the various XML tools to write to a table, but I either don't know the proper XPATH or the JSON response isn't converting correctly into XML.


Hi John,


Can you please suggest a way for loading data (obtained from REST call) in an asynchronous mode. Actually I want to hold the data in import set table until it's fully loaded and once that's done then I want to transform it to regular table.



Thanks


Bhupinder


Hey Bhupinder,



I been awhile since this post, wondering if you every found a good way of loading all together when using a script to insert into import set table.



Tony


THANK YOU! I was having an issue trying to figure out how I would get my data into an import table and then transform it. I didn't realize the transform would happen automatically. I really appreciate this.