Updating ServiceNow from Amplify
This page demonstrates how to auto-update ServiceNow ticket logs from Amplify using Webhooks.
Amplify can automatically update the history of executed remote actions so you can quickly audit ticket logs directly in the ServiceNow web interface. This includes ITSM ticket incidents and interactions.
There are two ways to configure auto-updates:
Amplify updates ServiceNow incident ticket logs when a remote action is triggered.
Amplify updates ServiceNow incident ticket logs after a remote action is completed.
The code samples on this page can also apply to ServiceNow interactions by changing the NQL condition from external_source== "SNOW-Incident"
to external_source== "SNOW-Interaction"
.
You must also adjust the API resource from /table/incident/
to /table/interactions/
.
Configuring Webhooks to update ServiceNow when a remote action is triggered
Configure a webhook in Nexthink that automatically updates incident ticket logs in ServiceNow when a remote action is triggered.
Remember, you must first set up a connector credential for the webhook.
From the webhook configuration page, insert the following NQL condition. See Webhooks NQL examples for more benchmarks.
remote_action.executions
| where internal_source == "Amplify" And external_reference != "undefined" And external_source == "SNOW-Incident" And status == in_progress and remote_action.nql_id != "undefined"
| list remote_action.name , remote_action.execution.request_time
Select the connector credential you had previously set up for this webhook.
Select the PATCH option from the Request method drop-down.
Insert the following API in the Resource field.
Api/now/v1/table/incident/{{remote_action.execution.external_reference}}
The {{remote_action.execution.external_reference}}
is a placeholder automatically filled with the ServiceNow ticket reference when the remote action is triggered from the Amplify extension.
Refer to the FAQ section at the bottom of this page for more information.
Insert Payload, use the following message example:
{"work_notes": "Remote action {{remote_action.name}} was triggered for this ticket from Amplify user {{remote_action.execution.account_name}} at {{remote_action.execution.request_time}}"}
Refer to the Installation and Configuration guide to learn about configuring Amplify to integrate Nexthink instances with web applications, and deploying the configuration details via Registry.
Configuring Webhooks to update ServiceNow when a remote action is completed
Configure in Nexthink a webhook that automatically updates incident ticket logs in ServiceNow with the result details of a completed remote action.
Remember, you must first set up a connector credential for the webhook.
From the webhook configuration page, insert the following NQL condition. See Webhooks NQL examples for more benchmarks.
remote_action.executions
| where internal_source == "Amplify" And external_reference != "undefined" And external_source == "SNOW-Incident" And status in [failure, success , expired] and remote_action.nql_id != "undefined"
| list remote_action.name , remote_action.execution.request_time, remote_action.execution.time, remote_action.execution.status, remote_action.execution.status_details, remote_action.execution.inputs, remote_action.execution.outputs
Select the connector credential you had previously set up for this webhook.
Select the PATCH option from the Request method drop-down.
Insert the following API in the Resource field.
api/now/v1/table/incident/{{remote_action.execution.external_reference}}
The {{remote_action.execution.external_reference}}
is a placeholder automatically filled with the ServiceNow ticket reference when the remote action is triggered from the Amplify extension.
Refer to the FAQ section at the bottom of this page for more information.
Insert Payload, use the following message example:
{ "work_notes": Status of Remote action {{remote_action.name}} triggered for this ticket from Amplify user {{remote_action.execution.account_name}} is as follows. Request time: {{remote_action.execution.request_time}} Execution time: {{remote_action.execution.time}} Status: {{remote_action.execution.status}} Status details: {{remote_action.execution.status_details}} Inputs: {{remote_action.execution.inputs}} Outputs: {{remote_action.execution.outputs}}"}
Refer to the Installation and Configuration guide to learn about configuring Amplify to integrate Nexthink instances with web applications, and deploying the configuration details via Registry.
F.A.Q
RELATED TOPICS