Docs
Back to site Sign in

Getting started

Subscription emails

Add a block to your Shopify order emails that links customers to their customer account when the order contains a subscription, so they can manage it themselves.

Add the block#

Ensure you add the following block to your order emails, for example the Shopify Order confirmation notification. It checks the order for a Otis subscription line item and, when one is present, shows a link to the customer account where the customer can manage their subscription.

Edit your notification templates in Shopify under Settings > Notifications, open the template, and paste this into the email body:

{% assign has_subscription = false %}
{% for line in line_items %}
  {% if line.properties['_revenue_model'] == 'subscription' or line.properties['_revenueModel'] == 'subscription' %}
    {% assign has_subscription = true %}
    {% break %}
  {% endif %}
{% endfor %}
{% if has_subscription %}
  <p>You can <a href="{{ shop.url }}/account">manage your subscription in your customer account</a>.</p>
{% endif %}

The link only renders when the order contains a subscription. If you use new customer accounts, point the link at your customer account address.

Point customers to your cancellation policy#

Set up a page on your store for your cancellation and returns policies, for example under Online Store > Pages in Shopify. Customers who are still within their minimum term cannot cancel themselves, so they need a clear place to read the terms that apply. Once the page exists, link to it inside the block below by replacing the example URL with your own policy page address.

Add this block to the same order emails. It uses the same subscription check, and when the order contains a subscription it tells the customer to refer to your policy while they are within their minimum term:

{% assign has_subscription = false %}
{% for line in line_items %}
  {% if line.properties['_revenue_model'] == 'subscription' or line.properties['_revenueModel'] == 'subscription' %}
    {% assign has_subscription = true %}
    {% break %}
  {% endif %}
{% endfor %}
{% if has_subscription %}
  <p>While you are within your minimum term, please see our <a href="{{ shop.url }}/pages/cancellation-and-returns">cancellation and returns policy</a>.</p>
{% endif %}
Was this page helpful?
Still stuck? Email us