Custom HTML lets you design a loyalty email yourself. Your HTML replaces Appstle's standard layout for that email, and Appstle fills in each customer's details when it sends the email. Use it when the texts, colors and header image in Email Templates don't give you the look you want.
Custom HTML is available on some plans only. The plan comparison on the Billing page lists it as Customizable reward emails. This article includes a sample template that you can copy and change.
Before you start
Have a plan that includes Customizable reward emails. On other plans, the Custom view shows a banner and its box is grayed out.
Let Appstle send your loyalty emails, or send them through Mailchimp. When Klaviyo or Omnisend sends your loyalty emails, Appstle doesn't use your HTML: build those emails in Klaviyo or Omnisend instead. See Connect Klaviyo and Connect Omnisend.
Know some HTML, or ask your designer or developer to help.
Add custom HTML to an email
In the Appstle Loyalty app, click More, then click Email Templates.
Click Edit next to the email you want to change.
Click Custom at the top of the email settings.
Paste your HTML into Add Custom HTML. To start from a ready template, copy the sample below.
Check the preview. It updates as you type. Click Refresh to update it right away.
Click Save in the bar at the top of the page.
Click Test Email at the top of the page.
Under To Email, choose your email address. The list shows the addresses in Allowed Email Addresses For Notifications, in More → Advanced Settings.
Click Send. The test email uses example values, such as "John" for the first name. You can send only a few test emails a day, so check small changes in the preview.
Custom HTML belongs to one email. Repeat these steps for each email you want to change. The other emails keep the standard layout.
Important: Your HTML replaces the whole standard email. The texts from the Content view, the colors from the Design view and the lists you turn on in the Global view show only where your HTML uses their variables, as the sample does. The Subject and the sending settings, such as From Email, work as before.
Sample template
This template has a header with your logo and heading, your message, the points balance, the lists of ways to earn and rewards, a button and a footer with the unsubscribe link. It uses variables, so its texts, colors and lists come from the Global, Content and Design views of the email. It shows the button only in emails whose Content view has a Claim Now Button Text or Point Earn Button Text. Copy all of it, paste it into Add Custom HTML and change what you like.
<!DOCTYPE html>
<html dir="{% if rtlEnabled %}rtl{% else %}ltr{% endif %}">
<head>
<meta charset="utf-8">
<title>{{ subject }}</title>
</head>
<body style="margin: 0; padding: 0; background-color: {{ templateBackgroundColor }};">
<table width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin: 0 auto;">
<tr>
<td align="center" style="background-color: {{ header_background_color }}; padding: 32px 24px;">
{% if logo_url != null and logo_url != "" %}
<img src="{{ logo_url }}" width="{{ logo_height | default: 200 }}" alt="{{ shop.name }}" style="display: block; margin: 0 auto 16px; max-width: 100%; height: auto; border: 0;">
{% endif %}
<h1 style="margin: 0; color: {{ header_text_color }}; font-family: Arial, sans-serif; font-size: 28px;">{{ heading }}</h1>
</td>
</tr>
<tr>
<td style="padding: 24px; background-color: {{ templateBackgroundColor }}; color: {{ text_color }}; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5;">
{{ body_content | newline_to_br }}
{% for activity in earnActivity %}
{% if forloop.first %}<ul style="margin: 8px 0 0; padding-left: 20px;">{% endif %}
<li>{{ activity }}</li>
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
{% if showAvailablePoints and available_points_label != null and available_points_label != "" %}
<p style="font-weight: bold;">{{ available_points_label }}</p>
{% endif %}
{% for rule in earnRuleSummaries %}
{% if forloop.first %}<p style="font-weight: bold; margin-bottom: 4px;">{{ earnRulesAvailableText }}</p>{% endif %}
<p style="margin: 0 0 4px;">{{ rule.ruleName }}: {{ rule.ruleDescription }}</p>
{% endfor %}
{% for reward in rewardsSummaries %}
{% if forloop.first %}<p style="font-weight: bold; margin-bottom: 4px;">{{ rewardsAvailable }}</p>{% endif %}
<p style="margin: 0 0 4px;">{{ reward.note }}: {{ reward.discount }}</p>
{% endfor %}
{% assign button_text = "" %}
{% case emailSettingType %}
{% when "REWARD_AVAILABLE_REMINDER", "DISCOUNT_EXPIRING_REMINDER", "BIRTHDAY", "REFERRAL", "REFERRAL_CUSTOMER", "REFERRAL_LINK" %}
{% assign button_text = claimNow %}
{% when "POINT_EARN" %}
{% assign button_text = showMoreEarnRuleText %}
{% endcase %}
{% if button_text != null and button_text != "" %}
<p style="text-align: center; margin: 24px 0 0;">
<a href="{{ redirectLink }}" style="display: inline-block; padding: 12px 28px; border-radius: 4px; background-color: {{ claimNowButtonBackgroundColor }}; color: {{ claimNowButtonTextColor }}; font-weight: bold; text-decoration: none;">{{ button_text }}</a>
</p>
{% endif %}
</td>
</tr>
<tr>
<td align="center" style="padding: 24px; background-color: {{ footer_background_color }}; color: {{ footer_text_color }}; font-family: Arial, sans-serif; font-size: 13px;">
{{ footer | newline_to_br }}
<a href="%unsubscribe_url%" style="color: {{ footer_link_color }};">{{ unsubscribeText }}</a>
</td>
</tr>
</table>
</body>
</html>
The sample uses the variables that build the standard layout. For the full list, and which emails can fill in each one, see Use variables in your loyalty emails.
Things to know
Variables and tags use Liquid, the template language of Shopify themes, so tags such as
{% if %}and{% for %}work. Your HTML can use only the variables that Appstle fills in, listed in Use variables in your loyalty emails. Shopify theme objects, such asproduct,cartororder, come out empty.Keep the unsubscribe link,
%unsubscribe_url%, as the sample does. When your HTML has no unsubscribe link, Appstle adds a small Unsubscribe link at the bottom of the emails it sends itself.Keep
{{ redirectLink }}as the button link, as the sample does. In reward and referral emails, it applies the customer's discount code or opens their invite link.The Monthly Reward Reminder works only with Klaviyo or Omnisend, which build their own emails, so custom HTML doesn't change it.
Email apps show HTML differently from a browser. Build the layout with tables and inline styles (
style="..."), use full web addresses for images, and leave out scripts and forms. Send yourself a test email to check the result.To go back to the standard layout, clear the box and click Save.
FAQs
The Add Custom HTML box is grayed out. Why?
Your plan doesn't include Customizable reward emails, and the banner above the box says so. If you think your plan includes it, chat with us. If the box still holds HTML from an earlier plan, your emails keep using it. Chat with us to remove it.
My emails still use the standard layout. Why?
Check these causes:
You didn't click Save after you pasted the HTML.
The HTML is in a different email. Each email has its own Custom view.
Klaviyo or Omnisend is connected in More → App Integrations. They send their own emails, so your HTML isn't used.
The email is turned off. Turn on its switch in More → Email Templates.
The preview says "This preview couldn't load". Why?
A tag in your HTML is usually not complete, for example a {{ without its }}, or a {% for %} without its {% endfor %}. Until you fix it, Appstle doesn't send this email. Undo your last change or check each tag, then click Refresh. If the HTML looks right and the preview still doesn't load, chat with us.
A variable shows nothing. Why?
The email can't fill that variable in, or its capital letters differ: names are case-sensitive. See the FAQs in Use variables in your loyalty emails.
I copied the template from an older version of this article, and my email doesn't work. Why?
Older versions used Klaviyo-style variables that start with event., and a lookup filter. Appstle doesn't fill in event. variables, so they show nothing. The lookup filter stops the email from loading: the preview says "This preview couldn't load", and Appstle doesn't send the email. Replace the HTML with the sample above.
