Decision Table Actions

Invoke a decision table.

Decision tables provide outcomes based on your business rules. For more information about invoking decision tables, see Invoke a Decision Table in Salesforce Help.

This object is available in API version 51.0 and later.

Supported REST HTTP Methods

URI without dataset link
/services/data/vXX.X/actions/custom/decisionTableAction/dtapi_Default
URI with dataset link
/services/data/vXX.X/actions/custom/decisionTableAction/dslapiname
Formats
JSON
HTTP Methods
GET, POST
Authentication
Authorization: Bearer token

Inputs

You can choose to invoke a decision table with or without dataset link.

To execute a default Decision Table without dataset link, specify the input fields that were defined at the time of the Decision Table creation in the flow. The input fields are optional. However, you must specify at least one field as the input parameter. Use the GET method to retrieve input parameters of a Decision Table definition.

For example, to decide discount percentage for products, you can pass the input parameters, including Brand__c, Highest_Price_Point_c, and Lowest_Price_Point_c.

Note

To execute a Decision Table with dataset link, specify the list that contains the source object and its corresponding field to be used in the dataset link that is associated with the decision table.

Input Details
sObjectType
Type
sObject
Description
The name of the dataset link’s object whose records, the decision table must provide an outcome for.

Outputs

Output Details
outcomeList
Type
sObject
Description
Outcome list that stores two or more outcomes provided by the decision table.

A decision table that is invoked by the Decision Table custom invocable action can provide up to 50 outcomes.

Note

outcomeType
Type
string
Description
Indicates the type of outcome provided by the decision table after the request is successful. Valid values are:
  • Multiple Match—Outcome returns multiple matches.
  • No Match—Outcome returns no match.
  • Single Match—Outcome returns single match.
singleOutcome
Type
sObject
Description
Stores the outcome in case a single outcome is provided by the decision table. In case multiple outcomes are provided, it stores one of the outcomes.

Usage

JSON Sample Request without dataset link

{
   "inputs" : [
      {
        "Product__c": "Cloud Kicks",
        "Price__c": 1000
      }
   ]
}

JSON Sample Request with dataset Link

{
   "inputs" : [
      {
         "Transaction__c" : {
            "Product__c": "Cloud Kicks",
            "Price__c": 1000
         }
      }
   ]
}

JSON Sample Request with dataset Link containing multiple source objects

{
   "inputs" : [
      {
         "Transaction__c" : {
            "Product__c": "Cloud Kicks",
            "Price__c": 1000
         }
      }
      {
         "Catalog__c" : {
            "name": "Highest_Price_Point_c",
            "value": "500",
         }
      }
   ]
}

JSON Sample Response

[{
   “outcomeType” : “SINGLE MATCH”,
   “singleOutcome”: { “Points”: 100 },
   "outcomeList" : [
      {
         “Points”: 100
      }
   ]
}]