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 Metadata and inherits its fields.

File Suffix and Directory Location 

DecisionTable components have the suffix .decisionTable and are stored in the decisionTables folder.

Version 

Introduced in API version 51.0.

Special Access Rules 

To use this metadata type, your Salesforce org must have the Loyalty Management or the Rebate Management license.

Fields 

additionalAttribute 

  • Type: string
  • Required: No

collectOperator 

  • Type: DecisionTableCollectOperator (enumeration of type string)
  • Required: No
  • Description: Specifies the operator that’s used when the result is filtered by the Collect operator.
  • Possible values:
    • Count
    • Maximum
    • Minimum
    • None
    • Sum

conditionCriteria 

  • Type: string
  • Required: No
  • Description: Logic that’s used to decide how the input fields are processed.

conditionType 

  • Type: DecisionTableConditionType (enumeration of type string)
  • Required: No
  • Description: Condition logic that’s used for input fields.
  • Possible values:
    • All
    • Any
    • Custom

dataSourceType 

  • Type: DecisionTableDataSourceType (enumeration of type string)
  • Required: No
  • Description: Specifies the type of data source that’s used to create a decision table.
  • Possible values:
    • ContextDefinition
    • CsvUpload
    • MultipleSobjects
    • SingleSobject

dataSpaceName 

  • Type: string
  • Required: No

decisionTableFileImportVersions 

  • Type: DecisionTableFileImportVersion[]
  • Required: No
  • Description: Versions of the decision table that were imported from a CSV file. Each version captures a separate import iteration with its own activation window, rank, and refresh status.

decisionTableParameters 

decisionTableSourceCriterias 

  • Type: DecisionTableSourceCriteria[]
  • Required: No
  • Description: The fields and values from a data source that are used to define the condition logic of the data that’s used in a decision table.

description 

  • Type: string
  • Required: No
  • Description: Description of the decision table.

doesConsiderNullValue 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a column that has a null value is considered for lookup (true) or not (false). The default value is false.

downloadStatus 

  • Type: DecisionTableDownloadStatus (enumeration of type string)
  • Required: No
  • Introduced: API version 64.0
  • Description: Specifies the progress status of a CSV download from a CSV-based lookup table.
  • Possible values:
    • Completed
    • DownloadInProgress
    • Failed

dtRowLevelOverrideType 

  • Type: DTRowLevelOverrideType (enumeration of type string)
  • Required: No

executionType 

  • Type: DecisionTableExecutionType (enumeration of type string)
  • Required: No
  • Description: Indicates the backing storage for the Decision Table.
  • Possible values:
    • DLO — Available in API version 67.0 and later. Replaces DMO.
    • HBASE
    • HBPO
    • SOLR
    • SOQL

filterResultBy 

  • Type: DecisionTableHitPolicy (enumeration of type string)
  • Required: No
  • Description: Specifies how the results of a decision table are filtered if a set of inputs returns multiple matching outputs.
  • Possible values:
    • AnyValue
    • CollectOperator
    • FirstMatch
    • OutputOrder
    • Priority
    • RuleOrder
    • UniqueValues

hasIncrementalSyncFailed 

  • Type: boolean
  • Required: No
  • Description: Indicates if the last incremental refresh failed.

isBestFitEnabled 

  • Type: boolean
  • Required: No

isIncrementalSyncEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates if incremental refresh is enabled for the Decision Table.

isVersioned 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the CSV based decision table supports multiple file-import versions (true) or not (false). When set to true, the decisionTableFileImportVersions collection captures each version. The default value is true.

lastIncrementalSyncDate 

  • Type: string
  • Required: No
  • Description: The date and time on which the last incremental refresh occured for the decision table.

lastSyncDate 

  • Type: string
  • Required: No
  • Description: Latest date on which the decision table was refreshed.

refreshFailureReason 

  • Type: string
  • Required: No
  • Description: Reason why the refresh of the decision table data failed.

refreshStatus 

  • Type: DecisionTableRefreshStatus (enumeration of type string)
  • Required: No
  • Description: Specifies the refresh status of the cached data in the decision table.
  • Possible values:
    • Completed
    • CompletedWithWarnings — Available in API version 67.0 and later.
    • Failed
    • InProgress
    • Initiated

setupName 

  • Type: string
  • Required: Yes
  • Description: Required. Name of the decision table, which appears in Salesforce Setup.

sourceConditionLogic 

  • Type: string
  • Required: No
  • Description: The condition logic that’s used to define the decision table from the source data.

sourceObject 

  • Type: string
  • Required: Yes
  • Description: Required. Object that contains the rules based on which the decision table must provide outcomes.

status 

  • Type: DecisionTableStatus (enumeration of type string)
  • Required: Yes
  • Description: Required. Status of the decision table.
  • Possible values:
    • ActivationInProgress
    • Active
    • Draft
    • Inactive

type 

  • Type: DecisionTableType (enumeration of type string)
  • Required: No
  • Description: Stores the type of decision table.
  • Possible values:
    • Advanced
    • HighScaleExecution
    • HighVolume
    • LowVolume
    • MediumVolume
    • RealTime

uploadStatus 

  • Type: DecisionTableUploadStatus (enumeration of type string)
  • Required: No
  • Description: Specifies the progress status of the CSV upload for a CSV based Lookup table.
  • Possible values:
    • Completed
    • CompletedWithErrors
    • Failed
    • UploadInProgress

usageType 

  • Type: ExpsSetProcessType (enumeration of type string)

  • Required: No

  • Description: Type of industry or the application within the industry that’s using a decision table.

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

  • Possible values:

    • Bre
    • ComplianceControl
    • DecompositionEnrichmentMapping
    • DefaultPricing
    • DefaultRating
    • EventOrchestration
    • FinancialServicesCloud
    • FulfillmentCondition
    • GpaCalculation
    • InsuranceClaimProcessing — Available in API version 65.0 and later.
    • ItServiceManagement — Available in API version 65.0 and later.
    • PlanCostCalculation
    • PriceProtection
    • PricingDiscovery
    • ProductCategoryQualification
    • ProductQualification
    • RatingDiscovery
    • RecordAlert
    • ShipAndDebit
    • StudentInformationSystem — Available in API version 65.0 and later.
    • StudentSuccess
    • TestProcess
    • WarrantyClaim

DecisionTableFileImportVersion Type 

Represents a version of a CSV file-import for a CSV-based decision table. Each version captures a separate import iteration with its own activation window, rank, and refresh status.

Version 

Introduced in API version 67.0.

Fields 

endDate 

  • Type: string
  • Required: No
  • Description: The date and time when the decision table version becomes inactive.

lastIncrementalSyncDate 

  • Type: string
  • Required: No
  • Description: The date and time on which the last incremental refresh occured for the decision table version.

lastSyncDate 

  • Type: string
  • Required: No
  • Description: The date and time on which the last refresh occured for the decision table version.

rank 

  • Type: int
  • Required: Yes
  • Description: Required.

refreshFailedReason 

  • Type: string
  • Required: No
  • Description: The reason the most recent refresh of the decision table version data failed.

refreshStatus 

  • Type: DecisionTableRefreshStatus (enumeration of type string)
  • Required: No
  • Description: Specifies the refresh status of the cached data in the decision table version.
  • Possible values:
    • Completed
    • CompletedWithWarnings
    • Failed
    • InProgress
    • Initiated

startDate 

  • Type: string
  • Required: Yes
  • Description: Required.

uploadStatus 

  • Type: DecisionTableUploadStatus (enumeration of type string)
  • Required: No
  • Description: Specifies the progress status of the CSV upload for the decision table version.
  • Possible values:
    • Completed
    • CompletedWithErrors
    • Failed
    • UploadInProgress

versionName 

  • Type: string
  • Required: Yes
  • Description: Required.

versionNumber 

  • Type: int
  • Required: Yes
  • Description: Required.

versionStatus 

  • Type: DecisionTableStatus (enumeration of type string)
  • Required: Yes
  • Description: Required.

DecisionTableParameter Type 

Represents an input or output field of a decision table.

Fields 

dataType 

  • Type: DTParameterDataType (enumeration of type string)
  • Required: No
  • Description: The data type of the field used in a decision table.
  • Possible values:
    • Boolean
    • Currency
    • Date
    • DateTime
    • Number
    • Percent
    • String

decimalScale 

  • Type: int
  • Required: No
  • Description: The number of digits to the right of the decimal point.

domainObject 

  • Type: string
  • Required: No
  • Description: For polymorhpic fields, indicates the domain object in the field hierarchy.

fieldName 

  • Type: string
  • Required: Yes
  • Description: Required. API name of the fields that selected as an input or output for the decision table.

fieldPath 

  • Type: string
  • Required: No
  • Description: The path of the field used in a decision table in relation to the object that the field belongs to.

isGroupByField 

  • Type: boolean
  • Required: No
  • Description: Indicates whether an input field is used to group the business rules of the decision table.

isPriorityField 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a field is given priority.

isRequired 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a field is required to be used for lookups.

length 

  • Type: int
  • Required: No
  • Description: The maximum number of characters supported for a field that’s used in a decision table.

operator 

  • Type: DecisionTableOperator (enumeration of type string)
  • Required: No
  • Description: Operator used for the input field.
  • Possible values:
    • Contains
    • DoesNotExistIn
    • DoesNotMatch
    • Equals
    • ExistsIn
    • GreaterOrEqual
    • GreaterThan
    • IsNotNull
    • IsNull
    • LessOrEqual
    • LessThan
    • Matches
    • NotEquals

sequence 

  • Type: int
  • Required: No
  • Introduced: API version 52.0
  • Description: The sequence in which input fields are processed.

sortType 

  • Type: DecisionTableSortType (enumeration of type string)
  • Required: No
  • Introduced: API version 56.0
  • Description: Sort outputs of a decision table based on the values of the input or output parameter field.
  • Possible values:
    • AscNullFirst
    • AscNullLast
    • DescNullFirst
    • DescNullLast
    • None

usage 

  • Type: DecisionTableParameterType (enumeration of type string)
  • Required: Yes
  • Description: Required. Usage type of a field.
  • Possible values:
    • INPUT
    • OUTPUT
    • ROWCRITERIA

DecisionTableSourceCriteria Type 

Represents the fields and values from a data source that are used to define the condition logic of the data that’s used in a decision table.

Fields 

operator 

  • Type: DTSourceCriteriaOperator (enumeration of type string)
  • Required: Yes
  • Description: Required. The operator that’s applied to an associated decision table’s field to filter the data.
  • Possible values:
    • Contains
    • DoesNotExistIn
    • DoesNotMatch
    • Equals
    • ExistsIn
    • GreaterOrEqual
    • GreaterThan
    • IsNotNull
    • IsNull
    • LessOrEqual
    • LessThan
    • Matches
    • NotEquals

sequenceNumber 

  • Type: int
  • Required: Yes
  • Description: Required. The sequence number used in the associated decision table’s source condition logic.

sourceFieldName 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the field that’s used in the decision table.

value 

  • Type: string
  • Required: No
  • Description: The value that’s expected in the source field used in the decision table.

valueType 

  • Type: DTSourceCriteriaValueType (enumeration of type string)
  • Required: Yes
  • Description: Required. The type of the value that’s used to filter the source data.
  • Possible values:
    • Formula
    • Literal
    • Lookup
    • Parameter
    • Picklist

Declarative Metadata Sample Definition 

The following is an example of a DecisionTable component.

1<?xml version="1.0" encoding="UTF-8"?>
2<DecisionTable xmlns="http://soap.sforce.com/2006/04/metadata">
3    <collectOperator>None</collectOperator>
4    <conditionCriteria>1 and 2 and 3 and 4</conditionCriteria>
5    <conditionType>All</conditionType>
6    <dataSourceType>SingleSobject</dataSourceType>
7    <decisionTableParameters>
8        <fieldName>IsDeleted</fieldName>
9        <operator>Equals</operator>
10        <usage>INPUT</usage>
11        <sequence>1</sequence>
12        <isGroupByField>true</isGroupByField>
13        <sortType>AscNullFirst</sortType>
14        <dataType>Number</dataType>
15        <fieldPath>AccountFeed.CommentsCount</fieldPath>
16        <domainObject>AccountFeed</domainObject>
17        <isPriorityField>false</isPriorityField>
18        <decimalScale>2</decimalScale>
19        <length>14</length>
20        <isRequired>false</isRequired>
21    </decisionTableParameters>
22    <decisionTableParameters>
23        <fieldName>IsActive</fieldName>
24        <usage>OUTPUT</usage>
25    </decisionTableParameters>
26    <decisionTableParameters>
27        <fieldName>LimitNumber</fieldName>
28        <operator>Equals</operator>
29        <usage>INPUT</usage>
30        <sequence>2</sequence>
31        <isGroupByField>false</isGroupByField>
32    </decisionTableParameters>
33    <decisionTableParameters>
34        <fieldName>LimitStartDate</fieldName>
35        <usage>OUTPUT</usage>
36    </decisionTableParameters>
37    <decisionTableParameters>
38        <fieldName>GivenBadgeCount</fieldName>
39        <operator>Equals</operator>
40        <usage>INPUT</usage>
41        <sequence>3</sequence>
42        <isGroupByField>false</isGroupByField>
43    </decisionTableParameters>
44    <decisionTableParameters>
45        <fieldName>Name</fieldName>
46        <operator>Equals</operator>
47        <usage>INPUT</usage>
48        <sequence>4</sequence>
49        <isGroupByField>false</isGroupByField>
50    </decisionTableParameters>
51    <decisionTableSourceCriterias>
52        <sourceFieldName>IsDeleted</sourceFieldName>
53        <operator>Equals</operator>
54        <value>false</value>
55        <sequenceNumber>1</sequenceNumber>
56        <valueType>Literal</valueType>
57    </decisionTableSourceCriterias>
58    <description>Sample DT created for md-common tests</description>
59    <filterResultBy>UniqueValues</filterResultBy>
60    <setupName>Sample DT</setupName>
61    <sourceObject>WorkBadgeDefinition</sourceObject>
62    <sourceConditionLogic>1</sourceConditionLogic>
63    <status>Draft</status>
64    <type>LowVolume</type>
65    <usageType>Bre</usageType>
66    <doesConsiderNullValue>false</doesConsiderNullValue>
67    <refreshStatus>Failed</refreshStatus>
68    <refreshFailureReason>Failed due to limit violation.</refreshFailureReason>
69    <executionType>Hbpo</executionType>
70    <lastIncrementalSyncDate>""</lastIncrementalSyncDate>
71    <uploadStatus>Completed</uploadStatus>
72    <isIncrementalSyncEnabled>false</isIncrementalSyncEnabled>
73    <hasIncrementalSyncFailed>false</hasIncrementalSyncFailed>
74</DecisionTable>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3   <fullName>Sample DT Package</fullName>
4   <description>Package created for md-common tests</description>
5   <types>
6      <members>Sample_DT</members>
7      <name>DecisionTable</name>
8   </types>
9   <types>
10      <members>DSL_Sample</members>
11      <members>Sample_DT_Default</members>
12      <name>DecisionTableDatasetLink</name>
13   </types>
14   <version></version>
15</Package>