- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2015 09:06 AM
Hello,
I understand that it is possible to use the Service Now Rest API to post data to the import set table:Import Set API - ServiceNow Wiki
I can see that there are two supported methods:
1) POST /api/now/import/(staging TableName) Inserts a new record into the import set staging table.
2) GET /api/now/import/(TableName)/(sys_id) Retrieves a specific import set record and associated target records created as part of the transformation.
Now I would like to update a specific incident. I know it is possible to use the post method which will either insert a new incident or update an existing incident if the defined coalesce field in the transform map matches an existing record.
This is not exaclty what I try to achieve; I would like make sure only updates are performed. If there is no existing incident no new incident should be created.
Does anyone have an idea how to achieve this?
thanks and regards,
Jens
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 11:57 AM
Not sure if someone else already mentioned this, but I will add that you can use your import set table and have a simple transform script that ignores the action if the action is insert.
You would include the following code in your transform script: (referenced in the wiki here: http://wiki.servicenow.com/?title=Transform_Map_Scripts#gsc.tab=0)
if (action == "insert")
ignore = true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2015 07:47 AM
Thanks Christopher this works well! I wasn't aware of the implicit variable action in the onBefore script!