Newer Version Available

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

DecisionTable

Represents the information about a decision table. 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
decisionTableParameters DecisionTableParameters Required. Parameters that you specify in a decision table.
description string Description of the decision table.
lastSyncDate string Required. Latest date on which the decision table was refreshed.
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:
  • Draft
  • Inactive
  • Active
  • ActivationInProgress

DecisionTableParameters

Represents an input or output field of a decision table.

Fields

Field Name Field Type Description
fieldName string Required. API name of the fields that selected as an input or output for the decision table.
operator DecisionTableOperator (enumeration of type string) Required. Operator used for the input field. Valid values are:
  • Equals
  • NotEquals
  • LessThan
  • LessOrEqual
  • GreaterThan
  • GreaterOrEqual
  • Matches
  • ExistsIn
  • DoesNotExistIn
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.

1<?xml version="1.0" encoding="UTF-8"?>
2<DecisionTable xmlns="http://soap.sforce.com/2006/04/metadata">
3   <decisionTableParameters>
4      <fieldName>IsDeleted</fieldName>
5      <operator>Equals</operator>
6      <usage>INPUT</usage>
7   </decisionTableParameters>
8   <decisionTableParameters>
9      <fieldName>IsActive</fieldName>
10      <usage>OUTPUT</usage>
11   </decisionTableParameters>
12   <decisionTableParameters>
13      <fieldName>LimitNumber</fieldName>
14      <operator>Equals</operator>
15      <usage>INPUT</usage>
16   </decisionTableParameters>
17   <decisionTableParameters>
18      <fieldName>LimitStartDate</fieldName>
19      <usage>OUTPUT</usage>
20   </decisionTableParameters>
21   <decisionTableParameters>
22      <fieldName>GivenBadgeCount</fieldName>
23      <operator>Equals</operator>
24      <usage>INPUT</usage>
25   </decisionTableParameters>
26   <decisionTableParameters>
27      <fieldName>Name</fieldName>
28      <operator>Equals</operator>
29      <usage>INPUT</usage>
30   </decisionTableParameters>
31   <description>Sample DT created for md-common tests</description>
32   <setupName>Sample DT</setupName>
33   <sourceObject>WorkBadgeDefinition</sourceObject>
34   <status>Draft</status>
35</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>51.0</version>
15</Package>