After July 2021, the 2.3.x release line no longer received quality updates or user guide updates. PHP 7.3 reached end of support in December 2021, and Adobe Commerce 2.3.x reached end of support in September 2022. We strongly recommend upgrading to Adobe Commerce 2.4.x to help maintain PCI compliance.

Adding Predefined Variables

This site contains archived merchant documentation for a version of Adobe Commerce and Magento Open Source that has reached end-of-support. The documentation available here is intended for historical reference only and is not maintained. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.

Predefined variables make it easy to personalize email and newsletter templates, as well as other types of content. The list of allowed predefined variables appears when you click the Insert Variable button. As shown in the following image, the list of available variables for a specific email template is determined by the data that is associated with the template. See the Variable Reference for a list of frequently-used email templates and their associated variables.

Predefined Variables for Email Template

Add a variable to an email template

  1. On the Admin sidebar, go to Marketing > Communications > Email Templates.

  2. Do one of the following:

    • To add the variable to an existing template, click the template in the list to open in edit mode.

    • To use the variable in a new template, click Add New Template and customize the default template code. See Message Templates.

  3. For a list of the predefined variables that can be used with this email template, click Insert Variable.

    Determine which variable you want to insert into the template. Then, click Close (x) in the upper-right corner. (You will return to this later.)

  4. To see a mock-up of the template, click Preview Template in the button bar.

    When the preview opens in a new tab, determine where you want to place the variable in relation to the other content. Then return to the original tab to continue.

    Preview Template

  5. In the Template Content box, position the insertion point where you want the variable to appear and click Insert Variable.

  6. In the list of available variables, click the one that you want to insert into the template.

    In this example, the Order Items Grid variable is added to the template.

    Email Template Content

  7. When complete, click Save Template.