Looking to use flow to put an icon or “Sale” on sale items on packing slips. I can’t seem to surface specific product/variant tags in Flow. Is there a way to do it? Is there a way to do it in Liquid in the packing slip template?
Yes, you can use flow to add a tag to the order and the in refer to this tag in order printer to output the label/icon.
I do not recall that there is any existing functionality like this though.
What criteria you want to use? Is it per line item or for entire order?
If per line item, then it would be a bit more complex, since tags are easy to assing on order, but line items will require a bit more work in Flow.
Maybe it’d be easier to do in Order printer template.
@hstb Great question — you won’t be able to do this entirely with Shopify Flow because Flow can’t directly alter packing slips or surface tags into them. Packing slips are generated from Liquid templates in your Shopify admin, and that’s where you’ll need to add the logic.
Here’s how you can do it:
Steps to Add a “Sale” Icon/Text on Packing Slips
-
Go to Settings > Shipping and delivery > Packing slips in your Shopify admin.
-
Click Edit to open the Liquid template.
-
Inside the
{% for line_item in line_items %}loop, you can check if the product or variant is on sale by comparing its price vs. compare_at_price.
Example:
{% for line_item in line_items %}
<tr>
<td>
{{ line_item.title }}
{% if line_item.variant.compare_at_price > line_item.variant.price %}
<span style="color: red; font-weight: bold;">SALE</span>
<!-- Or add an icon if supported -->
<!-- <img src="https://yourcdn.com/sale-icon.png" alt="Sale" width="20"/> -->
{% endif %}
</td>
</tr>
{% endfor %}
How This Works
-
line_item.variant.price→ the current selling price. -
line_item.variant.compare_at_price→ the original (non-sale) price. -
If the compare-at price is greater, you know it’s discounted → so show “SALE” or an icon.
Notes
-
You don’t need Flow here — Flow is good for automation (tags, notifications, etc.), but packing slip rendering is purely Liquid.
-
If you wanted to base it on product tags instead (say you tag sale items with
Sale), you can use:
{% if line_item.product.tags contains 'Sale' %}
<span style="color:red;">SALE</span>
{% endif %}
So yes, you can definitely do this in Liquid just not through Flow.
Thank you so much! The safer way for me right now is to check for a “Reduced” tag. So based on your recommendations that portion of the Liquid in the packing slip template is
<div class="flex-line-item-description">
<p>
<span class="line-item-description-line">
{{ line_item.title }}
{% if line_item.product.tags contains 'Reduced' %}
<span style="color:red;"> SALE</span>
{% endif %}
</span>
{% if line_item.variant_title != blank %}
<span class="line-item-description-line">
{{ line_item.variant_title }}
</span>
{% endif %}
{% if line_item.sku != blank %}
<span class="line-item-description-line">
{{ line_item.sku }}
</span>
{% endif %}
</p>
</div>
Which is where I historically give up. Not knowing if
line_item.product.tags contains 'Reduced'
is the correct object notation and code.
Based on ChatGPT’s recomendation, I’m going to try creating a debug mode and see where that leads me.