How to create a new ticket using an URL

rhether
Kilo Contributor

Is there a way for me to create a ticket in Servicenow by posting to our URL:
e.g. https://myinstance.service-now.com/incident.do?Customer=123?Issue=sitedown?Urgency=low
Of course, I am not using the correct field names.

If someone could point me in the right direction, I would appreciate it.
Thanks, Rick

6 REPLIES 6

CapaJC
ServiceNow Employee
ServiceNow Employee

https://myinstance.service-now.com/incident.do?sys_id=-1&sysparm_query=customer=123^issue=sitedown^urgency=3

Note that in the sysparm_query part you need the actual field name, not its label (e.g., "u_my_field" vs. "My Field"), and you need to use values vs. labels for choice list fields (like "3" vs "Low" for the urgency field.


rhether
Kilo Contributor

That worked, how do I get the URL to submit the form?
In PHP I would do something like appending "&submit=true" to the end of the URL.

Also on the lookup fields (Magnifying Glass) I can't get a value to populate.
I tried it like this: ^caller_id=Jane Doe, there must be a trick to these ones.

Thank you !






CapaJC
ServiceNow Employee
ServiceNow Employee

You'd need to use the 32-character hexidecimal sys_id of the Jane Doe user record, not the display value. As an admin, go to her user record, right-click the form header and "Copy URL" to get it.

I don't think you can submit the form via URL like you describe, but I'll let anyone else chime in if they've found a way.


Brad Tilton
ServiceNow Employee
ServiceNow Employee

I had a requirement to save a record using a url a while back. What we ended up doing was using a combination of a url parameter and an onLoad client script that checked for the parameter and saved the record if it was there.