Configure One-Step Actions for Webhooks
Webhooks can be used with any One-Step Action that support Tokens.
For example, you can:
- Use a Create a New Business Object or Update a Business Object Action to add data from an external tool to CSM records.
- Use a Send an Email Action to send data from an external tool as contents of an email message.
- Use a Write to a File Action to add data from an external tool to a file.
- Use the Decide Between Multiple Cases Action to create an Incident in CSM from Slack.
One-Step Actions used by webhooks must include JSON or XML Modifiers on the webhook body token to parse data from an external tool to CSM records. You must identify the data type and the value to return. In some cases, you must also identify the element.
You can configure One-Step Actions from the One-Step Manager while you are:
- Configuring a webhook endpoint.
- Working in a Blueprint or mApp Solution.
- Working with One-Step Actions in the CSM Desktop Client.
Create a One-Step Action from a Webhook Endpoint
To configure a One-Step Action from a webhook endpoint:
- Open the Webhooks Manager.
- Create a new webhook endpoint or edit an existing webhook endpoint.
- Select the ellipses next to the Run a One-Step drop-down list.
- From the One-Step Manager, create or edit a One-Step Action.
- Select the Start Graphic.
- In the Step Details section, select the Conditions page.
- From the Show custom tokens drop-down list, select Webhook.
Use a Variable to Parse Incoming Data
To ensure that all Actions in a One-Step Action have access to webhook modifiers through the token menu, add an Update Variables and Stored Values Action as the first Action.
To add an Update Variables and Stored Values Action:
- On the Designer Board, add an Update Variables or Stored Values Action as the first Action.
- Provide a name for the Action.
- Select the Variable option, and then provide a name for the variable.
- From the Data Type drop-down list, select one of these options: JSON, JSON Array, XML, or XML Collection.
- Right-click in the New Value box, and then select Webhook Content > Value.
- Double-click Body, and then add Modifiers as needed. For guidance on creating Modifiers, see Webhook Modifier Examples.
- Save the Action.
As you configure other Actions in the One-Step Action, the variable will be available in the Token menu.
Use a Webhook Token to Parse Incoming Data
From a One-Step Action that supports tokens, right-click in the content area to open the Token menu, and then add the Webhook Content > Value token.
For example, to add a webhook token to Business Object Action:
- Select the Fields page.
- From the Fields list, select the Text Field that will store the data from the webhook.
- From the Value options, select Template.
- Right-click in the box, and select Webhook Content > Body.
- Double-click the Body token.
- Add Modifiers to parse the incoming data. For examples, see Webhook Modifier Examples.