Webhook validation action HTTP request

This topic provides an overview of the properties in a webhook validation action request and shows a sample request.

Important

When you send a webhook validation action request, the destination endpoint must send a response to validate the command. Otherwise, the workflow action fails and the item does not change its state.

Properties in a webhook validation action request

Every webhook validation action request payload contains the following properties that provide information about the webhook and the action that occurred:

PropertyValue typeDescription
ActionIDGUIDThe processor item ID. Determines which specific webhook sent the data.
ActionNamestringThe processor item name. Determines which specific webhook sent the data.
CommentsstringThe text from the comment fields.
DataItemItemThe item that contains the webhook that triggered.
MessagestringProvides details if an error occurs during the action.
NextStateWorkflowStateThe state that you want the item to move to. If you insert a submit action webhook in a state, NextState returns null.
PreviousStateWorkflowStateThe state that the item moves from.
UserNamestringThe user that initiated the workflow action.
WorkflowNamestringThe name of the workflow that the item uses.
WebhookItemIdGUIDThe ID of the webhook item that subscribed to the event and was triggered.
WebhookItemNamestringThe webhook item name.

Sample webhook validation action request in JSON format

The following is an example of a webhook validation action request in JSON format:

{
  "ActionID": "a562a1b8-5c1d-4935-bd0a-41fc49ed7ded",
  "ActionName": "Sample Webhook Validation Action",
  "Comments": [
    {
      "Key": "Comments",
      "Value": "Approved!"
    }
  ],
  "DataItem": {
    "Language": "en",
    "Version": 1,
    "Id": "d1e410b9-64e7-42fb-9593-bc86ab1dd034",
    "Name": "New sample item",
    "ParentId": "8fb31904-1bbc-463c-821b-c7c1a87bf13e",
    "TemplateId": "0133f52d-271f-4217-b1cd-04342e3457eb",
    "TemplateName": "Sample Item",
    "MasterId": "00000000-0000-0000-0000-000000000000",
    "SharedFields": [
      {
        "Id": "a4f985d9-98b3-4b52-aaaf-4344f6e747c6",
        "Value": "{88AD1387-D4DA-489D-BB4B-45540917E7ED}"
      }
    ],
    "UnversionedFields": [],
    "VersionedFields": [...]
  },
  "Message": "",
  "NextState": {
    "DisplayName": "Approved",
    "FinalState": true,
    "Icon": "Software/16x16/jar.png",
    "StateID": "{07A52C51-F465-4187-9E8C-68A34764F351}",
    "PreviewPublishingTargets": []
  },
  "PreviousState": {
    "DisplayName": "Awaiting approval",
    "FinalState": false,
    "Icon": "Software/16x16/jar.png",
    "StateID": "{87FEC0C1-CAE3-4272-BA58-3DF7082BD1DB}",
    "PreviewPublishingTargets": []
  },
  "UserName": "sitecore\\\\[email protected]",
  "WorkflowName": "Workflow with webhook",
  "WebhookItemId": "a562a1b8-5c1d-4935-bd0a-41fc49ed7ded",
  "WebhookItemName": "Sample Webhook Validation Action"
}
If you have suggestions for improving this article, let us know!