I’m trying to query multiple invoices from QuickBooks Online and then create a payment that links to all of them, but I can’t figure out the workflow for it.
My zap starts by receiving a webhook whenever a payment is made in some other billing software. The webhook’s payload provides the invoices’ document numbers (not the ID) and the amounts to be applied from the payment. In this example, a customer is trying to pay off two invoices with a single payment of $424.78.
Quickbook’s “Create Payment” step requires the invoices’ IDs (primary key in QB) in order to link it. An “Object Not Found” error will occur if you try to use the document numbers. However, the “Find Invoice” step does not support line items, so I have to break up my line items into an array so the “Find Invoice” step can run for each document number. (documentation)
After doing this and getting an invoice ID for each document number, how am I supposed to combine them back into line items for the final “Create Payment” step?