Processes are used to initiate journeys within the Credas system. There are several ways to create a process and a new or existing Entity can be used as part of this request.
Getting started
We have provided several example requests below that can be used to create processes in the following scenarios:
- Create a new Process & Entity.
- Create a new Process & Entity (no contact – magic link).
- Create a new Process & use an existing Entity.
In order to create a new Process you will need to know the journeyId and actorID to use. Please see the Available journeyIds and ActorIds page for more information on this.
If you are not clear on which of the below requests you should use, please reach out to your technical contact.
Create a Process & new Entity
To create a new process and entity as part of a request you must use the following request body.
{
"title": "Example title",
"journeyId": "guid",
"webhookUrl": "string",
"webhookStepUrl": "string",
"userGroupId": "guid",
"processEntities": [
{
"firstName": "John",
"surname": "Smith",
"emailAddress": "[email protected]",
"phoneNumber": "07000000000",
"reference": "Your customer reference",
"actorId": 123,
"contactViaEmail": true,
"contactViaSms": true,
"inPerson": false
}
]
}
To determine how we contact these individuals you can set your contact preferences using the following fields:
contactViaEmail – if set to true we will send an invite to the entity via email.
contactViaSms - if set to true we will send an invite to the entity via SMS.
inPerson – if set to true we will not issue any invites, both values above must also be set to false.
If you are setting use contactViaEmail and/or contactViaSms to 'false' you can pass the emailAddress and/or phoneNumber as null (not a blank string) or you can omit them entirely.
You can provide your webhookUrl as part of this request body. If you are not consuming additional webhook steps or user groups as part of your integration you can pass both the webhookStepUrl & userGroupId values as null or remove them from your request body.
Create a Process & new Entity (no contact)
To create a new process and entity (no contact) as part of a request you must use the following request body.
{
"title": "Example title",
"journeyId": " guid",
"webhookUrl": "string",
"webhookStepUrl": "string",
"userGroupId": "guid",
"processEntities": [
{
"firstName": "John",
"surname": "Smith",
"emailAddress": "[email protected]",
"phoneNumber": "07000000000",
"reference": "Your customer reference",
"actorId": 123,
"contactViaEmail": false,
"contactViaSms": false,
"inPerson": false
}
]
}
You must set your contactViaEmail, contactViaSms & inPerson to 'false' to achieve a state of no-contact.
You can provide your webhookUrl as part of this request body. If you are not consuming additional webhook steps or user groups as part of your integration you can pass both the webhookStepUrl & userGroupId values as null or remove them from your request body.
Create a Process using an existing Entity
To create a new process using an existing entity you must use the following request body. Please refer to example request above for information on setting your contact, webhook & user group values.
{
"title": "Example title",
"journeyId": " guid",
"webhookUrl": "string",
"webhookStepUrl": "string",
"userGroupId": "guid",
"processEntities": [
{
"id": "guid",
"reference": "Your customer reference",
"actorId": 123,
"contactViaEmail": true,
"contactViaSms": true,
"inPerson": false
}
]
}
Response information
Once you have created your process you will need to capture a number of useful id’s within the response.
- "id" – this is a guid and is referred to as the ‘processId’
- "entityId" – this is a guid
- "processActorId" – this is an integer
These id’s can be used to obtain the results of a check through endpoints to get the latest active-checks or obtain full process results.
Providing additional form information
When creating a process you may wish to include information that can be used to populate a Credas form.
Please refer to our default values page for more information on this.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article