Skip to main content
Skip table of contents

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.

SERVICENOWAMP-1713527386.png
  1. From the webhook configuration page, insert the following NQL condition. See Webhooks NQL examples for more benchmarks.

CODE
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
  1. Select the connector credential you had previously set up for this webhook.

  2. Select the PATCH option from the Request method drop-down.

  3. Insert the following API in the Resource field.

CODE
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.

  1. Insert Payload, use the following message example:

CODE
{"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.

  1. From the webhook configuration page, insert the following NQL condition. See Webhooks NQL examples for more benchmarks.

CODE
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
  1. Select the connector credential you had previously set up for this webhook.

  2. Select the PATCH option from the Request method drop-down.

  3. Insert the following API in the Resource field.

CODE
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.

  1. Insert Payload, use the following message example:

CODE
{ "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

How do I check if the Amplify updates the incident or interaction log in ServiceNow?

The Amplify documentation explains how to register remote actions in the ServiceNow log using the Amplify extension. That is, after following the webhook configuration described on this page.

What is the value of the {remote_action.execution.external_reference} placeholder in the Resource field?

The process behind the Amplify webhook consists of Amplify obtaining the external_reference value from the ServiceNow URL by reading a set of predefined ServiceNow URLs and matching to find the ticket sys_id and type (incident or interaction).

Then, Amplify sends this external_reference value along with the remote_action information to the Nexthink platform, and the webhook uses these values to replace the webhook Resource placeholder: {{remote_action.execution.external_reference}}.

How do I see the ServiceNow incident or interaction ID in the Nexthink platform?

After following the webhook configuration described on this page and executing a remote action using the Amplify extension in ServiceNow, running the corresponding NQL query from the Investigations page in the Nexthink web interface provides the ticket sys_id under External reference and the ticket type under External source (external_source== "SNOW-Incident" or external_source== "SNOW-Interaction").

Extenal references from ServiceNow.

RELATED TOPICS

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.