Create Table
POST {{_endpoint}}/services/data/v{{version}}/connect/business-rules/decision-table/definitions
Decision Table Definitions (POST)
Create a decision table definition. A decision table definition contains all the details required to create a decision table.Resource
/connect/business-rules/decision-table/definitions
Resource Example
https://yourInstance.salesforce.com/services/data/v59.0/connect/business-rules/decision-table/definitions
Available version
58.0
Requires Chatter
No
HTTP methods
POST
JSON example for a single object source
{
"setupName":"Product Qualificiation eligibility",
"fullName":"ProductQualificationEligibility",
"description":"Eligiblity of Products using Qualification Rules",
"usageType":"ProductEligibility",
"sourceType":"SingleSobject",
"sourceObject":"AccountFeed",
"status":"Draft",
"decisionResultPolicy":"UniqueValues",
"collectOperator":"Count",
"conditionType":"Any",
"conditionCriteria":"1 OR 2 OR 3",
"parameters":[
{
"fieldName":"IsDeleted",
"usage":"INPUT",
"operator":"Equals",
"sequence":"1"
},
{
"fieldName":"Id",
"usage":"INPUT",
"operator":"Equals",
"sequence":"2"
},
{
"fieldName":"Title",
"usage":"INPUT",
"operator":"Equals",
"sequence":"3"
},
{
"fieldName":"CreatedById",
"usage":"OUTPUT"
}
]
}
JSON example for a multi-object source
{
"setupName":"Jumbo Pricing Definition",
"fullName":"JumboPricingDefinition",
"description":"Join all the DT definitions into one jumbo pricing definition",
"usageType":"ProductEligibility",
"type":"LowVolume",
"sourceType":"MultipleSobjects",
"sourceObject":"AccountFeed",
"status":"Draft",
"decisionResultPolicy":"UniqueValues",
"collectOperator":"Count",
"sourceconditionLogic":"1 AND 2 AND 3",
"conditionType":"Any",
"conditionCriteria":"1 OR 2 OR 3 OR 4 OR 5",
"parameters":[
{
"fieldName":"IsDeleted",
"usage":"INPUT",
"operator":"Equals",
"sequence":"1",
"columnMapping":"IsDeleted"
},
{
"fieldName":"Id",
"usage":"INPUT",
"operator":"Equals",
"sequence":"2",
"columnMapping":"Id"
},
{
"fieldName":"Title",
"usage":"INPUT",
"operator":"Equals",
"sequence":"3",
"columnMapping":"Title"
},
{
"fieldName":"OldvalNumber",
"usage":"INPUT",
"operator":"Equals",
"sequence":"4",
"columnMapping":"AccountHistory.OldvalNumber"
},
{
"fieldName":"OldvalString",
"usage":"INPUT",
"operator":"Equals",
"sequence":"5",
"columnMapping":"AccountHistory.OldvalString"
},
{
"fieldName":"CreatedById",
"usage":"OUTPUT",
"columnMapping":"CreatedById"
},
{
"fieldName":"NewvalNumber",
"usage":"OUTPUT",
"columnMapping":"AccountHistory.NewvalNumber"
},
{
"fieldName":"NewvalString",
"usage":"OUTPUT",
"columnMapping":"AccountHistory.NewvalString"
}
]
"sourceCriteria":[
{
"sourceFieldName":"OldvalString",
"value":"5",
"operator":"Equals",
"valueType":"Parameter",
"sequenceNumber":"1"
}
]
}
Request body for POSTProperties
Name | Type | Description | Required or Optional | Available Version |
---|---|---|---|---|
collectOperator | String | Operator to apply a filter to outputs. Possible values are: - Count - Maximum - Minimum - None - Sum | Optional | 58.0 |
conditionCriteria | String | Custom logic applied on the decision table columns to decide how the input fields are processed. | Optional Required when the condition type is Custom. | 58.0 |
conditionType | String | Condition logic for input fields. Possible values are: - All - Any - Custom | Optional | 58.0 |
description | String | Description of the decision table. | Optional | 58.0 |
decisionResultPolicy | String | Results policy to filter results of the decision table. Possible values are: - AnyValue - CollectOperator - FirstMatch - OutputOrder - Priority - RuleOrder - UniqueValues | Optional | |
fullName | String | Unique name of the rule definition. | Required | 58.0 |
isSetCollectOperator | Boolean | For internal use only. Indicates whether the collectOperator is enabled (true) or not (false). | Optional | 58.0 |
isSetConditionCriteria | Boolean | For internal use only. Indicates whether the conditionCriteria field is enabled (true) or not (false). | Optional | 58.0 |
isSetConditionType | Boolean | For internal use only. Indicates whether the conditionType field is enabled (true) or not (false). | Optional | 58.0 |
isSetDescription | Boolean | For internal use only. Indicates whether the description field is enabled (true) or not (false). | Optional | 58.0 |
isSetDecisionResultPolicy | Boolean | For internal use only. Indicates whether the DecisionResultPolicy field is enabled (true) or not (false). | Optional | 58.0 |
isSetFullName | Boolean | For internal use only. Indicates whether the FullName field is enabled (true) or not (false). | Optional | 58.0 |
isSetParameters | Boolean | For internal use only. Indicates whether the parameters field is enabled (true) or not (false). | Optional | 58.0 |
isSetSetupName | Boolean | For internal use only. Indicates whether the setupName field is enabled (true) or not (false). | Optional | 58.0 |
isSetSourceconditionLogic | Boolean | For internal use only. Indicates whether the sourceConditionLogic field is enabled (true) or not (false). | Optional | 58.0 |
isSetSourceCriteria | Boolean | For internal use only. Indicates whether the sourceCriteria field is enabled (true) or not (false). | Optional | 58.0 |
isSetSourceObject | Boolean | For internal use only. Indicates whether the sourceObject field is enabled (true) or not (false). | Optional | 58.0 |
isSetSourceType | Boolean | For internal use only. Indicates whether the sourceType is enabled (true) or not (false). | Optional | 58.0 |
isSetType | Boolean | For internal use only. Indicates whether the type field is enabled (true) or not (false). | Optional | 58.0 |
isSetUsageType | Boolean | For internal use only. Indicates whether the UsageType field is enabled (true) or not (false). | Optional | 58.0 |
parameters | Decision Table Parameter Input[] | Array of input and output fields for the decision table. | Optional | 58.0 |
setupName | String | Name of the decision table. | Required | 58.0 |
sourceconditionLogic | String | Custom logic to filter the decision table rows. | Optional | 58.0 |
sourceCriteria | Decision Table Source Criteria Input[] | Output array representation of source filters for the decision table rows, such as, fieldName, operators, valueType, and more. | Optional | 58.0 |
sourceObject | String | Object containing business rules for the decision table to read. | Required | 58.0 |
sourceType | String | Type of source to obtain decision table data. Possible values are: - CsvUpload - MultipleSobjects - SingleSobject | Required | 58.0 |
status | String | Status of the decision table. Possible values are: - ActivationInProgress - ActivationInProgress - Draft - Inactive | Required | 58.0 |
type | String | Type of the decision table. Possible values are: - HighVolume - LowVolume | Optional | 58.0 |
usageType | String | Process type that uses the decision table. Possible values are: - Pricing - ProductEligibility | Optional | 58.0 |
Response body for POST
Decision Table Output
Output representation of the decision table details.JSON example for GET, POST, and PATCH
{
"code":"200",
"decisionTable":{
"collectOperator":"Count",
"conditionCriteria":"1 OR 2 OR 3",
"conditionType":"Any",
"decisionResultPolicy":"UniqueValues",
"description":"Eligiblity of Products using Qualification Rules",
"id":"0lDxx00000000BJ",
"parameters":[
{
"fieldName":"IsDeleted",
"isGroupByField":false,
"isPriority":false,
"operator":"Equals",
"sequence":1,
"usage":"Input"
},
{
"fieldName":"CreatedById",
"isGroupByField":false,
"isPriority":false,
"usage":"Output"
},
{
"fieldName":"Title",
"isGroupByField":false,
"isPriority":false,
"operator":"Equals",
"sequence":3,
"usage":"Input"
},
{
"fieldName":"Id",
"isGroupByField":false,
"isPriority":false,
"operator":"Equals",
"sequence":2,
"usage":"Input"
}
],
"setupName":"Product Qualificiation eligibility3",
"sourceCriteria":[
],
"sourceObject":"AccountFeed",
"sourceType":"SingleSobject",
"sourceconditionLogic":"1 AND 2 AND 3",
"status":"Draft"
},
"isSuccess":true,
"message":""
}
JSON example for DELETE
{
"code":"200",
"isSuccess":true,
"message":""
}
Property Name | Type | Description | Filter Group and Version | Available Version |
---|---|---|---|---|
code | String | Response code from the API request. | Small, 58.0 | 58.0 |
decisionTable | Decision Table Definition Output | Details of the decision table definition associated with the decision table. | Small, 58.0 | 58.0 |
isSuccess | Boolean | Indicates whether the API request is successful (true) or not (false). | Small, 58.0 | 58.0 |
message | String | Error message when the API request fails. | Small, 58.0 | 58.0 |
Request Body
{"setupName"=>"Product Qualificiation eligibility", "fullName"=>"ProductQualificationEligibility", "description"=>"Eligiblity of Products using Qualification Rules", "sourceObject"=>"AccountFeed", "status"=>"Draft", "conditionType"=>"Any", "conditionCriteria"=>"1 OR 2 OR 3", "parameters"=>[{"fieldName"=>"IsDeleted", "usage"=>"INPUT", "operator"=>"Equals", "sequence"=>"1"}, {"fieldName"=>"Id", "usage"=>"INPUT", "operator"=>"Equals", "sequence"=>"2"}, {"fieldName"=>"Title", "usage"=>"INPUT", "operator"=>"Equals", "sequence"=>"3"}, {"fieldName"=>"CreatedById", "usage"=>"OUTPUT"}]}
RESPONSES
status: Created
{"code":"200","decisionTable":{"id":"0lDHo0000008Pnt","parameters":[],"sourceCriteria":[]},"isSuccess":true,"message":""}