Corso Post Purchase Emails in Klaviyo
Getting Started
Section titled “Getting Started”If you’re using Corso Shipping Protection, you can use Klaviyo to dynamically show a Corso info snippet in your order confirmation and delivery emails, but only when a customer actually purchased protection.
This avoids confusing unprotected customers while helping protected customers easily file a claim.
Why Add Corso to Your Klaviyo Emails?
Section titled “Why Add Corso to Your Klaviyo Emails?”✅ Reduce support load – Protected customers contact Corso directly, not your team
✅ Clear guidance – Customers know where to go for help, right inside the email
✅ Dynamic logic – Snippet only shows if protection was purchased
Before You Start
Section titled “Before You Start”The Klaviyo integration must be enabled in the Corso Admin before Corso data is available in your flows.
Every snippet below contains one value you need to swap for your own: [brand-path-name]. Find it in the Corso Admin under Settings > Theme. Everything else — the {{ event.extra.* }} variables — should be left exactly as written; Klaviyo fills those in when the email sends.
See Customer Portal Deep Links for the full list of placeholders and for the URL structure to use if your portal is embedded on your own domain.
Klaviyo Uses Django, Not Liquid
Section titled “Klaviyo Uses Django, Not Liquid”This is the most common source of trouble when adapting a Shopify snippet for Klaviyo. Klaviyo templates use a Django-based template language. The syntax looks similar to Shopify Liquid — both use {{ }} and {% %} — but the variables and several of the tags are different.
If you are porting the snippet from Shopify order confirmation emails, translate it like this:
| Shopify Liquid | Klaviyo (Django) |
|---|---|
{{ order.id }} | {{ event.extra.id|default:'' }} |
{{ order_number }} | {{ event.extra.order_number|default:'' }} |
{{ customer.email }} | {{ event.extra.email|default:'' }} |
{% for line in subtotal_line_items %} | {% for item in event.extra.line_items %} |
vendor contains 'Corso' | item.vendor == "Corso" |
{% assign hasCorso = true %} | Not available in Klaviyo |
{% break %} | Not available in Klaviyo |
The |default:'' filter matters. If a property is missing from the event, Klaviyo will render the literal text of the variable name into your email without it.
Where to Add the Snippet
Section titled “Where to Add the Snippet”You can add the Corso snippet to:
- Order Confirmation Emails
- Order Delivered Emails (only works with product-based protection)
Placing the snippet in a Klaviyo email
Section titled “Placing the snippet in a Klaviyo email”- Open the flow email you want to edit.
- Drag a Text block to where you want the Corso message to appear.
- In the block toolbar, open the source code view (the
<>icon). - Paste the snippet for your setup from Setup Instructions below.
- Replace
[brand-path-name]with your own brand path name. - Save the block, then test the snippet.
Reusing the snippet across emails
Section titled “Reusing the snippet across emails”If you’re adding the snippet to more than one email, save the block as Universal Content (hover the block and select the star icon). Edits to a universal block propagate to every template that uses it, so you only maintain one copy.
Using display conditions instead of {% if %}
Section titled “Using display conditions instead of {% if %}”Rather than wrapping the HTML in a conditional, you can add the Corso block as a normal block and use Klaviyo’s show/hide display conditions with the same logic.
Setup Instructions
Section titled “Setup Instructions”Option A: If you use the Product method (Corso is added as a line item)
Section titled “Option A: If you use the Product method (Corso is added as a line item)”Use Case:
You’re using the protection as a product, added to the cart at checkout.
Klaviyo Flow Setup:
Trigger: Placed Order (Shopify metric)
{% for item in event.extra.line_items %} {% if item.vendor == "Corso" %} <div style="padding: 20px; margin: 0 auto; border-top: 1px solid #DDD; border-bottom: 1px solid #DDD; max-width: 560px; width: 100%; box-sizing: border-box; text-align: center;"> <div style="padding-bottom: 10px;"> <img style="width: 80px; max-width: 100%;" src="https://cdn.corso.com/img/corso-logo.png" alt="corso logo" title="corso logo"> </div> <p style="color: #777; line-height: 150%; font-size: 16px; margin: 0; padding: 0 10px;"> Thanks for choosing a Corso shipping option. Should you have any shipping issues with lost, damaged, missing, or stolen items, simply go <a href="https://app.corso.com/[brand-path-name]/reorder/{{ event.extra.id|default:'' }}" style="color: #007bff;">here</a>. If you don't want streamlined resolutions for shipping issues or if this was added by mistake, <a href="https://app.corso.com/[brand-path-name]/order/{{ event.extra.id|default:'' }}/edit" style="color: #007bff;">please contact us</a>. </p> </div> {% endif %}{% endfor %}Option B: If you use Shipping Plus (protection via shipping rate)
Section titled “Option B: If you use Shipping Plus (protection via shipping rate)”Use Case:
You’re offering protection through the shipping rate, not as a product.
Klaviyo Flow Setup:
Trigger: Placed Order (Shopify metric)
{% if "rateKind\":\"plus" in event.ShippingRate %} <div style="padding: 20px; margin: 0 auto; border-top: 1px solid #DDD; border-bottom: 1px solid #DDD; max-width: 560px; width: 100%; box-sizing: border-box; text-align: center;"> <div style="padding-bottom: 10px;"> <img style="width: 80px; max-width: 100%;" src="https://cdn.corso.com/img/corso-logo.png" alt="corso logo" title="corso logo"> </div> <p style="color: #777; line-height: 150%; font-size: 16px; margin: 0; padding: 0 10px;"> Thanks for choosing a Corso shipping option. Should you have any shipping issues with lost, damaged, missing, or stolen items, simply go <a href="https://app.corso.com/[brand-path-name]/reorder/{{ event.extra.id|default:'' }}" style="color: #007bff;">here</a>. If you don't want streamlined resolutions for shipping issues or if this was added by mistake, <a href="https://app.corso.com/[brand-path-name]/order/{{ event.extra.id|default:'' }}/edit" style="color: #007bff;">please contact us</a>. </p> </div>{% endif %}This displays the snippet only when the customer selected a protected shipping rate (where rateKind is “plus”).
Option C: For Order Delivered Emails (Product method only)
Section titled “Option C: For Order Delivered Emails (Product method only)”Use Case:
You want to show the Corso snippet in a “Your order has been delivered” email, but this only works if you use the product method.
Klaviyo Flow Setup:
Trigger: Delivered Shipment (Shopify metric)
Note the variable change: this event nests the order ID under the fulfillment, so it is event.extra.fulfillment.order_id rather than event.extra.id.
{% for item in event.extra.fulfillment.line_items %} {% if item.vendor == "Corso" %} <div style="padding: 20px; margin: 0 auto; border-top: 1px solid #DDD; border-bottom: 1px solid #DDD; max-width: 560px; width: 100%; box-sizing: border-box; text-align: center;"> <div style="padding-bottom: 10px;"> <img style="width: 80px; max-width: 100%;" src="https://cdn.corso.com/img/corso-logo.png" alt="corso logo" title="corso logo"> </div> <p style="color: #777; line-height: 150%; font-size: 16px; margin: 0; padding: 0 10px;"> Thanks for choosing a Corso shipping option. Should you have any shipping issues with lost, damaged, missing, or stolen items, simply go <a href="https://app.corso.com/[brand-path-name]/reorder/{{ event.extra.fulfillment.order_id|default:'' }}" style="color: #007bff;">here</a>. If you don't want streamlined resolutions for shipping issues or if this was added by mistake, <a href="https://app.corso.com/[brand-path-name]/order/{{ event.extra.fulfillment.order_id|default:'' }}/edit" style="color: #007bff;">please contact us</a>. </p> </div> {% endif %}{% endfor %}Test Your Snippet
Section titled “Test Your Snippet”- In the email editor, open Preview.
- Preview against a real recent order that included Corso protection. Previewing with a profile or event that has no Corso line item will correctly render nothing.
- Confirm the claim link resolves to your portal and lands on the right order.
- Send yourself a test email to check how the block renders with images both on and off.
Customer Portal Deep Links
Section titled “Customer Portal Deep Links”The links in Options A, B and C are deep links that take the customer directly into their specific order in the Corso portal. Because the URL includes the order ID, the customer doesn’t have to look up the order manually with their order number or email.
You can point the snippet at any part of the customer portal. Which URL structure you use depends on how your portal is set up.
Corso Domain (Non-embedded)
Section titled “Corso Domain (Non-embedded)”Use these if your portal is hosted by Corso at app.corso.com. Deep links use a path structure.
| Destination | URL |
|---|---|
| Shipping Protection claim | https://app.corso.com/[brand-path-name]/reorder/{{ event.extra.id|default:'' }} |
| Hub | https://app.corso.com/[brand-path-name]/order/{{ event.extra.id|default:'' }} |
| Order Editing | https://app.corso.com/[brand-path-name]/order/{{ event.extra.id|default:'' }}/edit |
Brand Domain (Embedded)
Section titled “Brand Domain (Embedded)”Use these if your portal is embedded on your own site. Deep links use URL parameters, which the embedded portal reads from the host page.
| Destination | URL |
|---|---|
| Hub | https://[brand-site-domain]/pages/[shopify-page]?orderId={{ event.extra.id|default:'' }} |
| Order Editing | https://[brand-site-domain]/pages/[shopify-page]?orderId={{ event.extra.id|default:'' }}&isOrderEdit=true |
Placeholders
Section titled “Placeholders”| Placeholder | What to replace it with |
|---|---|
[brand-path-name] | Your Corso brand path name, found in Corso Admin under Settings > Theme |
[brand-site-domain] | Your store’s domain, for example www.yourstore.com |
[shopify-page] | The handle of the Shopify page your portal is embedded on, for example manage-your-order |
{{ event.extra.id|default:'' }} | Leave as-is. Klaviyo fills in the Shopify order ID when the email sends |
Related
Section titled “Related”- How to Add the Corso Snippet to Shopify Order Confirmation Emails — the same snippet for Shopify’s native notifications
- Klaviyo Integration — enabling the integration and the full list of Corso events
Need Help?
Section titled “Need Help?”If you need help setting up a snippet, editing templates, or troubleshooting an event preview, just reach out to the Corso team. We’re happy to help.