HomeGuides
Submit Documentation FeedbackJoin Developer CommunityLog In

Creating and editing email templates

In most circumstances, email templates are created during the initial implementation and setup of B2B Commerce Cloud. However, on occasion, users may need to create a new email template or edit an existing template. It is important to understand that there are two types of scenarios where email templates are used: auto-generated and subscription-based. Auto-generated emails do not have an associated email list, as they are system generated and sent to the appropriate users based on the event, that is Admin_AccoutActivation or OrderConfirmation. Subscription based emails require an associated email list, as they are sent only to those users identified within the list. Therefore, prior to getting started, review the Email Subscriptions article, as it is helpful to understand how subscribers are managed within email lists.

Creating email templates

By default, email templates are only exposed in the Email Template list after they have been triggered during an event on the website. For example, the OrderConfirmation template would only display after the first order has been submitted. After implementation, some templates will be exposed as a result of testing. However, as a website administrator, it is possible to manually generate any missing email templates and not wait for the system to create one during the course of operations. As a technical side note, DotLiquid is used to render the views of all email templates.

πŸ“˜

Note

If you have old email templates from a previous version of B2B Commerce Cloud (4.2 and prior), they will need to be either deleted or renamed, which will force the generation of updated templates using DotLiquid, rather than Razor. These new templates can be used as guides for how to correctly format the templates using DotLiquid. Any existing email templates will then need to be converted to use the DotLiquid format.

Steps to manually generate an email template

  1. Go to Admin Console > Marketing > Communications > Email Templates.

  2. Click Add Email Template.

  3. Select the desired template from the Template menu.

  4. Select which websites can use the template from the Website menu.

  5. Click Create.

  6. If New Template was selected from the menu in the Template field, the New Template screen will be displayed. Enter the template name, description, targeted websites and click Save. Then continue on to the Editing an Email Template section below, starting with step 3.

Editing an email template

It is possible that not all available email templates will be exposed via the Admin Console, as they first need to have been triggered by the qualifying activity. For example, the Order Confirmation template would only be shown after an order has been completed and the email has been sent. However, typically most templates will have been tested and triggered during the implementation phase of B2B Commerce Cloud and therefore exposed in the Admin Console.

  1. Go to Admin Console > Marketing > Email Templates.
  2. Click Edit for desired template.
  3. Click Create Revision to edit the HTML. Do not modify the variables in the HTML code. Refer to the HTML Variables for Email Templates for additional information.
  4. Click Save after the changes have been made.
  5. Click Publish.
  6. Choose when the content should be published and then click Publish.

Creating an email list and assigning subscribers

If the newly created template is intended for email subscribers, a new Email List may need to be created if existing one does not fit the use case.

  1. Go to Admin Console > Marketing > Communication > Email Lists.

  2. Click Add Email List.

  3. On the Details finger tab populate the Name, Description, select the desired Email Template, Subject, and From Address.

  4. Click Save.

    πŸ“˜

    Note

    The Manage Subscribers finger tab can only be accessed after the new Email List has been saved- only the Name field is required to save the list.

    Go to the Manage Subscribers finger tab.

  5. Click Assign Email to Subscribers to add desired emails to the list.

    πŸ“˜

    Note

    This list is populated when users click the Subscribe radio button found on the website under MyAccount>Account Settings.

  6. Select the Email Addresses to be added to the subscription.

  7. Click the Assign and click Done.


Did this page help you?