Best answer

Shopify multiple line items properties


Hello. I use Shopify(New Order) - Google Clendar(New Calendar Entry) bot in order to pusn new orders into Google Calendar.
And face to such issue with line items properties:
I wanna line item properties values match line item properties name. I use ‘Formatter Line Item to Text’ and ‘Code by Zapier’. When in Shopify order there is one product(one item) I can get this item properties and match them in Zapier without problems. But when in Shopify order there are 2 or more items I get smth wrong.
For eg, I wanna to separate properties values:
 

But in the end I get not separate properties but again butch of all properties together.
 


Could you please give me a hint how to proceed it?

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.

 

icon

Best answer by nicksimard 8 July 2022, 20:15

View original

4 replies

Userlevel 7
Badge +8

Hey there, @Chris_! Thanks so much for reaching out.
Interesting! I wonder if some of these resources and similar questions might be helpful in splitting those up?
 


Keep us posted how this works for you!

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.

@christina.d, thank you for your reply!)
Unfortunately it doesn`t work for me ((
The main problem in nested arrays,i can`t get array (with properties) from array, and quantity of  in this properties will always be different.
have smth like this prob: https://community.zapier.com/code-webhooks-52/how-to-get-array-of-arrays-from-shopify-field-12376
and my item properties look like this(image I`ve attached before): 
for first item:
- ‘firstName’: ‘test’;
- ‘lastName’: ‘test’;
- ‘location’: ‘xxxx,xxxxxxx,xxxx’;
- ‘room’: ‘Living Room’; and so on
Even if through some manipulations I can separate properties values in the end I get:
- ‘test’;
- ‘test’;
- ‘xxxxx,xxxx,xxxxx’
- ‘xxxxx’ 
- ‘USA’
‘location’ values devides into 3 separate values and I can`t match them properly with properties names.(i could do it with a help of some formatter steps but the thing is the address dynamic, I mean it can be one time ‘xxxxxxxx, xxxxxxx, xxxxx, the other time just like this ‘xxxxx,xxxxx’ or like this ‘xxxxxxxx’ or ‘xxxxxx,xxxxx’). 

Userlevel 7
Badge +7

Hi @Chris_ ,

Good thought on Formatter though it doesn’t sound like it will do the trick here, eh?

I see you’re chatting with JC in Support which is a great step as they can jump into your actual Zap to troubleshoot! It looks like they’ve requested a bit more information so they can investigate further and get you squared away. 

Let us know if you’re not seeing JC’s email (sometimes we land in spam) or have any other questions!

Userlevel 7
Badge +10

Hi @Chris_!

You’re correct that it’s the nested arrays causing you problems. 

I’ve done a bit of digging and though there are some possible workarounds, they tend to work best for single fields that you need to get access to. It seems like you’ve got quite a few that you’re trying to access.

You can check out this workaround provided by one of our Zapier Experts to see if you’re able to apply it to your use case:

NOTE: I’m sharing this in order to help you out, but I don’t personally have the code knowledge to troubleshoot what’s offered in that thread. If you have questions, you could try @ mentioning the person who provided that solution (best to do it here, in this thread, rather than the original one I linked to above).

Hope this helps!

Reply