Guides

External request payload

Payload sent by the external request interaction

The external request can be triggered with two mechanisms:

  • Cloud based
  • Local (from the device on which the request is executed; relevant, when you cannot receive triggers outside your network)

Depending on the selection you receive different payloads. In general the information sent contains relevant data on the context of the execution like:

  • Order ID
  • Report ID
  • Document ID
  • Executing user ID
  • Interaction ID

Cloud based execution

In the cloud based configuration the "external request" interaction will trigger a request from the Operations1 infrastructure to the specified endpoint. That requires, that the endpoint can be reached from Operations1 and cannot be inside the local infrastructure.

If this configuration is chosen, the payload sent is identical to the webhook "interaction-value-update-v1".

Local device

When called from the local device, the target URI can be inside the local infrastructure, such as a database or other device (machine or automatic toque screwdriver), which is not accessible from outside the local network.

An important difference is, that the payload sent from the local device only contains data from the step, where the "External Request" is located in, where the cloud based configuration contains information on the complete report.

This is an example payload in the "Local Device" configuration:

{
  "orderId": null,
  "progressId": 526,
  "rowId": 1994,
  "instructionId": 867,
  "stepId": 1184,
  "row": {
    "id": 1994,
    "versionPersistentId": 916,
    "header": "Request information test",
    "entries": [
      {
        "key": "Local request",
        "availableLocales": [
          {
            "localeCode": "en",
            "instructionId": 867
          }
        ],
        "localeCode": "en",
        "id": 2586,
        "mandatory": false,
        "canBeNotApplicable": false,
        "allowAdditionalFeedback": false,
        "position": 0,
        "versionPersistentId": 1250,
        "interactionTags": [
          {
            "id": 197,
            "name": "local_tag",
            "interactionType": "external-request",
            "archived": false,
            "sendWebhook": false
          }
        ],
        "uri": "<calle_ url>",
        "externalRequestType": "frontend",
        "updatedBy": null,
        "updatedAt": null,
        "type": "external-request"
      }
    ],
    "inCustomReport": false,
    "availableLocales": [
      {
        "instructionId": 867,
        "localeCode": "en"
      }
    ],
    "localeCode": "en",
    "mediaObjects": [],
    "position": 0
  },
  "step": {
    "id": 1184,
    "type": "default",
    "name": "Request information test",
    "notifications": [],
    "rows": [
      {
        "id": 1994,
        "versionPersistentId": 916,
        "header": "Request information test",
        "entries": [
          {
            "key": "Local request",
            "availableLocales": [
              {
                "localeCode": "en",
                "instructionId": 867
              }
            ],
            "localeCode": "en",
            "id": 2586,
            "mandatory": false,
            "canBeNotApplicable": false,
            "allowAdditionalFeedback": false,
            "position": 0,
            "versionPersistentId": 1250,
            "interactionTags": [
              {
                "id": 197,
                "name": "local_tag",
                "interactionType": "external-request",
                "archived": false,
                "sendWebhook": false
              }
            ],
            "uri": "<called_url>",
            "externalRequestType": "frontend",
            "updatedBy": null,
            "updatedAt": null,
            "type": "external-request"
          }
        ],
        "inCustomReport": false,
        "availableLocales": [
          {
            "instructionId": 867,
            "localeCode": "en"
          }
        ],
        "localeCode": "en",
        "mediaObjects": [],
        "position": 0
      }
    ],
    "availableLocales": [
      {
        "instructionId": 867,
        "localeCode": "en"
      }
    ],
    "localeCode": "en",
    "navigationPreventionMode": "none"
  },
  "stepIndex": 0,
  "interactionId": 2586,
  "interactionValueId": 1914,
  "userId": 197
}