setServiceNowPayload
A Workflow Engine function that sets the payload used in the subsequent create, resolve, close, or update request to ServiceNow.
This function is available as a feature of the Add-ons v2.3 download and later.
This function is available for alert and Situation workflows.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function setServiceNowPayload
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
| yes | string | Same as in UI |
| yes | string | Same as in UI |
| yes | string | Same as in UI |
Example
The following example demonstrates typical use of Workflow Engine function setServiceNowPayload
.
In this case, the the workflow creates a new incident in the target ServiceNow system using the defined payload, createSituationTicket, when a new Situation is raised or the Situation client tool, Open ServiceNow Ticket, has run.
Sample Workflow - Create Incident-servicenowmanagement1 (Alert Integration WFE)
Action | Description |
---|---|
Entry filter |
|
DELAY | 5 seconds (set as needed) |
Set ticket payload and target ( | Build request payload and save to workflow context instance: requestType: payloadTemplate: |
Create Ticket ( | Send create request using workflow context from previous function |
The workflow takes input values from workflowContext (set in the corresponding workflow in the Alert Workflows WFE, which initiates this request) and, in this case, issues a request to ServiceNow to create a new incident.