---
schema_version: "1"
id: dfc66aab5c005605832f2cd6abecb7194d684cc97601f63c07270cc3d9f6f21a
title: Create an Expression for a Personalized Merge Field in Marketing Cloud Next
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mktg_content_expression_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mktg_content_expression_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6f7413bbd06b51330df62a7896e0d9e3ddeb45392c43f44ff348473183fe936f
description: Get more consistency and control over how data is referenced in your marketing content by saving personalized merge field criteria in an expression. Define filter and sort options across related data objects to select the right attribute for the merge field. Save the expression, including the references to those data objects, in Salesforce CMS. You can reuse the expression in email, SMS, MMS, RCS, WhatsApp, In-App, and Push messages.
products:
  - Marketing
release: "264"
---
# Create an Expression for a Personalized Merge Field in Marketing Cloud Next

Get more consistency and control over how data is referenced in your marketing content by saving personalized merge field criteria in an expression. Define filter and sort options across related data objects to select the right attribute for the merge field. Save the expression, including the references to those data objects, in Salesforce CMS. You can reuse the expression in email, SMS, MMS, RCS, WhatsApp, In-App, and Push messages.

### Required Editions

[View supported editions](https://help.salesforce.com/s/articleView?id=mktg.mktg_editions.htm&release=264.0.0&type=5 "Marketing Cloud Next is available in Growth and Advanced editions, and requires Salesforce Enterprise or Unlimited editions. Some features are limited by edition or purchased add-on. All functionality is available in Lightning Experience only.").

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d10800e52">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d10800e52 ">To create or edit content:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d10800e52 ">
              <p>Marketing Cloud Manager permission set </p>
              <p>AND</p>
              <p style="margin-bottom:0;">any CMS workspace contributor
                role</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d10800e52 ">To publish or unpublish content:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d10800e52 ">
              <p>Marketing Cloud Manager permission set </p>
              <p>AND</p>
              <p style="margin-bottom:0;">a CMS workspace contributor role
                of content admin or content manager</p>
            </td>

          </tr>
        </tbody>
      </table>

You must have a data graph set up to create an expression. See [Set Up Personalization Features for Marketing Cloud](https://help.salesforce.com/s/articleView?id=mktg.mktg_data_graph_setup.htm&type=5&language=en_US).

1. From the Content tab, open your marketing workspace.
2. Select **Add** | **Content** | **Expression**.
3. Give your expression a title for internal use.
4. Select a data source. Choose from available Inputs (Content Variables, Apex, Events, Activations) or Data sources (Data Graph, Salesforce Record, Offers, and others) depending on what data you want to use.
5. Navigate the resource path to select an attribute.
6. Add filter and sort conditions for the attribute.
7. To add another resource to narrow your expression results further, click the plus icon next to Resource and define the filter and sort conditions.
8. Save your work.
9. Open a message in a channel builder (Email, SMS, MMS, RCS, WhatsApp, In-App, or Push).
10. Position your cursor where you want to insert the personalized field, then type @ and select the published expression you want to insert.
11. Or, in the content side panel, click **Add Merge Field**.
12. In the merge field modal, configure your merge field details and select a display format. To preview merge field logic, select **View Merge Field Logic**.
13. The merge field appears in your content. At send time, it resolves to the configured attribute value.
14. To edit or remove a merge field, click the merge field value and select **Edit Field** or **Remove Merge Field**.
15. Save your changes and publish.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mktg_all-264-0-0-production-enus/e92be4e1-4bef-47a5-a11d-95f4ea1f7d7a/images/icon_example.png)

Example

This example shows building an expression with filter and sort conditions to find accounts with an annual revenue amount greater than $10,000.

![Example Filter and Sort Data window for creating an expression](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mktg_all-264-0-0-production-enus/e92be4e1-4bef-47a5-a11d-95f4ea1f7d7a/mktg_all/images/mktg_content_expressions.png)

To make your expression available for use in marketing content, you must publish it. To change the expression or to prevent it from being used in content, unpublish it.

#### See Also

- [Personalize Content with Merge Fields in Marketing Cloud Next](https://help.salesforce.com/s/articleView?id=mktg.mktg_content_personalization_merge_fields.htm&release=264.0.0&type=5 "Use merge fields to personalize your marketing content with customer data. For example, personalize an email with your customer's name or customize a landing page with products you know they're interested in.")