Newer Version Available

This content describes an older version of this product. View Latest

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 Description
collectOperator
Field Type
DecisionTable​CollectOperator (enumeration of type string)
Description
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
Field Type
string
Description
Logic that's used to decide how the input fields are processed.
conditionType
Field Type
DecisionTable​ConditionType (enumeration of type string)
Description
Condition logic that's used for input fields.

Valid values are:

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

Valid values are:

  • ContextDefinition
  • CsvUpload
  • MultipleSobjects
  • SingleSobject
decisionTable​Parameters
Field Type
DecisionTableParameter[]
Description
Parameters that you specify in a decision table.
decisionTable​SourceCriterias
Field Type
DecisionTableSourceCriteria[]
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
Field Type
string
Description
Description of the decision table.
doesConsider​NullValue
Field Type
boolean
Description
Indicates whether a column that has a null value is considered for lookup (true) or not (false). The default value is false.
downloadStatus
Field Type
DecisionTableDownloadStatus (enumeration of type string)
Description
Specifies the progress status of a CSV download from a CSV-based lookup table. Available in API version 64.0 and later.

Valid values are:

  • Completed
  • DownloadInProgress
  • Failed
executionType
Field Type
DecisionTableExecutionType (enumeration of type string)
Description
Indicates the backing storage for the Decision Table.

Valid values are:

  • Dmo
  • Hbase
  • Hbpo
  • Solr
  • Soql

Execution type of Hbase must be passed in all caps (HBASE) in POST and PATCH calls.

filterResultBy
Field Type
DecisionTableHitPolicy (enumeration of type string)
Description
Specifies how the results of a decision table are filtered if a set of inputs returns multiple matching outputs.

Valid values are:

  • AnyValue
  • CollectOperator
  • FirstMatch
  • OutputOrder
  • Priority
  • RuleOrder
  • UniqueValues
hasIncremental​SyncFailed
Field Type
boolean
Description
Indicates if the last incremental refresh failed.
isIncremental​SyncEnabled
Field Type
boolean
Description
Indicates if incremental refresh is enabled for the Decision Table.
lastIncremental​SyncDate
Field Type
string
Description
The date and time on which the last incremental refresh occured for the decision table.
lastSyncDate
Field Type
string
Description
Latest date on which the decision table was refreshed.
refresh​FailureReason
Field Type
string
Description
Reason why the refresh of the decision table data failed.
refreshStatus
Field Type
DecisionTableRefreshStatus (enumeration of type string)
Description
Specifies the refresh status of the cached data in the decision table.

Valid values are:

  • Completed
  • Failed
  • InProgress
  • Initiated
setupName
Field Type
string
Description

Required. Name of the decision table, which appears in Salesforce Setup.

sourceCondition​Logic
Field Type
string
Description
The condition logic that's used to define the decision table from the source data.
sourceObject
Field Type
string
Description

Required. Object that contains the rules based on which the decision table must provide outcomes.

status
Field Type
DecisionTableStatus (enumeration of type string)
Description

Required. Status of the decision table.

Valid values are:

  • ActivationInProgress
  • Active
  • Draft
  • Inactive
type
Field Type
DecisionTableType (enumeration of type string)
Description
Stores the type of decision table.

Valid values are:

  • Advanced
  • HighScaleExecution
  • HighVolume
  • LowVolume
  • MediumVolume
  • RealTime
uploadStatus
Field Type
DecisionTableUploadStatus (enumeration of type string)
Description
Specifies the progress status of the CSV upload for a CSV based Lookup table.

Valid values are:

  • Completed
  • CompletedWithErrors
  • Failed
  • UploadInProgress
usageType
Field Type
ExpsSetProcessType (enumeration of type string)
Description
Type of industry or the application within the industry that's using a decision table.

Valid values are:

  • 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

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.

DecisionTableParameter

Represents an input or output field of a decision table.

Field Name Description
dataType
Field Type
DTParameterDataType (enumeration of type string)
Description
The data type of the field used in a decision table.

Valid values are:

  • Boolean
  • Currency
  • Date
  • DateTime
  • Number
  • Percent
  • String
decimalScale
Field Type
int
Description
The number of digits to the right of the decimal point.
domainObject
Field Type
string
Description
For polymorhpic fields, indicates the domain object in the field hierarchy.
fieldName
Field Type
string
Description

Required. API name of the fields that selected as an input or output for the decision table.

fieldPath
Field Type
string
Description
The path of the field used in a decision table in relation to the object that the field belongs to.
isGroup​ByField
Field Type
boolean
Description
Indicates whether an input field is used to group the business rules of the decision table.
isPriority​Field
Field Type
boolean
Description
Indicates whether a field is given priority.
isRequired
Field Type
boolean
Description
Indicates whether a field is required to be used for lookups.
length
Field Type
int
Description
The maximum number of characters supported for a field that's used in a decision table.
operator
Field Type
DecisionTableOperator (enumeration of type string)
Description
Operator used for the input field.

Valid values are:

  • Contains
  • DoesNotExistIn
  • DoesNotMatch
  • Equals
  • ExistsIn
  • GreaterOrEqual
  • GreaterThan
  • IsNotNull
  • IsNull
  • LessOrEqual
  • LessThan
  • Matches
  • NotEquals
sequence
Field Type
int
Description
The sequence in which input fields are processed. This field is available in API version 52.0 and later.
sortType
Field Type
DecisionTableSortType (enumeration of type string)
Description
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
usage
Field Type
DecisionTableParameterType (enumeration of type string)
Description

Required. Usage type of a field.

Valid values are:

  • INPUT
  • OUTPUT
  • ROWCRITERIA

DecisionTableSourceCriteria

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.

Field Name Description
operator
Field Type
DTSourceCriteriaOperator (enumeration of type string)
Description

Required. The operator that’s applied to an associated decision table’s field to filter the data.

Valid values are:

  • Contains
  • DoesNotExistIn
  • DoesNotMatch
  • Equals
  • ExistsIn
  • GreaterOrEqual
  • GreaterThan
  • IsNotNull
  • IsNull
  • LessOrEqual
  • LessThan
  • Matches
  • NotEquals
sequenceNumber
Field Type
int
Description

Required. The sequence number used in the associated decision table's source condition logic.

sourceField​Name
Field Type
string
Description

Required. The name of the field that's used in the decision table.

value
Field Type
string
Description
The value that’s expected in the source field used in the decision table.
valueType
Field Type
DTSourceCriteriaValueType (enumeration of type string)
Description

Required. The type of the value that’s used to filter the source data.

Valid values are:

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