Building Apps
Quick Start
Guide
Tutorials
Building Channels
Quick Start
Guide
Tutorials
Building Headless Storefronts
Guide
Embedded Checkout
Next.js Commerce
Building Checkouts
Managing Currencies
Guide
Partner Information
Becoming A Partner
Getting Started
Staying Current with Platform Changes
POS Solutions
ERP Solutions
PIM Solutions
OMS Solutions
Marketing Solutions
Shipping Solutions
Payment Solutions

Email Templates Overview

This article provides and overview of BigCommerce’s transactional email templates and API.

Editing

To edit transactional email templates in a store’s control panel, log in and navigate to MarketingTransactional Emails.

Use handlebars expressions to localize email templates and access dynamic data (like a customer’s first name in an order email).

<!-- Combined Order Status Email Template -->

 <p>{{ lang 'hello' name=order.customer_name }}. Below are the products you ordered.</p>

{{#each order.products}}
<tr>
    <td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA"><strong>{{ name }}</strong></td>
    <td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA" width="100" align="center">{{#if sku }}{{ sku }}{{else}}&nbsp;{{/if}}</td>
    <td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA" width="100" align="center">{{ quantity }}</td>
</tr>
{{/each}}

Learn how to edit, test, and preview transactional email templates in the control panel.

API

To manage transactional email templates programmatically, use the Email Templates API. For example, to get a list of email templates, send a GET request to /v3/marketing/email-templates.

GET https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/marketing/email-templates
X-Auth-Token: {{ACCESS_TOKEN}}
Accept: application/json

Open in Request Runner

Response:

{
  "data": [
    {
      "type_id": "account_reset_password_email",
      "body": "<!DOCTYPE html> <html lang=\"en\"> <head>     <meta charset=\"UTF-8\">     <title>Title</title> </head> <body> <p>     {{lang \"reset_password\" name=store.name}} </p> <br/> <br/> <a href='{{account.reset_password_link}}'>     {{account.reset_password_link}} </a>  </body> </html>",
      "translations": [...],
      "subject": "Reset your password at {{store.name}}"
    }
  ],
  "meta": {...}
}

To update an email template, send a PUT request to /v3/marketing/email-templates/{template-name}.

PUT /stores/{{STORE_HASH}}/v3/marketing/email-templates/account_reset_password_email
Host: api.bigcommerce.com
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json

{
  "type_id": "account_reset_password_email",
  "body": "<!DOCTYPE html> <html lang=\"en\"> <head>     <meta charset=\"UTF-8\">     <title>Title</title> </head> <body> <p>     {{lang \"reset_password\" name=store.name}} </p> <br/> <br/> <a href='{{account.reset_password_link}}'>     {{account.reset_password_link}} </a>  </body> </html>",
  "translations": [
    {
      "locale": "en",
      "keys": {
        "reset_password": "To change your customer account password at {name} please click this link or copy and paste it into your browser:"
      }
    }
  ],
  "subject": "Reset your password at {{store.name}}"
}

Open in Request Runner

Overrides

Pass in a channel’s ID using the ?channel_id= query parameter to create a channel-specific override for a transactional email template.

PUT https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/marketing/email-templates/account_reset_password_email?channel_id=123
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json

{
  "type_id": "account_reset_password_email",
  "body": "<!DOCTYPE html> <html lang=\"fr\"> <head>     <meta charset=\"UTF-8\">     <title>Title</title> </head> <body> <p>     {{lang \"reset_password\" name=store.name}} </p> <br/> <br/> <a href='{{account.reset_password_link}}'>     {{account.reset_password_link}} </a>  </body> </html>",
  "translations": [
    {
      "locale": "fr",
      "keys": {
        "reset_password": "Pour modifier le mot de passe de votre compte client à {name}, veuillez cliquer sur ce lien ou le copier et le coller dans votre navigateur:"
      }
    }
  ],
  "subject": "Réinitialisez votre mot de passe sur {{store.name}}"
}

Note

  • Omit ?channel_id to interact with global email templates.

Resources