Best answer

How do I add multi-item in WooCommerce orders to PDFfiller form?


I am trying to add woocommerce order details like customer name, address, contact, email along with ordered product details like product name, quantity, amount to pre-designed PDFfiller form. I tested this successfully when a single item is present in the order. But i am stuck now when there are multiple products in one order.

I want to use this for doctors prescription, packing slip, shipping label etc. creation purpose.

As you probably know, woocommerce given comma separated names for order items. I have used formatt

settings in zapier format

 

I have set this in format to split the comma separated product names to a list.

So, i got desired output like below

 

Now comes the real problem, when i push this data to a pre-designed PDF Form on PDFfiller, all 10 items are shown in one single textbox. I tried using different ‘Segment Index’ as well. I got below output from this method.

Output on PDFfiller

 

So, i am requesting your expertise on this.

 

Below is my desired output.

 

icon

Best answer by nicksimard 7 July 2022, 01:50

View original

9 replies

Title correct: How do I add multi-item WooCommerce orders to PDFfiller form?

Userlevel 4
Badge +4

Try using  Looping by Zapier after the WooCommerce Order Trigger and then add all the formatter and other steps that you successfully tested

Hi @TryAbp 
We can help you fixing this zap out!
We are Zapier Premier Partners https://zapier.com/experts/connex-digital/

@Satya09 

Try using  Looping by Zapier after the WooCommerce Order Trigger and then add all the formatter and other steps that you successfully tested

 

Thanks for reply, as i checked, I didnt find a way to work this with looping, I think, issue is that template i designed doesnt support line items, to rule out any issue in data and formatting i tested same woocommerce order with ZOHO Books invoice.

The data works fine, i want same structure of ‘Items & Description’ to present in PDFfiller file. Do you know is there any way that i can add item line support to pdf document? OR any other workaround to do this job?

Userlevel 4
Badge +4

Well in that scenario you have to look at other options like airtable to collect data into separate fields.And then from Airtable you can send data to Google Docs.This can be a workaround

Userlevel 7
Badge +10

Hi @TryAbp!

I think I can help :) A couple of things:

  1. What’s coming from WooCommerce is in line item format (which looks like comma-separate items). Your Formatter step isn’t actually changing anything. 
  2. We can use a different Formatter function to get us what we need (a separate field for each line item).

I don’t have access to WooCommerce or PDF Filler so I’m using something different, but the general idea should be the same.

Choose Formatter — Utilities — Line-Item to Text

This will result in something like this as your output, where each of your line items becomes its own field: 

Now you can map those into the individual spots in your action step (I’m using Google Docs — Create Document from Template for this example):

 

NOTE:

  1. This gets trickier if you also need quantity, rate, amount, etc. 
  2. You would also have to test with a sample that has more items than you’ll ever have, in order to have the mappable fields (item 1, item 2, item 3, etc shown above).

Hope that helps!

Hi @TryAbp!

I think I can help :) A couple of things:

  1. What’s coming from WooCommerce is in line item format (which looks like comma-separate items). Your Formatter step isn’t actually changing anything. 
  2. We can use a different Formatter function to get us what we need (a separate field for each line item).

I don’t have access to WooCommerce or PDF Filler so I’m using something different, but the general idea should be the same.

Choose Formatter — Utilities — Line-Item to Text

This will result in something like this as your output, where each of your line items becomes its own field: 

Now you can map those into the individual spots in your action step (I’m using Google Docs — Create Document from Template for this example):

 

NOTE:

  1. This gets trickier if you also need quantity, rate, amount, etc. 
  2. You would also have to test with a sample that has more items than you’ll ever have, in order to have the mappable fields (item 1, item 2, item 3, etc shown above).

Hope that helps!

Hi @nicksimard thanks for reply. I will test this an let you know!

@nicksimard thank you very much for your help! This worked fine!

@nicksimard One more question, i got data separated like item price, SKU, quantity, subtotal. But i am again stuck on Item Tags Data. I tried few different things but i failed to separate the item tags data form woocommerce. Below is screenshot.

I selected same formatter utilities.

 

Then selected data vales from woocommerce.

in input, line items product data tags name

But the output should have been separate values for each product just like name and other fields. But i am getting below output.

 

its giving all tags output for all products

SO, i am again requesting your help in this case.

Reply