1.0.0
Create and manage expressions in Marketing Cloud Next. Expressions define conditional logic for content personalization and dynamic behavior.
This table lists the expression-related use cases that the API supports.
| Supported Use Case | HTTP Verb | URI |
|---|---|---|
| Create expression content | POST | /services/data/{apiVersion}/connect/cms/contents |
| Get expression content | GET | /services/data/{apiVersion}/connect/cms/contents/{contentId} |
| Update an expression content variant | PUT | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
| Delete an expression content variant | DELETE | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
Expressions define conditional logic for content personalization and dynamic behavior. They use a multi-level expression model with groups, rules, criteria, and sort configuration.
API Structure
Expression content uses the request structure shown in this example:
{
"contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
"contentType": "sfdc_cms__expression",
"contentBody": {
"expression": {
"definition": "sfdc_cms__multiLevelExpression",
"label": "My Expression",
"sfdcExpressionKey": "myExpression",
"expressionGroups": [...]
}
}
}
Expression Groups
Each expression group references a data resource and optionally applies filtering rules and sorting. Groups can reference other groups using merge-field syntax (for example, {!group0.Name__c}).
Group names must be unique within an expression (enforced by schema).
Expression Rules
Rules define filter criteria using one of three evaluation modes:
- AllCriteriaMatch — All criteria must be true (AND logic).
- AnyCriterionMatches — Any criterion can be true (OR logic).
- CustomLogicMatches — Custom formula like
1 AND 2 AND (3 OR 4).
Data Providers
Expressions are used within the sfdc_unifiedmarketing__common and sfdc_cms__email modules.
Content Properties
The Content object has the properties shown in this table.
| Property | Type | Description |
|---|---|---|
sfdc_cms:title |
string | Required. The name of the expression. |
expression |
object | Required. An object that defines the expression. |
sfdc_cms:description |
string | A description of the expression. |
lightning:dataProviders |
list | Data provider configurations for expression evaluation. |
The expression object has these properties.
| Property | Type | Description |
|---|---|---|
definition |
string | An identifier for the expression definition, such as sfdc_cms__multiLevelExpression. |
label |
string | A display label for the expression. |
sfdcExpressionKey |
string | A unique key used to refer to this expression in merge fields. |
default |
string | A default value when the expression resolves to no results. |
selectionIndex |
number or string | The index of the value to select from the result set. |
customFormula |
string | A custom logic formula, such as 1 AND 2 AND (3 OR 4). |
expressionGroups |
list | Required. An array of expression groups with resource, rule, and sort configurations. |
Handlebars Expression Support
Expression values support Handlebars-based personalization. See Handlebars for Marketing Cloud Next.
Let us know so we can improve!