Adding cancellation reason

Explains how to add cancellation reason to the Order Cancelled email.

Blanca Gongora avatar
Written by Blanca Gongora
Updated over a week ago

You may add the cancellation reason in your email template. For that, you simply need to follow the next steps:

1. Log in to OrderlyEmails (Shopify admin -> Apps)
2. Click the Customize button on your design
3. In the editor, select the Order Cancelled email, so you are previewing it
4. Go into the "Introduction text" section of the email and add the code below:

{%- if financial_status == 'voided' -%}
{% case cancel_reason %}
{% when 'customer' %}
Order {{ name }} was canceled at your request and your payment has been voided
{% when 'inventory' %}
Order {{ name }} was canceled because we did not have enough stock to fulfill your order and your payment has been voided
{% when 'fraud' %}
Order {{ name }} was canceled because we suspect it is fraudulent and your payment has been voided
{% when 'declined' %}
Order {{ name }} was canceled because the payment was declined
{% when 'other' %}
Order {{ name }} was canceled because of unforseen circumstances and your payment has been voided
{% endcase %}
{% elsif financial_status == 'refunded' %}
{% case cancel_reason %}
{% when 'customer' %}
Order {{ name }} was canceled at your request and your payment has been refunded
{% when 'inventory' %}
Order {{ name }} was canceled because we did not have enough stock to fulfill your order and your payment has been refunded
{% when 'fraud' %}
Order {{ name }} was canceled because we suspect it is fraudulent and your payment has been refunded
{% when 'declined' %}
Order {{ name }} was canceled because the payment was declined
{% when 'other' %}
Order {{ name }} was canceled because of unforseen circumstances and your payment has been refunded
{% endcase %}
{%- endif -%}

After that's set up, the email will display the cancellation reason, like in this example:

Having additional questions? No worries, get in contact with our support team using the message icon on the lower right corner of this page.

Did this answer your question?