REST APIs : import set tables

lucaburgazzoli
Mega Contributor

Hello,

I'm developing an integration application that uses REST APIs and as per policy one should rely on import set and

transform maps to import data in ServiceNow so as example if one need to create an incident it is needed to:

  1. create an import set table that mirrors or at least contain all the fields one would like to fill
  2. create a transform map to copy data from the staging table to the incident table

So my question is: is there an easy way to create a mirror of the target table to be used as staging area with fields named the same way ?

I mean, I can easily create a new table and I can add fields able but:

  1. it is quite tedious as I may want to be able to use any of the fields the target table provides
  2. if I add a field named short_description I need to refer to it as u_short_description in REST APIs so it does not have the same id as the short_description field I would get from the incident table which makes the model different between write and read operation
1 ACCEPTED SOLUTION

josh_nerius
ServiceNow Employee
ServiceNow Employee

Hi Luca,



You're in luck! When creating the Web Service Import Set, there's a checkbox titled "Copy fields from target table". This will auto-create fields that match the target table.



Create_Web_Service___ServiceNow.png



It's worth noting that while this is an easy way to get started, you may not want web service clients having access to certain fields or even knowing some fields exist. Keep this in mind, and remove fields that you don't want to make available.


View solution in original post

5 REPLIES 5

josh.nerius



I found out that I did a mistake so I confirm your solution works as expected.


Thank you very much.