Flow: Access Line Item Properties?

Solved
JCAndrea
Shopify Partner
34 1 9

Using Flow, when new orders come in, can we access the Line Item Properties? If so, how?

Thanks!

CJWalker
Tourist
6 0 4

Anyone figure this out?

0 Likes
S_Jones_UW
Shopify Expert
38 0 6

Hi @JCAndrea ,

you can access Line Items, it just depends what attribute/property of the line item you are trying to use. Could you clarify if you are you trying to access them for use in your message templates or, to analyse them as part of a condition?

To access line items for use in your conditions, if you create a new Flow, choose Order Created as the trigger and then for the Condition, type "line" into the conditions search box and then scroll down to the Order category where you will find Line Items:

S_Jones_UW_1-1611049154998.png

Once you have selected line items, you'll need to select how you'd like the Condition to match:

S_Jones_UW_2-1611049274583.png

... then you'll be presented with a long list of line item related criteria to select from:

S_Jones_UW_3-1611049345609.png

If none of those suit your needs, could you provide a bit more information about what it is that you're trying to achieve with this Flow please?

 

 

Order and Customer Tagger apps for Shopify
0 Likes
CJWalker
Tourist
6 0 4

Thank you U_Jones_UW, that was a helpful tutorial for accessing the line item object.

What I, and I believe others in this thread are trying to accomplish, is to specifically access order.line_items.properties, which are the custom fields associated with order line items.

You can see what I'm talking about here, about halfway down the page: https://shopify.dev/docs/themes/liquid/reference/objects/line_item

But, it is mysteriously missing from the Flow template variables: https://help.shopify.com/en/manual/shopify-plus/flow/create-workflow/variables


In my case, I use an app called infinite options, that stores custom engraving text in a line_item.properties field. I'm trying to get flow to pull it out and put it in a spreadsheet. No luck so far.

S_Jones_UW
Shopify Expert
38 0 6

Hi @CJWalker @JCAndrea , 

I do apologize, I should have read that one a bit more carefully.

I've not previously seen the ability to analyse the line item properties within Flow, so it does appear to be missing.

You may therefore need to use an app that can analyse the order line item properties first and then apply tags to the order based on a set of conditions that you specify. You could then build your workflow around the presence or absence of those tags.

We operate an app called Order Tagger that has a criteria that can do that, but I'm sure there are other apps and solutions out there that could do something similar. It may be an option you can look into until support for line item properties in Flow is supported.

Sorry for the misunderstanding!

Order and Customer Tagger apps for Shopify
0 Likes
JCAndrea
Shopify Partner
34 1 9

This is an accepted solution.

I did find resolution in apps such as: Order Tagger, Easy Tagging, Order Automator.

RyanFletcher
Tourist
3 0 2

This is a feature I would like to see implemented. Currently I am using Arigato Automation to get the task done (in my case, updating the order note based on order line item custom attributes).

Ideally we would be able to access the order.lineItems.customAttributes object within flow!

0 Likes
petar-sprawsm
New Member
4 0 0

Hi,

 

Shopify flow seems to be missing some of the common attributes within the condition rules. Putting aside the inability to create a rule based on the line item custom attribute, which would be ideal for the case I'm trying to solve, there's nothing that can be used as a substitute.

For example, instead of adding custom attributes to order line items, we could tag the products, or have them be of certain type and use that as a trigger, but the only option there is product title:

line item product options.jpg

 

Is there a plan to add these to the condition building? Any other suggestion (beside adding another app from store) would be very welcome

0 Likes