Decision Engine Endpoints
The Decision Engine Suite provides a set of endpoints to:
- Authenticate
- Retrieve Available Decision Trees and User Input Fields
- Run a Decision Tree
- Return / Update a Decision
Below is a flow diagram guide on how to use these endpoints effectively.
Flow Diagram
1. Authenticate
Before using any of the endpoints, you must authenticate. This ensures you have the necessary permissions to access the data.
Example Request
POST /authenticate
2. Retrieve All Available Decision Trees
This endpoint returns all the available decision trees that you (the logged-in user) can run. These trees are assigned by your account manager.
You can filter the results using the parameters listed in the API documentation.
Example Request
GET /decisionEngine/GUID
Response Object
The response will produce a list of GUID's along with their friendly name for ease of identification.
It will be the GUID
required for the Decision Tree you wish to run on the next endpoint.
The GUID in the response is the provenirId
required in the path variables for the subsequent endpoints.
3. User Data Fields
This endpoint returns the fields required in the requestBody
for the selected Decision Tree
to be run in the Run Decision Tree
Endpoint.
Example Request
GET /decisionEngine/{provenirId}/userDataFields
This endpoint will show the criteria that will need to be applied to check. These templates are predefined but can be adjusted. (Refer to the 'Edit Predefined Decision Trees' section for more details.)
4. Run Decision Tree
This allows you to run the selected tree against the identified company. You need to supply the {provenirId} in the path.
NOTE: The {provenirId} is the GUID in the response from the endpoint in step 2.
Not all GUIDs require a requestBody. It is essential to query the endpoint in step 3 to determine the required requestBody for this request.
Example Request
POST /decisionEngine/{provenirId}
5. Return Decision Outcome
This endpoint retrieves the result of the decision tree submission. It must also be called if any manual changes are made to ensure the updates take effect.
GET /decisionEngine/decisionOutcome/{guid}
Example Response
{
"correlationId": "23921650-c073-11ea-860f-06bc8182190e",
"includeInManualReview": true,
"decisionOutcomes": {
"items": [
{
"status": 1,
"label": "Accepted",
"description": "The decision has met all the required criteria and has been automatically accepted."
}
]
}
}