Question

Adding multiple line items to WooCommerce order

  • 29 December 2020
  • 6 replies
  • 59 views

Userlevel 1

I have created a zap so that when a lead comes in through Unbounce an order is created in WooCommerce. For every lead i want to include the same 3 items in each order (1 quantity of 3 different items). I have it set up so that it works well when there’s one item. How do I add the other 2? See screenshot below. I tried separating the items by commas but it did not work.

https://share.getcloudapp.com/BluQzDqB


6 replies

Userlevel 7
Badge +10

Check out this article about Line Items with WooCommerce: https://zapier.com/help/doc/common-problems-woocommerce#how-do-i-use-line-items-with-woocommerce

Userlevel 1

@Troy Tessalone thanks for quick response. i do not understand how to apply the knowledge in that article to my problem. my information source does not have line items. i simply want to enter the same items into each order that is created. it seems like it would be relatively straightforward to do something like this. is there a way to format the text i insert into the line items fields so that it understands what i want to do?

Userlevel 7
Badge +10

Most Line Items rely on being delimited by a comma.

Did you get an error when manually testing the Zap with data formatted for products as comma delimited?

Userlevel 1

@Troy Tessalone i did. i found a fix though. used the formatter app to create line items.

Userlevel 7
Badge +10

Hi @superogx!

I started writing the following response before you wrote in saying you found a solution (sounds like it may be what I propose below):

If I’m understanding correctly, it’s always going to be the exact same items that you want to add to the order, and this is not based on information from your form at all.

If this is the case, based on your screenshot above you’d be looking at something like this using the Formatter app (specifically the Line Itemizer, found under Utilities:

I made the assumption that these items don’t cost money, since they’re being created from a lead gen form in Unbounce. If they do have amounts associated with them then you would have to adjust accordingly.

Then on the WooCommerce step you’d do something like this (pretty straightforward to map the fields appropriately):

Hopefully this helps!

Hello,

 

I could make it work but I have a small issue… 

How to handle different values for an attribute ?

For example, if I had an attribute size and another one color, if I make a first line it will be “size,color” 

and I want to create a product that is available in s & XL size and blue & green color, if I use for my second line “S,XL,Blue,Green” it doesn’t work I get a product where size is “S“and color “XL”, how to handle this use case ?

Reply