Logo
Salesforce Developers API Documentation

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).
Curl
curl -X POST '/services/data/v61.0/connect/business-rules/decision-table/definitions' -d '{"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"}]}'

ENDPOINTS