Newer Version Available

This content describes an older version of this product. View Latest

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/v55.0/actions/custom/runDecisionMatrix/{UniqueName}

The value of UniqueName is the unique identifier of the record, which is sourced from the name of a decision matrix.

Note

Formats
JSON
HTTP Methods
POST
Authentication
Authorization: Bearer token

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]