Email Templates: One-time code by email

One-time code by email

The email containing the temporary code a customer enters to log in. Install it if you want to control the text and design of this email yourself in the builder, instead of using the default version from the system.

What it does

When a customer logs in with a one-time code, the store sends an email with the code. By default, that email uses a system version you cannot edit. If you install the One-time Code template, you will get an editable copy in your template list, so you can adapt it to your store's expression and tone.

This is the email with the login code, not the login link. Some stores send a clickable login link instead; that is a separate template. This one specifically concerns the short numerical code the customer enters to log in.

Installing it changes nothing by itself. The default version continues to send until you activate the new one, just like the other additional templates work.

How to set it up

Three steps, in this order: install it, edit and publish it, and then activate it. Customers will receive the default version until the last step.

1. Install it

Go to Email → Templates in the control panel. Click Add template in the top right. Find One-time code in the list and click Install

A new card appears in the template list. It starts as a draft, and is turned off, so nothing changes for customers yet.

2. Edit and publish it

The template comes with a clean standard design built around the code itself. Open the editor (the edit button on the card), adjust text, logo, and colors, and use Save and publish

Make sure the code placeholder, [CODE], remains in a visible place in the email. That's the whole reason the email exists. The standard design places it in large, airy text in the middle of the email, which is exactly where you want it.

Until you publish, the card shows a Draft-label. Publishing turns your changes into the version customers actually receive.

3. Turn it on

Each card has a switch: Activate this additional template. Turn it on. From then on, customers will receive your custom version instead of the standard version.

The switch is intentionally separate from publishing. Installing and editing should not silently change what customers receive. You install, review, publish, and then turn it on, in that order.

What you can include in it

The Use variable menu in the editor offers placeholders that make sense for an email with a login code:

Variable

Becomes

[CODE]

The one-time login code. This is the one you cannot omit.

[CUSTOMER_NAME], first name, last name

Customer's name, when known.

[CUSTOMER_EMAIL]

The address the code is sent to.

Store details

Store name, logo, address, city, organization number, email, and web address.

There are no order or product variables here — a login code email is not linked to an order.

Language

The code email is sent in the customer's language. A customer shopping in English receives your English version, one shopping in Norwegian receives your Norwegian version, as long as you have created and published both in the builder. If the customer's language does not have its own version, the store falls back to your default language.

If you run a multi-language store, you should therefore edit and publish each language variant you actually use.

The Safety Net

A customer should never be without the ability to log in. If your builder version is missing or empty for any reason — for example, if it was deleted but remained enabled — the store silently falls back to the system's default code email instead of sending a broken one. The customer still receives their code.

Tips

  • Keep [CODE] central and clear. It's the one thing the customer needs. Large, readable, hard to miss.
  • Install and edit freely. Nothing changes for customers until you flip the switch, so take your time with the design.
  • Publish after each change. The switch determines whether your version is sent at all; publishing determines if your latest changes are the version that goes out.
  • Test a real login. Once active, request a code on your own online store and confirm that your version appears, in the correct language.