Structuring a conditional to trigger on a non-blank metafield

Structuring a conditional to trigger on a non-blank metafield

amanda-91
Shopify Partner
84 0 47

I'm needing to have a flow send me an email if a variant trigger has a specific metafield populated. I get confused with the and/or nesting levels and non-obvious handling of metafields in Flow.

 

Is the attached screenshot condition structured correctly to pass as true if the variant.metafields.inventory.notice value is non-blank?

 

IMG_0716.jpeg

Reply 1 (1)

paul_n
Shopify Staff
1150 142 273

No, that is not structured correctly. You chose "Add criteria for same list item" but instead of selecting "metafields_item" in the flyout window, you selected product variant / metafields. 

 

This effectively means for every variant / metafield, you are looping over the metafields a second time, and it will result in weird behavior.

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.