Webmerge Integration for Invoice Document

I am attempting to create a webmerge between pipedrive and Formstack Documents for an invoice document. I would like to have a table that list the Product, Qty, Price, Sum, and Notes. I am having difficulty because of the way Pipedrive passes the data. Instead of passing like above for multiple products it passes data like below.

$product (Shirt,Pants,Socks)

$qty (1,2,3)



I have successfully been able to complete this task if in my merge document I set the following fields:

{$product1} {$qty1} {$price1} {$sum1}

{$product2} {$qty2} {$price2} {$sum2}

and continue down the document adding another number per row. The problem with this is I do not know how many products there will be with any given deal. If I make twenty different rows and there is only one product then I have 19 blank rows on the document. If there are 22 products and I only have twenty rows then two products do not show up on the document.

Any help on developing this document would be greatly appreciated.

Hi Jeff,

Have you tried perhaps using the GET/deals/{id}/products endpoint to see how many Products are attached to the Deal first? Or would this not work in your flow?

Thanks for the idea. This will work by using Data Routing in formstack documents to different documents based on the amount of products. Not a perfect solution but a work around until quote sheets are native in Pipedrive.

1 Like