DecisionTable

Represents the information about a decision table.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

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 DecisionTable​CollectOperator (enumeration of type string) Specifies the operator that's used when the result is filtered by the Collect operator.

Valid values are:

  • Count
  • Maximum
  • Minimum
  • None
  • Sum
condition​Criteria string Logic that's used to decide how the input fields are processed.
conditionType DecisionTable​ConditionType (enumeration of type string) Condition logic that's used for input fields.

Valid values are:

  • All
  • Any
  • Custom
dataSource​Type DecisionTable​DataSourceType (enumeration of type string) Required. Specifies the type of data source that's used to create a decision table.

Valid values are:

  • CsvUpload
  • MultipleSobjects
  • SingleSobject
decisionTable​Parameters DecisionTableParameter[] Required. Parameters that you specify in a decision table.
description string Description of the decision table.
doesConside​rNullValue boolean Indicates whether a column that has a null value is considered for lookup (true) or not (false). The default value is false.
executionType DecisionTable​executionType (enumeration of type string) Indicates the backing storage for the Decision Table.

Valid values are:

  • Hbase
  • Soql
filterResultBy DecisionTable​HitPolicy (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:

  • AnyValue
  • FirstMatch
  • OutputOrder
hasIncrementalSyncFailed boolean Indicates if the last incremental refresh failed.
isIncrementalSyncEnabled boolean Indicates if incremental refresh is enabled for the Decision Table.
lastSync​Date string Required. Latest date on which the decision table was refreshed.
refresh​FailureReason string Reason why the refresh of the decision table data failed.
refreshStatus DecisionTable​RefreshStatus (enumeration of type string) Specifies the refresh status of the cached data in the decision table.

Valid values are:

  • Completed
  • Failed
  • InProgress
  • Initiated
setup​Name 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 DecisionTable​Status (enumeration of type string) Required. Status of the decision table.

Valid values are:

  • Draft
  • Inactive
  • Active
  • ActivationInProgress
type DecisionTableType​Operator (enumeration of type string) Required. Stores the type of decision table.

Valid values are:

  • Advanced
  • High Volume
  • Low Volume
  • Medium Volume
  • High-Scale Execution
usageType ExpsSet​ProcessType (enumeration of type string) Type of industry or the application within the industry that's using a decision table.

Valid values are:

  • Bre

    When Business Rules Engine is enabled for a Salesforce instance, the default value is 'Bre’. Other usage types may be available to you depending on your industry solution and permission sets.

    Note

  • GpaCalculation
  • PlanCostCalculation
  • RatingDiscovery
  • StudentSuccess

DecisionTableParameters

Represents an input or output field of a decision table.

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:
  • Boolean
  • Currency
  • Date
  • Number
  • Percent
  • String
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 DecisionTable​Operator (enumeration of type string) Required. Operator used for the input field. Valid values are:
  • Contains
  • DoesNotExistIn
  • DoesNotMatch
  • Equals
  • ExistsIn
  • GreaterOrEqual
  • GreaterThan
  • LessOrEqual
  • LessThan
  • Matches
  • NotEquals
sequence integer The sequence in which input fields are processed. This field is available in API version 52.0 and later.
sortType DecisionTable​SortType (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:

  • AscNullFirst
  • AscNullLast
  • DescNullFirst
  • DescNullLast
  • None
Outputs can’t be sorted based on picklist and multi-select picklist fields.
usage DecisionTable​ParameterType (enumeration of type string) Required. Usage type of a field.

The usage type can be one of the following values:

  • INPUT
  • OUTPUT

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>