Workaround: Updating an Incident using Webhooks

Scenario

This is a proof-of-concept for a workaround to enable you to use Action types other than Insert Object with the initial webhooks implementation. This is a complex workaround for advanced users, so if you can wait for the full implementation in a future release of Ivanti Neurons for ITSM, we encourage you to do so.

We will use a webhook to update the description for an Incident record; we can do this automatically by using a staging business object and triggered actions.

Important: During testing, using triggered actions to automatically delete the staging business object didn't work. Hence you must manually delete staging records that have the Done field set to True, or set up an action/workflow to run on schedule to do this for you.

Prerequisites

To recreate this example, you need to be an ITSM Administrator, and have access to an external API tool such as Postman.

How it Works

1.Using Postman or a similar tool, send a request via the ITSM webhook to the WebhookStaging business object. This request carries the RecID of the Incident record to be updated, as well as the new description, all in the request body.

2.Receipt of the request causes the WebhookStaging business object to run the Create a New Record Action (called Create Staging in our example) that creates a new record, and puts all the data from the request body into the DataField.

3.In the same Action (Create a New Record), an expression extracts the RecID from the request body and puts it into an ID field in the newly created WebhookStaging object record.

4.The creation of the WebhookStaging record causes a Triggered Action to run the Update a Record Action that changes the value in the Done field from false to true.

5.Simultaneously, the Run for Child Action is configured to run the Update a Record Action against the Incident record which takes the description out of the DataField and updates the Description field in the Incident record.