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

**URL:** <https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094>\
**Category:** Questions\
**Tags:** google-sheets\
**Created:** [April 25, 2023, 7:10am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094 "2023-04-25T07:10:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veins\_Seleckis](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Veins\_Seleckis](https://community.make.com/u/Veins_Seleckis)\
**Post date:** [April 25, 2023, 7:10am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/1 "2023-04-25T07:10:45Z")

</div>

So as for right now I have 3 modules.

 ![Screenshot_4](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/c/c88ef328cb45c65ff3d45092db3885650250b539.png)

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](mailto:gmail@gmail.com), Fat Burner ,8EUR, 3EUR, 11EUR  
John Wick, [gmail@gmail.com](mailto:gmail@gmail.com), Fat Burner ,8EUR, 3EUR, 11EUR  
What I Want:  
10491, John Wick, [gmail@gmail.com](mailto:gmail@gmail.com), Fat Burner , 8EUR, 3EUR, 11EUR  
John Wick, [gmail@gmail.com](mailto: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.

---

<div class="post-metadata">

**Author:** ![Runcorn](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/runcorn/32/9169_2.png) [@Runcorn](https://community.make.com/u/Runcorn)\
**Post date:** [April 25, 2023, 7:19am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/2 "2023-04-25T07:19:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Veins\_Seleckis](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Veins\_Seleckis](https://community.make.com/u/Veins_Seleckis)\
**Post date:** [April 25, 2023, 7:25am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/3 "2023-04-25T07:25:09Z")

</div>

![Screenshot_5](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/b/baf1c0685756eb9fbddf277210782ce28448e1c9.png)  
 ![Screenshot_6](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/9/9557b81a6fcae280d5db1bb97d938fad92eb4822.png)  
So I should be Using iterator maps not the woo commerce ones?

---

<div class="post-metadata">

**Author:** ![Runcorn](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/runcorn/32/9169_2.png) [@Runcorn](https://community.make.com/u/Runcorn)\
**Post date:** [April 25, 2023, 7:26am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/4 "2023-04-25T07:26:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Veins\_Seleckis](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Veins\_Seleckis](https://community.make.com/u/Veins_Seleckis)\
**Post date:** [April 25, 2023, 7:29am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/5 "2023-04-25T07:29:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Veins\_Seleckis](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Veins\_Seleckis](https://community.make.com/u/Veins_Seleckis)\
**Post date:** [April 25, 2023, 7:42am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/6 "2023-04-25T07:42:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Runcorn](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/runcorn/32/9169_2.png) [@Runcorn](https://community.make.com/u/Runcorn)\
**Post date:** [April 25, 2023, 8:27am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/7 "2023-04-25T08:27:03Z")

</div>

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](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/5/56fb1665bd33358c57259f4539e6fbd971c88cc6.png)

 ![Screenshot from 2023-04-25 14-11-04](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/3/315353646e03cb709f69368d08eb9309ddc118eb.png)  
 ![Screenshot from 2023-04-25 14-11-12](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/d/d78468c2b723e79a2bf3f24ffef65f4e7c9cb68e.png)

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

---

<div class="post-metadata">

**Author:** ![Veins\_Seleckis](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Veins\_Seleckis](https://community.make.com/u/Veins_Seleckis)\
**Post date:** [April 25, 2023, 9:56am UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/8 "2023-04-25T09:56:57Z")

</div>

awesome, got it, works perfect!

---

<div class="post-metadata">

**Author:** ![FAQs](https://avatars.discourse-cdn.com/v4/letter/f/eb8c5e/32.png) [@FAQs](https://community.make.com/u/FAQs)\
**Post date:** [April 29, 2023, 11:00pm UTC](https://community.make.com/t/adding-a-new-row-for-each-unique-product-id-in-the-same-order-in-google-sheets-from-woo-commerce/10094/9 "2023-04-29T23:00:09Z")

</div>


