How do I exclude Route from Klaviyo?

Follow

In Klaviyo, you can filter out a specific item using custom code in a table block. To exclude Route from Klaviyo, use conditional statements to hide/show the content if the item name is Route Package Protection.

Note: Admin access within Klaviyo is required to exclude/blacklist products.

Please follow these steps to exclude Route from Klaviyo (on Shopify):

 

  1. Log in to Klaviyo
  2. In the current Klaviyo template you're using, switch the Dynamic Table block to Static.

    unnamed__4_.png
  3. Turn on the Block Repeat feature to iterate through multiple items in the cart:

    unnamed__5_.png
  4. Use conditional statements for both the image and product information in each column.

    For example, the first column will look like:

    {% if item.product.title != 'Route Package Protection' %}{% if item.product.variant.images.0.src %}<img src="{{ item.product.variant.images.0.src }}" style="width: 200px;" width="200" />{% else %}<img src="{{ item.product.images.0.src|missing_product_image }}" style="width: 200px;" width="200" />{% endif %} {% endif %}

    and the second column for the product information will be:

    {% if item.product.title != 'Route Package Protection' %}<h3><a href="{{ organization.url }}products/{{ item.product.handle }}">{{ item.product.title }}</a></h3>

    <p>Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|floatformat:2 %}</p>

    {% endif %}

  5. Click Save to save the block. (Example shown below)

unnamed__6_.png

When you preview and send emails from Klaviyo, they will filter out Route Package Protection.

Note: This Klaviyo guide walks through using dynamic data in flows, which you can use if you need to update any of the tags in code changed in this article (Personalize Flow Emails with Dynamic Event Data)