- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 03:24 AM
Hi All,
So I've come across my first real roadblock here.
So my intent is to make a POST call to /api/now/table/incident -- this is fine. I create an incident successfully.
The message I send to the incident endpoint is:
{
"caller_id":"US089698",
"correlation_id":"REQUEST302",
"client_name":"",
"short_description":"Reassign Phone",
"assignment_group":"Hardware",
"cmdb_ci":"Apple iPhone SE (64GB) Space Grey",
"category":"hardware",
"contact_type":"via-tem",
"state":"New",
"impact":"1 - High",
"urgency":"1 - High",
"subcategory":"Mobile Device",
"location": "Americas"
}
However now as part of the incident, I also want to create a configuration item without making a second POST to /api/now/table/cmdb_ci table.
{
"caller_id":"US089698",
"correlation_id":"REQUEST302",
"client_name":"",
"short_description":"Reassign Phone",
"assignment_group":"Hardware",
"cmdb_ci":"Apple iPhone SE (64GB) Space Grey",
"category":"hardware",
"contact_type":"via-tem",
"state":"New",
"impact":"1 - High",
"urgency":"1 - High",
"subcategory":"Mobile Device",
"location": "Americas",
"Sim_code": 123456789 <---- this data I need to access to start creating the configuration item.
}
I have the data for creating the configuration item. However, I don't understand how I can then access this data in ServiceNow.
I've written a business rule for incident 'on before insert' I have access to all the incident data that has been sent. However, I cannot access the 'additional' data that I also sent.
So is this possible, or would I have to make an additional call to the /api/now/table/cmdb_ci table then link the configuration item to the incident ticket?
Kind Regards,
Ben Hansel
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 03:50 AM
Check if you can send the additional data on a temp field on incident table, and business rule will parse that field to get the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 03:50 AM
Check if you can send the additional data on a temp field on incident table, and business rule will parse that field to get the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 04:02 AM
Hi Aniket,
So what I've done what you've suggested. Placed the data in a temporary field on the incident form.
Then Iv'e created a UI script to hide said field.
this works seeming okay. Kind of hacky but It'll do! so thank you .
Kind Regards,
Ben Hansell