Update a Journey Application

Updating a Journey Application (Evaluation Data Request)

There can be cases where a later workflow will require more data than an earlier workflow, for example, if additional documentation is required for a borderline Application. We will send a data_request_evaluation webhook in this case, and pause the Evaluation (and Application) until we get more information.

The webhook notification for the data request event will include several pieces of information to handle the event. The data._embedded.node.workflow_token will identify which workflow the data request is from, for example if this is a document verification workflow, you can look there to know that the next step is to collect documents from your end user to continue their application.

Additionally, data._links.evaluation will refer to the full response from the data request, If you GET that url you can see the precise information needed to advance the application.

Once you have the new data, you can resume the application by PUTing to the data._links.journey_application path from the webhook response (e.g. /v1/journeys/:journey_token/applications/:application_token) with a new payload.

This will immediately replace the Evaluation payload with this new incoming payload, and try to continue the Application. Note that to use this feature, you must include identifiers.external_entity_id in both requests.

PUT https://sandbox.alloy.co/v1/journeys/:journey_token/applications/:application_token

Example Request:

curl --request PUT \
     --url https://demo-qasandbox.alloy.co/v1/journeys/:journey_token/applications \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     -u workflow_token:workflow_secret \
     --data '{
     "entities": [
         {
             "data": {
                 "name_first": "Test",
                 "name_last": "Person"
             },
         },
       ]
     }'

Example Multi-Entity Request:

curl --request PUT \
     --url https://demo-qasandbox.alloy.co/v1/journeys/:journey_token/applications \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     -u workflow_token:workflow_secret \
     --data '{
     "entities": [
         {
             "data": {
                 "name_first": "Test",
                 "name_last": "Person"
             },
             "entity_type": "person",
             "branch_name": "persons"
         },
         {
             "data": {
                 "name_first": "Person",
                 "name_last": "Test"
             },
             "entity_type": "person",
             "branch_name": "persons"
         }
       ]
     }'

Did this page help you?