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.

UpdatingServiceNowfromAmplify-1.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: api/now/v1/table/incident/{{remote_action.execution.external_reference}}

  4. 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}}"}

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: api/now/v1/table/incident/{{remote_action.execution.external_reference}}

  4. 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}}"}

RELATED TOPICS

JavaScript errors detected

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

If this problem persists, please contact our support.