Best answer

Shopify Action Filter by Line Items Title with Different Product. Why is it not triggering?

  • 4 April 2022
  • 1 reply
  • 262 views

Hi, 

Scenario of filter is that :
> I order 2 different product type 1 D-Call Sim and 1 Sim Data

I wanted to create a zap specifically for this scenario only. But upon running the conditions, it cannot be continued:

See samples tested:

1. 

 

  1. No comma
  2. With Comma
  3.   

Why is it not pushing through?
Kindly help me thank you 

icon

Best answer by Danvers 8 April 2022, 13:12

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +12

Hi @mashupr!

It’s likely that the filter step isn’t working as you’d expect because the information coming from Shopify is formatted as Line items. This basically means it’s sort of like a subset of data. In the screenshot below you can see how line items are organised. 

 

 

 

When you’re working with these fields in your Zap, they will show as a comma separated list:

But even though it looks like one field with commas in it, it’s actually different items. Most app actions don’t handle line items very well (unless they specifically say that they do), so you’ll often need to split the line items into a regular list and then add the next step of your Zap. You can convert line items to regular text using the Formatter by Zapier app. 

If you want want the filter to continue if the order contains either  of the items 1 D-Call Sim and 1 Sim Data, here’s what you need to do:

  1. Before the filter step, add a Formatter by Zapier set. Choose the App action ‘Utilities’ and the Transform ‘Line-item to text’
  1. Add the Line Item title in the ‘Input’ field
  1. When you test this step it will convert the line items into one text field. It’ll look the same in the Zap editor (a list of titles, separated by commas) but it’s now formatted in a way that the Filter step can understand. 
  2. Set up the filter step so that the Zap should continue if the output of the Formatter step contains either 1 D-Call Sim OR 1 Sim Data. 

I hope that all makes sense, best of luck with your Zap!