Create Line Items in Quickbooks Online

Hi, I need help creating Quickbooks Online Invoice.

I intend to push the data from my Airtable base to create invoice on QBO.

The Airtable data has information on the client, invoice created/due date, shipping amount, discount, and line items (along with their event date, rate, and amount).

Line Items data is in array format. However, the other data (client, invoice created/due date, shipping amount, discount) is in text. The text data is doable. However, I need help processing the array items into the required format.

I have tried using Data Store to temporarily store the line items but was unable to ā€˜groupā€™ the line items by the invoice number. I have reached out to the Make support but this process is beyond their scope. I have opened the help center (Quickbooks API - Create recurring transaction - variable number of line items - #3 by Howard_Jennings) but this unfortunately doesnā€™t provide the solution.

In short, I need help processing this:

into this


Any help here guys?

Iā€™m open to sharing screenshot of my scenario. Let me know what is needed to solve this problem.

Thanks!

Have you tried using the map() function to extract the values and simply creating a text string with your new json structure ?

1 Like

Hi

This is a snip of my scenario that works creating QBO invoices with variable number of line items. Iā€™m getting the data from SugarCRM, but the principal should be the same.

I first use an Array module to get all of the records that need to be on the invoice.

My invoices have 4 products, but there could be several of each product. Iā€™ve created a data store that collects the product information from SugarCRM (in my case). In my case each product is added to the DB separately, so there are 4 ā€œAdd/replace a recordā€ modules. Once all of the products are added I use a ā€œArray Aggregatorā€ module to count how many records there are in the Array module.

I then get the records from the DB and send them to an ā€œarray aggregatorā€

the next module is another Array module and Array aggregator pair.

I then get the customer from QBO and set some variables I need for my invoices.

I then create the invoice.

Itā€™s important to delete all the records in the DB at the start and the end and also at any error points. If you donā€™t start with an empty DB your invoices will be wrong.

I hope this helps.

BTW, I still canā€™t create recurring transactions. Probably because no one actually understands what Iā€™m talking about LOL

4 Likes

Could you please show me what your collect line items and send items to invoice consist of.

The collect line items simply maps to the previous Array agregator

This allows the indivdual line items to then be sent

2 Likes

Thanks Howard, What does the scenario data start as? (i.e. is it JASON, text, or something else?) Is there a way you can share the scenario or show me how that data turns into the array? I understand you add many fields using switches on top of the it. But Iā€™m trying my best to do something similar to what you have going on with the array converting to line items. So far your scenario is the closest thing to what Iā€™m trying to achieve.

Hi, happy to, although Iā€™m away until next week. Where are you? It might be easier to have a teams or a phone call. Iā€™m in the UK now

Hi everyone, just want to share my solution to this problem in case anyone might need it in the future.

Essentially what Iā€™m doing is:

  1. Get data from Airtable
  2. Count the number of line items using Iterator and Array Aggregator and taking the number of bundles
  3. Creating an array of Quickbooks Line Items by using Iterator, Increment, Set Multiple Variable, and Array Aggregator
  4. Pushing the above array from step 3) to the Line Item field on Quickbooks Create Invoice

Iā€™m sharing my screenshots here for reference. Hope this can be of help to anyone who encounters the same problem.

Cheers!


^Scenario


^Counting the number of Line Items

Uploading: Screenshot 2023-04-19 at 21.45.46.pngā€¦
^repeat the creation of line item(s) for x times; where x is the number of line items counted from she screenshot above



^set the variables in accordance to the Quickbooks Line Items requirement; where the i-th line item corresponds to the i-th number

no screenshot needed
^array aggregator all of the line items


^create invoice