Integrate with Journeys
Integrate with Journeys
- Create and configure a Journey within the dashboard
- This means you’ll want to add the applicable Workflow, Action, and Document Verification Nodes and set up Journey Outcomes


You can reach Journeys from the sidebar


Next click the "Add Journey" button to create a new Journey


Give your Journey a name and click "Add Journey" to confirm


From here you will enter the Journey Editor and you may start editing your Journey by adding Branches or attaching Nodes to the Start Node.


Once you've finished editing your Journey, save a new Version by clicking "Save" and then activate it by clicking "Set Active"


For Multi-Entity Journeys you may also add Outcome Logic by clicking "Add Reconciliation Outcome"
- Next you’ll want to create a Journey Application by making a POST request to https://app.alloy.co/journeys/:journey_token/applications.
In order to make a POST request, you’ll require a few things mentioned below:
Journey token: You can find :journey_token
in two places:
- On the Journeys list page at: https://app.alloy.co/v3/dashboard/journeys


The token can be copied by hovering over it and clicking the clipboard icon
- In the URL of the Journey view page:


Workflow Secret and Workflow Token: For authorization (See Authorization tab for additional information)
Example POST Request
curl --request POST \
--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": [
{
"entity_type": "person",
"data": {
"address_line_1": "123",
"address_line_2": "Test St",
"address_city": "New York City",
"address_state": "NY",
"address_postal_code": "10010",
"address_country_code": "US",
"birth_date": "1985-01-23",
"document_ssn": "123456789",
"email_address": "[email protected]",
"name_first": "Test",
"name_last": "Example",
"phone_number": "5555555555"
},
"external_entity_id": "my_system_entity_id_123"
}
],
"do_await_additional_entities": false,
"external_group_id": "my_system_group_id_456"
}'
Example Multi-Entity POST Request
For Multi-Entity Journeys, supply a branch_name
and entity_type
alongside the data
payload.
curl --request POST \
--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": [
{
"branch_name": "persons",
"entity_type": "person",
"data": {
"address_line_1": "123 Fake St.",
"address_line_2": "Apt 123",
"address_city": "New York",
"address_state": "NY",
"address_postal_code": "10001",
"address_country_code": "US",
"name_first": "Test",
"name_last": "Person",
"birth_date": "1985-01-23"
}
},
{
"branch_name": "businesses",
"entity_type": "business",
"data": {
"business_name": "My Business",
"address_line_1": "321 Real St.",
"address_line_2": "Ste 321",
"address_city": "New York",
"address_state": "NY",
"address_postal_code": "10001",
"address_country_code": "US",
"name_first": "Business",
"name_last": "Inc."
}
}
],
"do_await_additional_entities": false,
"external_group_id": "my_system_group_id_456"
}'
Example Response:
{
"journey_application_token": ":journey_token",
"_links": {
"self": {
"href": "/v1/journeys/:journey_token/applications/:application_token"
}
}
}
For "streaming" requests
set do_await_additional_entities
to true
; this will put the Journey into a state where the application will not enter reconciliation conditions until the stream is over, e.g. "do_await_additional_entities": false
is passed, allowing a stream of multiple entities to be passed through the Journey until the stream ends.
-
Create a GET request to retrieve data and response
Next, you’ll want to make a GET request to retrieve the Journey Application details. The following things must be included in the request:
- Journey Token
- Journey Application Token
Example GET Request
curl --request GET \
--url https://demo-qasandbox.alloy.co/v1/journeys/:journey_token/applications/:application_token \
--header 'Accept: application/json'
Sandbox and Production URL's
Sandbox URL: https://devsandbox.alloy.co/v1/journeys/:journey_token/applications/:application_token
Production URL: http://devapi.alloy.co/v1/journeys/:journey_token/applications/:application_token
Example Response
Note: The response is the same for both Multi-Entity and Single
Multi-Entity Journeys will have multiple child_entities
{
"credit_limit": "42",
"annual_interest_rate": "70",
"status": "completed",
"sandbox": false,
"created_at": 1634059958368,
"updated_at": 1634059961458,
"closed_at": 1634059961464,
"recent_outcome": "Approved",
"complete_outcome": "Approved",
"_embedded": {
"child_entities": [
{
"external_entity_identifier": null,
name: "Test Person",
token: ":entity_token"
type: "person"
}
],
"entity": {
"external_entity_identifier": null,
"name": null,
"token": ":entity_token",
"type": "group"
},
"events": [
{
"type": "started_application",
"timestamp": 1634059958414,
"entity_token": null,
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "workflow",
"config": {
"workflow_token": ":workflow_token",
"workflow_version_id": 1
}
}
},
"_links": {}
},
{
"type": "visited_node",
"timestamp": 1634059958454,
"entity_token": null,
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "workflow",
"config": {
"workflow_token": ":workflow_token",
"workflow_version_id": 1
}
}
},
"_links": {}
},
{
"type": "started_evaluation",
"timestamp": 1634059958531,
"evaluation_token": ":evaluation_token",
"entity_token": null,
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "workflow",
"config": {
"workflow_token": ":workflow_token",
"workflow_version_id": 1
}
}
},
"_links": {
"evaluation": {
"href": "/v1/evaluations/:evaluation_token"
}
}
},
{
"type": "completed_evaluation",
"timestamp": 1634059960557,
"outcome": "Approved",
"evaluation_token": ":evaluation_token",
"entity_token": ":entity_token",
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "workflow",
"config": {
"workflow_token": ":workflow_token",
"workflow_version_id": 1
}
}
},
"_links": {
"evaluation": {
"href": "/v1/evaluations/:evaluation_token"
}
}
},
{
"type": "visited_node",
"timestamp": 1634059961272,
"entity_token": null,
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "outcome",
"config": {
"outcome": "Approved"
}
}
},
"_links": {}
},
{
"type": "completed_application",
"timestamp": 1634059961453,
"outcome": "Approved",
"entity_token": ":entity_token",
"_embedded": {
"node": {
"name": null,
"id": ":node_id",
"type": "outcome",
"config": {
"outcome": "Approved"
}
}
},
"_links": {}
}
],
"journey": {
"journey_name": "",
"journey_token": ":journey_token",
"_links": {
"self": {
"href": "/v1/journeys/:journey_token"
}
}
}
},
"_links": {
"self": {
"href": "/v1/journeys/:journey_token/applications/:application_token"
}
}
}
Updated 18 days ago