Leverage expression fragments

Last update: 2023-11-28
  • Created for:
  • Intermediate

When using the Expression editor, you can leverage all the expression fragments that have been created or saved to the current sandbox.

Learn how to create and manage fragments in this section.

➡️ Learn how to manage, author and use fragments in this video

Use an expression fragment

To add expression fragments to your content, follow the steps below.

  1. Open the Expression editor and select the Fragments button on the left pane.

    The list displays all the expression fragments that have been created or saved as fragments on the current sandbox. Learn more


    Fragments are sorted by creation date: recently added expression fragments are shown first in the list.

  2. You can also refresh the list.


    If some fragments were modified or added while you are editing your content, the list will be updated with the latest changes.

  3. Click the + icon next to an expression fragment to insert the corresponding fragment ID into the editor.

    Once the fragment ID has been added, if you open the corresponding expression fragment and edit it from the interface, the changes are synchronized. They are automatically propagated to all Draft journeys/campaigns containing that fragment ID.


    The changes are not propagated to content used in Live journeys or campaigns.

  4. Click the More actions button next to a fragment.

  5. From the contextual menu that opens, select View fragment to get more information about that fragment. The Fragment ID is also displayed and can be copied from here.

  6. You can open the expression fragment in another window to edit its content and properties - either using the Open fragment option in the contextual menu or from the Fragment info pane. Learn how to edit a fragment

  7. You can then customize and validate your content as usual using all the personalization and authoring capabilities of the Expression editor.


If you create an expression fragment that contains multiple line breaks and use it in SMS or push content, the line breaks are preserved. Thus make sure to test your SMS or push messsage before sending it.

Break inheritance

When adding a fragment ID to the Expression editor, the changes made to the original expression fragment are synchronized.

However, you can also paste the content of an expression fragment into the editor. From the contextual menu, select Paste fragment to insert that content.

In that case, the inheritance from the original fragment is broken. The content of the fragment is copied into the editor, and the changes are not synchronized anymore.

It becomes a standalone element that is no longer linked to the original fragment; you can edit it as any other element in your code.

On this page