Docs/Email Templates

Email templates#

Karla can email your customers directly using templates you own and manage inside Karla, so a Karla event — a delivery issue, a delivered parcel, a new claim — can send a fully branded email without an external email tool in the middle.

Templates are the content. There are two ways to send them:

  1. Automations — configured in the Karla Portal under Notify → Automations. Pick a shipment, return, or claim trigger, optional conditions, and a template; Karla sends it to the customer whenever the event happens. Nothing to set up outside Karla.
  2. The Send Karla email action in Shopify Flow — add it to your own Shopify Flow workflows. It carries the whole event payload a Karla trigger provides and sends the email to the recipient you choose; Karla fills in the template's variables from that payload. See Set it up in Shopify Flow.

Either way, Karla substitutes the template's variables from the event and sends the email with your shop's sender settings. If you'd rather send from an external email tool (Klaviyo, Brevo, …), use a Notify integration instead.

How templates are organized#

  • Cloned from a catalog — you don't start from a blank page. Karla ships a catalog of ready-made templates covering the common post-purchase moments; clone one into your shop and adapt the copy and branding.
  • Organized by tags — templates carry freeform tags (e.g. delivery-issues, returns, de). Tags are purely for organizing and filtering your template list — they have no effect on sending.
  • Up to 100 per shop — a shop can hold at most 100 email templates. Creating or cloning another one fails until you delete one.
  • Selected by name — the Flow action references a template by its name. Keep names unique and descriptive, and treat them as stable identifiers: renaming a template means updating every Flow workflow that points at it. Automations reference the template itself, so renaming doesn't affect them.

Template syntax#

Variables are written with double braces — {{ variable }}, not single braces like {variable}. This is plain token substitution, not a template engine: filters, conditionals, loops, and other Jinja/Liquid features are not supported. Any {{ … }} that isn't a known variable — and any known variable the event doesn't populate — renders as an empty string, so a stray token never leaks into a customer email. Text that doesn't look like a token at all (single braces, wrong casing) is left unchanged.

Hi {{ customer_first_name }},

good news — your order {{ order_name }} was delivered to your neighbour
{{ neighbour_name }}.

You can review the full delivery history any time:
{{ trackpage_url }}

At send time Karla substitutes each variable with the matching value from the event that triggered the send — the automation's trigger, or the event the Flow action carries. Only use variables that the event you're reacting to actually provides — for example, neighbour_name is only populated by the delivered-to-neighbour event.

Variable reference#

Template variables are the curated set Karla exposes for email templates — the same list the portal's template editor offers in its variable picker. Karla substitutes only these tokens; they are the complete authoring vocabulary.

The Shipment events and Claim events reference documents the underlying event payloads and is useful background for understanding which event populates which value — but write your templates with the token names below, not raw payload field names.

Shipment and order variables:

VariableDescription
tracking_numberThe carrier tracking number.
tracking_urlThe carrier tracking URL.
trackpage_urlThe branded Karla tracking page URL.
carrierThe carrier routing reference (e.g. dhl-germany).
carrier_display_nameThe carrier name to show a customer (e.g. DHL).
expected_delivery_dateEstimated delivery date (dd.mm.yyyy).
updated_atWhen the shipment or claim was last updated.
order_nameThe order name (e.g. #1001).
order_numberThe order number.
external_idThe shop-system order ID (e.g. the numeric Shopify ID).
payment_methodThe order's payment method as named by the shop system.
zip_codeDelivery postal code.
number_of_shipmentsNumber of shipments in the order.
pickup_addressPickup point address (parcel shop or locker).
neighbour_nameName of the neighbour who accepted the parcel.
shipment_idKarla shipment identifier.

Claim variables, populated by the claim events:

VariableDescription
claim_idKarla claim identifier.
reasonThe claim reason.
resolution_preferenceThe customer's preferred claim resolution.
descriptionThe customer's claim description.
selected_itemsClaimed product items (title, SKU, quantity).
step_inputsThe customer's Resolve step answers.
created_atWhen the claim was created.
image_urlsCustomer-provided claim image URLs.

Customer variables, available across events:

VariableDescription
customer_emailCustomer email address — also the default email recipient.
customer_first_nameCustomer first name.
customer_last_nameCustomer last name.

Every variable also accepts an _urlencoded suffix (e.g. {{ order_number_urlencoded }}), which substitutes the value fully percent-encoded. Use it when embedding a value in a link's query string, so characters like & or = in the value don't break the URL.

Set it up in Shopify Flow#

Prerequisites#

  • The Karla Shopify app is installed and connected to your shop.
  • Karla email notifications are enabled for your shop. Sending emails through Karla is a premium setting — if it is disabled, the action returns 403 and the Flow run is marked failed without a retry.
  • The referenced template is active. The action only considers active templates when looking up the name, so an inactive template is treated the same as a missing one: the action returns 404 (template_not_found) and the run fails. (The underlying send API distinguishes the two — 409 for an inactive template, 404 for a missing one — but through Flow both surface as 404.)

Create the workflow#

  1. In Shopify admin, open Shopify Flow and create a new workflow.
  2. Pick a Karla trigger for the moment you want to react to. A curated set of shipment and issue triggers is available — e.g. Delivery Failed or Delivered to Neighbour — covering the most common moments from the Karla event catalog; not every event has a Flow trigger. Each trigger exposes the whole event as a single Event data variable.
  3. Add the Send Karla email action to the workflow.
  4. Fill in the action's three fields:
    • Event data — insert the trigger's Event data variable. That's the only insert needed; there is no per-field mapping.
    • Recipient — map the customer's email address, e.g. {{ customer.email }}. This field is required; if it renders empty at runtime, Karla falls back to the event's customer_email.
    • Template name — type the exact name of the template you cloned and adapted in Karla.
  5. Activate the workflow and run a test order to verify the rendered email.

Because the action selects templates by name, you can reuse the same template across several workflows — or point different triggers at different templates for tone-appropriate messaging per event.

  • Events — the event hierarchy behind Karla triggers.
  • Shipment events — the full catalogue of shipment events and their payloads.
  • Claim events — the claim events and their payloads.
  • Shopify — installing the Karla Shopify app and the two notification paths.
  • Notify integrations — using an external ESP (Klaviyo, Brevo, …) instead of Karla-sent emails.
Was this helpful?