Quickbooks Online - how do we add MULTIPLE line items to an Update Invoice

Can anyone explain how to enter multiple line items into Quickbooks Online Invoice? I have spent dozens of hours trying but failing.

I continue getting either

(Required parameter Line.SalesItemLineDetail is missing in the request)

or I get some version of

BundleValidationError Validation failed for 1 parameter(s). Array of objects expected in parameter ‘Line’.

It seem to me looping through an array to enter line items must be a rather frequent business requirement. I’m surprised it is so difficult to achieve and there is so little information ‘in the wild’ to build on.

Any help is greatly appreciated.

Hi,

Welcome to the Make Community!

Here is the answer to your problem. You must pass your data as an array so in most cases mapping them won’t be as simple as clicking on ready variable.

You can learn more here: Array Functions

If you need further assistance, please attach screenshots of your scenario and the output data of the module that is providing the items data.

Welcome to the Make community!

Looks like you’ve already “Looped” through the items using an Iterator module.

To Map all of them at the same time, you need to combine them into an array.

Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.

There are other types of aggregator modules, click the below links to find out more:

Read This

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

Than you so much samliew. I did manage to get my very ‘clean’ test bundles of data into the Quickbooks line item. This part works as desired using the data shown next. image.

But I’m not done yet.

USE CASE: I’m building a largely automated Quickbooks Online invoicing tool for use by contractors in the field. The technicians in the field talk into their phone and delineate the various job tasks performed charges, prices, descriptions, and amount into a recording.

My Make.com scenario fetches the audio file, transcribes, converts to structured data, and produces a line-by-line invoice on the fly.

A walk-through of my scenario: I am sending a short audio file recording to the webhook [85]. Parse results at [84] and retrieve recording URL at [13]. Transcribe with OpenAI module [115]. All of this works fine.

The problem: I simply cannot get [96] ‘Transform Text to Structured Data’ to return a proper JSON format that will produce bundles I can iterate to create Quickbooks invoice line items.

Revised prompts, revised outputs, revised everything with the ‘Transform Text to Structured Data’ [96]… all have failed. The closest I can get is either ‘n’ lines of comma-delimited text which I cannot iterate over. Ideally, the [96] module would produce the outcome desired. If not, can anyone steer me to a way to convert the results I have produced that can then become an array?

My fields are ‘amount’, ‘description’, ‘quantity’, ‘price’. Nothing complex.

Here is one result:

and here another

I’m finally crying ‘uncle’ and asking for help.

Thanks in advance. I love Make.com but the most powerful features (looping, and data manipulation or management, etc) are so terribly difficult to grasp. There are a number of YouTube videos (always appreciated), but often the content for more advanced features is presented poorly.

Make.com would do well to produce some more complex use case scenario-driven video content at the advanced features level.

The “Structured Data Definition” field is the most important to get right, and it takes time to figure it out. You’re right that there is barely any documentation about it :slight_smile:

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!