Calling a workflow with Context
When initiating a workflow on the Liberate platform, you have the option to pass context data along with the request. This context data provides additional information or parameters that can be utilized within the workflow. Here's how you can call a workflow with context data.
Example Context Data
Here is an example of context data that can be passed along with the workflow request. In this example data is being collected from a website built using Liberate CX Builder and passed into the workflow:
Example 1:
{
"session": {
"hubRadio": "file_a_claim",
"propertyFnolLob": "home",
"propertyLocation": "elm",
"propertyFnolLossType": "weather",
"propertyFnolLossCause": "hurricane",
"aleRadio": "no",
"propertyFnolDamageType": {
"home": true,
"other": false,
"belongings": true
},
"propertyFnolLossDescriptionInput": "long description.......",
"propertyFnolContactPhone": "3126555013",
"propertyFnolContactEmail": "[email protected]",
}
}
Calling the Workflow with Context Data Via CURL
To call a workflow with context data, you need to include the context JSON object in the curl request's data field. Here's an example of how to modify the original curl request to include context data:
curl -X PUT -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"slug": "YOUR_FLOW_SLUG", "context": YOUR_CONTEXT_DATA}' \
https://integration-core-dev-api.liberateinc.io
``
Updated 9 months ago
