DecisionMatrixDefinition defines a decision matrix and contains its versions. It controls the matrix's input and output columns, grouping dimensions, availability windows, and version-selection priority. Availability, status, and column structure belong to individual versions, not to a single shared structure on the parent definition.
ExpressionSetDefinition can reference a matrix through decisionTableName or lookupName, making the matrix part of a larger business-rule configuration. Keep the parent definition's identity separate from each contained version's identity and from the similarly named DecisionMatrixDefinition Tooling API entity.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
Identifies the parent definition. Each contained version also has its own fullName; these are separate identities. |
versions |
Contains the decision matrix versions. The array must contain at least one version. |
type |
Specifies the matrix type: Grouped or Standard. |
processType |
Identifies the process context. Supported values are Bre, GpaCalculation, InsuranceClaimProcessing, ItServiceManagement, PlanCostCalculation, RatingDiscovery, StudentInformationSystem, and StudentSuccess. |
groupKey, subGroupKey, groupKeyValue, subGroupKeyValue
|
The parent keys define grouping dimensions across versions. Each version supplies the corresponding values. For example, Country and State can correspond to United States and California. |
decisionMatrixDefinition |
On a contained version, links back to the parent DecisionMatrixDefinition. It is not a recursive matrix call. |
startDate, endDate
|
Set a version's availability window. startDate is required; endDate specifies when availability ends. Both use date-time values. |
status |
Required on each version. Allowed values are Active, Draft, Inactive, InvalidDraft, and Obsolete. |
rank |
Selects between multiple enabled versions that match a call and have overlapping availability windows. The highest rank wins. |
versionNumber |
Required integer identifying the version number. The documented overlap-selection rule uses rank, not this number. |
columns, columnType
|
Each version contains its own column definitions. Required columnType distinguishes Input from Output. |
dataType |
Required on each column. Allowed values are Boolean, Currency, Number, NumberRange, Percent, Text, and TextRange. |
rangeValue |
Holds a list of values defining range boundaries. Interpret it with the column's range data type. |
displaySequence |
Required integer specifying a column's position in column order. It does not determine version-selection priority. |
isWildcardColumn, wildcardValue
|
Required Boolean isWildcardColumn indicates whether the column stores a wildcard value and defaults to false. wildcardValue supplies the token; ALL is an example, not a documented default. |
Behavior and Constraints
Version availability and selection
Evaluate rank together with status, startDate, endDate, and the call's matching conditions. When more than one enabled version matches a matrix call and their availability windows overlap, Salesforce chooses the version with the highest rank. Rank alone does not make a version available.
Do not substitute column order or version numbering for this selection rule. displaySequence orders columns, while versionNumber identifies the version.
Grouping and column structure
The parent groupKey and subGroupKey describe dimensions used across versions. The version-level groupKeyValue and subGroupKeyValue identify the applicable group and subgroup. A dimension such as Country is not interchangeable with a value such as United States.
Because columns is nested under each version, the input/output contract is version-scoped: the selected version defines which inputs it accepts and which outputs it returns. Its column names, input/output roles, data types, range boundaries, and wildcard settings are not a shared column structure declared on the parent.
NumberRange and TextRange are supported data types, with rangeValue holding range boundaries. For wildcard columns, interpret isWildcardColumn and wildcardValue together; do not assume that every wildcard column uses ALL.
Process context and access
When Business Rules Engine is enabled, processType defaults to Bre. Availability of other process contexts depends on the industry solution and permission sets. A syntactically valid value therefore does not establish that the destination org can use that context.
A schema or client that exposes only Bre for processType does not expose the full supported value set. Do not treat that narrower enumeration as a platform restriction.
Deployment and Retrieval
DecisionMatrixDefinition components use the .decisionMatrixDefinition suffix and reside in the decisionMatrixDefinition folder. In package.xml, use DecisionMatrixDefinition as the metadata type name. The type supports the * wildcard for members. See Deploying and Retrieving Metadata with the Zip File.
Before deploying a matrix or a matrix version to a target org, review Salesforce's decision matrix migration considerations.
The definition must contain at least one version. The parent requires a label. Each version requires label, startDate, status, and versionNumber. Each column requires name, columnType, dataType, displaySequence, and isWildcardColumn, even though the documented default for the last field is false.
Keep the parent's fullName, each version's fullName, and the version's decisionMatrixDefinition link distinct. Identity changes can affect expression sets that reference the matrix through decisionTableName or lookupName. Those possible reference paths do not establish which expression sets actually use a particular matrix.
If deployment or recreation fails after deletion because the unique name cannot be reused, the residual-record condition described under Reported Issues is one reported cause. It is not a general rule that deleting matrix metadata reserves its name.
Relationships
The definition contains version and column structures. A contained version links back to its parent, while expression sets can reference the matrix as a business-rule dependency. The parent link is structural, not an invocation of another matrix.
References
-
DecisionMatrixDefinition:decisionMatrixDefinitionon a contained version links to the parent definition.
Referenced By
-
DecisionMatrixDefinition:decisionMatrixDefinition, through its contained versions. -
ExpressionSetDefinition:decisionTableName,lookupName.
Documentation Inconsistencies
The official field description calls decisionMatrixDefinition the full name of a decision matrix version. However, the documented example sets it to the parent definition's name, consistent with its reference to DecisionMatrixDefinition. Interpret it as the parent link and keep it separate from the contained version's own fullName.
Reported Issues
-
A deleted matrix's unique name reportedly remained unavailable for deployment and recreation. In a November 2024 Business Rules Engine report, an ordinary Salesforce Object Query Language (SOQL) query found no matching matrix, but creating or deploying one with the deleted name still failed. Creating a matrix with a different name succeeded; changing it back produced
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: Cannot update definition record. The reporter found a residual record in the similarly namedDecisionMatrixDefinitionTooling API entity, which was not visible in Object Manager. They reported resolving the problem by removing references and deleting that record through the Tooling API, using the Developer Console'sUse Tooling APIoption rather than ordinary Apex deletion. This was a reported residual-record condition, not proof that every metadata deletion reserves the name. See the unique-name reuse discussion.
Common Questions
Which decision matrix version runs when dates overlap?
Among enabled versions that match the call and have overlapping availability windows, the version with the highest rank is chosen. versionNumber and column displaySequence do not replace that rule.
Are decision matrix columns defined on the parent or on each version?
Columns are defined under each version's columns array. The input/output roles, data types, ranges, and wildcard settings are therefore version-scoped.
How do I include DecisionMatrixDefinition in package.xml?
Use DecisionMatrixDefinition as the type name. The type supports * for members, and its component files use the .decisionMatrixDefinition suffix in the decisionMatrixDefinition folder.
Why is a valid processType not enough to use the matrix in another org?
Availability of process contexts other than the Business Rules Engine default, Bre, depends on the destination org's industry solution and permission sets. A valid enumeration value alone does not establish access to that context.
Why can't I reuse a deleted decision matrix's unique name?
A November 2024 report traced this condition to a residual DecisionMatrixDefinition Tooling API record that an ordinary SOQL query had not found. The reporter removed references and deleted the residual record through the Tooling API. This is a reported cause, not a universal consequence of deleting a matrix.