Quickbooks GroupLineDetail format

I’m trying to add bundled lines to a Quickbooks invoice.

After exhaustive searching of available documentation I can not figure out what format is needed to give the item# (“ItemRef”) for the sublines of a bundle. When I add it as a number, the error message says the field is expecting a bundle. When I add it as a collection, I get a much more vague error message:

ValidationFault: Request has invalid or unsupported property (Property Name:failed to parse json object; a property specified is unsupported or invalid)

To make the collection I used this format: {“value”: 1234}

I got this format by running a ‘get invoice’ module as a test. This seemed promising to find out the required format, but the structure I got as a result differed in several ways from the structure available to build the input to my module.

I’m not clear on what’s the difference between a collection and a bundle. I have a good grasp of objects & dictionaries in Javascript & Python, but these seem to be a little different. I read somewhere that a collection is ‘an array of objects’, which makes sense to me. But what is a bundle, in primitive data type terms? At any rate, I only had the option to define the data structure as a collection, no option to make a bundle.

Hey @Mark-N,

I’ve not created GroupLineDetail items yet so I can’t help much on this.

If I get time to explore more and figure it out, I’ll let you know.

In the meantime, have you tried creating an Invoice in the API explorer? It might give you the exact format which may help you figure this out.

Hi @Donald_Mitchell ,

I have browsed through the API documentation but I didn’t find it to be that useful, I will give it another look. It gives me the same format I found out doing my ‘Get Invoice’ test, but what I’ve found is that the format taken by the Aggregator when I target my module is pretty different from this format. It seems to be a Make interpretation of the structure for simplicity.

My only concern here is that the data you’re getting from the Data Store isn’t in the correct format for what the Create an Invoice expects. That’s why you’re getting a Validation Fault and not a Runtime Error - I guess we already know this.

It would be difficult to troubleshoot without seeing the actual data going in.

In your array aggregator, are you using a custom Data Structure or a Data Structure provided by the QuickBooks Create an Invoice module?

@Donald_Mitchell ,

The aggregator is using a data structure given by targeting the QB module, not a custom one. When I hover over the field that seems to be causing my problems, it says it’s looking for ‘type: select’. Not sure what that even means. Other modules are asking for ‘type: text’ or ‘type: number’, etc.

I built the structure in the data store to exactly match the structure from my ‘Get Invoice’ test. Not that that’s entirely important, when I am picking out pieces of it to put in each field.

For Item, normally you select an Item (if you’re directly selecting it from the QuickBooks module), but in an array aggregator it does not have access to those choices. You need to supply the internal number of that item from QuickBooks. You’re just looking for a number here (no letters).

@Donald_Mitchell ,

I have tried that, and get this error when I do so:

Are you certain that line 2 is the one throwing this error?
Are you looking at the output of a Create an Invoice? Mine looks different.

For example, yours has Billing address but mine is Bill address. There are so many other things that don’t match. Here’s what my Create Invoice looks like for a single bundle item containing two items - you are working with bundle items, correct?

No, I no longer think it’s the line item that’s causing the error. But I still can’t pin down what is, I’ve tried stripping out all possible data, and it still throws. The error message is so vague and un-useful.

I’m seeing the ‘Billing Address’ in the output payload, but ‘Bill Address’ in the input:

It is a Create Invoice module, and yes I am working with bundle items. That’s the structure I selected in my Aggregator (Line Item Type).

I would suggest maybe creating the bundle item directly in the Create an Invoice module then compare that to what your array aggregator is producing then maybe you’ll be able pinpoint the incorrect inputs.