DecisionTable
Parent Type
File Suffix and Directory Location
DecisionTable components have the suffix .decisionTable and are stored in the decisionTables folder.
Version
DecisionTable components are available in API version 51.0 and later.
Special Access Rules
To use this metadata type, your Salesforce org must have the Loyalty Management or the Rebate Management license.
Fields
Field Name | Field Type | Description |
---|---|---|
collectOperator | DecisionTableCollectOperator (enumeration of type string) | Specifies the operator that's used when the result is filtered by the Collect
operator. Valid values are:
|
conditionCriteria | string | Logic that's used to decide how the input fields are processed. |
conditionType | DecisionTableConditionType (enumeration of type string) | Condition logic that's used for input fields. Valid values are:
|
dataSourceType | DecisionTableDataSourceType (enumeration of type string) | Required. Specifies the type of data source that's used to create a decision
table. Valid values are:
|
decisionTableParameters | DecisionTableParameter[] | Required. Parameters that you specify in a decision table. |
description | string | Description of the decision table. |
doesConsiderNullValue | boolean | Indicates whether a column that has a null value is considered for lookup (true) or not (false). The default value is false. |
executionType | DecisionTableexecutionType (enumeration of type string) | Indicates the backing storage for the Decision Table. Valid values are:
|
filterResultBy | DecisionTableHitPolicy (enumeration of type string) | Specifies how the results of a decision table are filtered if a set of inputs
returns multiple matching outputs. Valid values are:
|
hasIncrementalSyncFailed | boolean | Indicates if the last incremental refresh failed. |
isIncrementalSyncEnabled | boolean | Indicates if incremental refresh is enabled for the Decision Table. |
lastSyncDate | string | Required. Latest date on which the decision table was refreshed. |
refreshFailureReason | string | Reason why the refresh of the decision table data failed. |
refreshStatus | DecisionTableRefreshStatus (enumeration of type string) | Specifies the refresh status of the cached data in the decision table. Valid values are:
|
setupName | string | Required. Name of the decision table, which appears in Salesforce Setup. |
sourceObject | string | Required. Object that contains the rules based on which the decision table must provide outcomes. |
status | DecisionTableStatus (enumeration of type string) | Required. Status of the decision table. Valid values are:
|
type | DecisionTableTypeOperator (enumeration of type string) | Required. Stores the type of decision table. Valid values are:
|
usageType | ExpsSetProcessType (enumeration of type string) | Type of industry or the application within the industry that's using a decision
table. Valid values are:
|
Fields
Field Name | Field Type | Description |
---|---|---|
dataType | DTParameterDataType (enumeration of type string) | The data type of the field used in a decision table. Valid values are:
|
fieldName | string | Required. API name of the fields that selected as an input or output for the decision table. |
isGroupByField | boolean | Indicates whether an input field is used to group the business rules of the decision table. |
operator | DecisionTableOperator (enumeration of type string) | Required. Operator used for the input field. Valid values are:
|
sequence | integer | The sequence in which input fields are processed. This field is available in API version 52.0 and later. |
sortType | DecisionTableSortType (enumeration of type string) | Sort outputs of a decision table based on the values of the input or output
parameter field. This field is available in API version 56.0 and later. Valid values are:
|
usage | DecisionTableParameterType (enumeration of type string) | Required. Usage type of a field. The usage type can be one of the following values:
|
Declarative Metadata Sample Definition
The following is an example of a DecisionTable component.
<?xml version="1.0" encoding="UTF-8"?>
<DecisionTable xmlns="http://soap.sforce.com/2006/04/metadata">
<collectOperator>None</collectOperator>
<conditionCriteria>1 and 2 and 3 and 4</conditionCriteria>
<conditionType>All</conditionType>
<dataSourceType>SingleSobject</dataSourceType>
<decisionTableParameters>
<fieldName>IsDeleted</fieldName>
<operator>Equals</operator>
<usage>INPUT</usage>
<sequence>1</sequence>
<isGroupByField>true</isGroupByField>
<sortType>AscNullFirst</sortType>
<dataType>Number</dataType>
<fieldPath>AccountFeed.CommentsCount</fieldPath>
<domainObject>AccountFeed</domainObject>
<isPriorityField>false</isPriorityField>
<decimalScale>2</decimalScale>
<length>14</length>
<isRequired>false</isRequired>
</decisionTableParameters>
<decisionTableParameters>
<fieldName>IsActive</fieldName>
<usage>OUTPUT</usage>
</decisionTableParameters>
<decisionTableParameters>
<fieldName>LimitNumber</fieldName>
<operator>Equals</operator>
<usage>INPUT</usage>
<sequence>2</sequence>
<isGroupByField>false</isGroupByField>
</decisionTableParameters>
<decisionTableParameters>
<fieldName>LimitStartDate</fieldName>
<usage>OUTPUT</usage>
</decisionTableParameters>
<decisionTableParameters>
<fieldName>GivenBadgeCount</fieldName>
<operator>Equals</operator>
<usage>INPUT</usage>
<sequence>3</sequence>
<isGroupByField>false</isGroupByField>
</decisionTableParameters>
<decisionTableParameters>
<fieldName>Name</fieldName>
<operator>Equals</operator>
<usage>INPUT</usage>
<sequence>4</sequence>
<isGroupByField>false</isGroupByField>
</decisionTableParameters>
<decisionTableSourceCriterias>
<sourceFieldName>IsDeleted</sourceFieldName>
<operator>Equals</operator>
<value>false</value>
<sequenceNumber>1</sequenceNumber>
<valueType>Literal</valueType>
</decisionTableSourceCriterias>
<description>Sample DT created for md-common tests</description>
<filterResultBy>UniqueValues</filterResultBy>
<setupName>Sample DT</setupName>
<sourceObject>WorkBadgeDefinition</sourceObject>
<sourceConditionLogic>1</sourceConditionLogic>
<status>Draft</status>
<type>LowVolume</type>
<usageType>Bre</usageType>
<doesConsiderNullValue>false</doesConsiderNullValue>
<refreshStatus>Failed</refreshStatus>
<refreshFailureReason>Failed due to limit violation.</refreshFailureReason>
<executionType>Hbpo</executionType>
<lastIncrementalSyncDate>""</lastIncrementalSyncDate>
<uploadStatus>Completed</uploadStatus>
<isIncrementalSyncEnabled>false</isIncrementalSyncEnabled>
<hasIncrementalSyncFailed>false</hasIncrementalSyncFailed>
</DecisionTable>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Sample DT Package</fullName>
<description>Package created for md-common tests</description>
<types>
<members>Sample_DT</members>
<name>DecisionTable</name>
</types>
<types>
<members>DSL_Sample</members>
<members>Sample_DT_Default</members>
<name>DecisionTableDatasetLink</name>
</types>
<version>51.0</version>
</Package>