Customizing your automated emails

Change the emails your customers receive automatically

Last updated:

What email templates are

Common Ground uses templates to build the emails sent to your customers, such as order confirmations or shipping notifications. Each template controls the layout and the text of one email.

You find them in the Backoffice under Preferences > Templates, in the Automated emails & PDF tab.

Every type of email comes with a Default template made by Common Ground. You can add your own templates next to it. Only one template per type is used at a time: it is marked In use.


Available email templates

  • Order email receipt: the confirmation email your customer receives for an order.

  • Invoice email receipt: the email that sends an invoice to your customer.

  • Message email receipt: the email notification your customer receives when you send them a message from an order.

  • Shipping email receipt: the email your customer receives when their order ships.

  • Back in stock receipt: the email sent when an item on a customer's Wants is available again (see Back in stock email notifications).

  • Account creation: the welcome email a customer receives when their Eshop account is created.

Note: our shop's name, logo and social network links are added to these emails automatically. The Default templates are also translated automatically into the language set in Select a default outgoing emails language, under Preferences > Account information.


Viewing a template

  • Open the ⋯ menu next to a template.

  • Click View.

A preview of the email opens, filled with sample order data. Click Reload to refresh it.


Creating your own template

  • Click + next to the email you want to change, for example Order email receipt.

  • In the Create a template window, enter a title and click Submit.

  • The template editor opens with a copy of the Default template: you start from the current email, not from a blank page. The code is on the left and the Live preview on the right.

  • Make your changes, then click Reload above the preview to see the result. The preview doesn't update on its own while you type.

  • Click Save.

Your template is created as soon as you click Submit, and appears under the Default one. It is not used yet.


Using your template

  • Open the ⋯ menu next to your template.

  • Click Use.

Your template is now marked In use, and Common Ground uses it for every email of that type. To go back to the Common Ground version, open the ⋯ menu next to Default and click Use.


Editing a template safely

Templates are written in code (Pug and CSS). You don't need to know how to code to change a sentence, but a small mistake can break the layout of the email.

Note: Before you start, only change the text, keep the structure of the lines around it, and click Reload to check the preview after each change. If the preview doesn't change after a Reload, there is probably an error in the code: undo your last change.

Example: adding a thank-you message to the order confirmation email

  • Create a new Order email receipt template, for example "Order confirmation with thank-you note".

  • In the editor, find the line that starts with h1.textAlignCenter #{translate("thanksForYourOrder")}. Two lines below it, there is a line that ends with ##{order.id}.

  • Click at the end of the ##{order.id} line and press Enter.

  • Type spaces until your cursor is right below the h of h1, then type p followed by a space and your text. For example: p Thank you for supporting your local record shop! Your order will be ready within 2 business days.

  • Click Reload: your message appears under the order number. Then click Save.

  • Go back to the templates, open the ⋯ menu next to your template and click Use.

From now on, every order confirmation email includes your message.


Managing your templates

From the ⋯ menu next to one of your templates, you can:

  • View it.

  • Edit it: open it again in the editor.

  • Use it: make it the template in use.

  • Delete it.

Note: You can't delete a template while it is in use: its menu only shows View and Edit. Switch back to Default or to another template first.

The Default templates can be viewed and used, but not edited or deleted.

Was this article helpful?