• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

How to split WooCommerce order items into separate Google Sheets

Status
Not open for further replies.

miguelq

Member
Hello,

I am trying to separate the different items from a WooCommerce orders into separate Google Sheets by Brand.

The logic I want to try is this:
  • If line item 0 name contains "Brand A", insert a new row in the Google Sheet A
  • If line item 0 name contains "Brand B", insert a new row in the Google Sheet B
  • If line item 1 name contains "Brand A", insert a new row in the Google Sheet A
  • If line item 1 name contains "Brand B", insert a new row in the Google Sheet B
  • and so on...
How I could do that? I was trying with routers, but if the order contained many line items, the resulting conditions would be a lot. I would like to do the split regardless of the number of items that contains the order.

Any ideas to do it simplier?

Best,
Miguel
 

ArshilAhmad

Moderator
Staff member
Hi @miguelq,

Disable the Simple Response, click on the 'Re-Capture Webhook Response' button, and place a dummy order on WooCommerce. This will help you capture the data in an array format.

1694234461024.png


Then, you need to add an Iterator to your workflow as shown in the screenshot below. This Iterator will help you process each line item one by one.
1694234883995.png


At last, you will need to setup a Router with two routes.
 
Status
Not open for further replies.
Top