Adding A New Row For Each Unique Product ID (in the same order ) in google sheets from woo commerce

So as for right now I have 3 modules.

And what this scenario is doing right now is - every time i get a new order with order status being ‘‘processed’’ it will add a new row to my google sheets with data I need from woocommerce order page. If an order has more than one unique product ID it will add as many new rows as unique product IDs are in the order. Right now its just duplicating the data from first unique product ID in every new row (if order has more than one unique product ID) .

The problem is , that I need every new row to be filled with data that is relevant to every unique product ID, not just one of them and then it gets copied to other new rows.

How it is right now if I get new order with more than one Unique Product ID:
10491, John Wick, gmail@gmail.com, Fat Burner ,8EUR, 3EUR, 11EUR
John Wick, gmail@gmail.com, Fat Burner ,8EUR, 3EUR, 11EUR
What I Want:
10491, John Wick, gmail@gmail.com, Fat Burner , 8EUR, 3EUR, 11EUR
John Wick, gmail@gmail.com, Protein Powder, 16EUR, 3EUR, 19EUR.

Like i would like every added row to contain an information regarding the each unique product ID.

You might be using the wrong mapping in Google Sheet, You need to use Iterator response for the Product Name, Cost and others. Can you share me the screenshot of your Gsheet scenario?



So I should be Using iterator maps not the woo commerce ones?

Yes, @Veins_Seleckis.

For product related data i.e Item Name, Qty, you need to use the data obtained from iterator. For the rest generic one, i.e Customer Info and such you can use the first WooCommerce Module data.

Awesome, will do! Will let you know how it goes!

Is it possible to add data in only the top field (Shipping Price , Email, ) Same like with the order ID, that it gets imported only in the top row of all rows that come from one order.

Yes, You can use the if formula for that like that I have shared.

But, for ease of use what you can do is, set up the scenario with a router,

Screenshot from 2023-04-25 14-10-55


So, In the First Router, Add all the details required like email and stuff and on the second one just use product related data.

1 Like

awesome, got it, works perfect!