Decision Matrix Actions
Invoke a decision matrix in a flow with the Decision Matrix
Actions. A decision matrix is a user-defined table where you can look up an output based
on the inputs you provide.
For example, you can look up a candidate’s eligibility to avail medical insurance in a decision matrix based on the candidate’s age and gender.
These actions are available in API version 55.0 and later.
Supported REST HTTP Methods
URI: /services/data/vXX.X/actions/custom/runDecisionMatrix/{UniqueName}
Where XX.X is the latest API version.
Formats: JSON
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a variable.
Inputs
Vary depending on the selected decision matrix.
Outputs
Vary depending on the inputs of the selected decision matrix.
Usage
- Sample Request
-
Here’s an example POST request that has the inputs, such as, age and state:
1{ 2 "inputs":[ 3 { 4 "age":"25", 5 "state":"NY" 6 }, 7 { 8 "age":"25", 9 "state":"CA" 10 }, 11 { 12 "age":"", 13 "state":"WA" 14 } 15 ] 16} - Sample Response
-
Here’s an example response that has the premium and tax values based on the inputs provided in the example request.
1[ 2 { 3 "actionName":"premiumTaxLookup", 4 "errors":null, 5 "isSuccess":true, 6 "outputValues":{ 7 "premium":2400.0, 8 "tax":200.0 9 } 10 }, 11 { 12 "actionName":"premiumTaxLookup", 13 "errors":null, 14 "isSuccess":true, 15 "outputValues":{ 16 "premium":2400.0, 17 "tax":200.0 18 } 19 }, 20 { 21 "actionName":"premiumTaxLookup", 22 "errors":[ 23 { 24 "statusCode":"REQUIRED_FIELD_MISSING", 25 "message":"Missing required input parameter: age", 26 "fields":[ 27 ] 28 } 29 ], 30 "isSuccess":false, 31 "outputValues":null 32 } 33]