Salesforce to Quickbooks invoice - Arrays & Iterator help

Hi everyone,
First time here, so go easy :slight_smile:

I’m trying to build a scenario that takes fields on an object from Salesforce, and creates an invoice within quickbooks.

My object is an invoice, and my fields are setup as follows
ILI Product code : Hosting and Maintenance|Paid Marketing Management|Monthly Marketing Services|Advanced Telecoms Line Rental
ILI Unit Price : 75|500|1500|100
ILI Quantity : 1|1|1|1
I can add more if necessary.

I’ve already tried using 3 Iterators to split the lines and then Array aggregator for the quickbooks invoice, but it seems that the array aggregator can only read from one iterator to populate the invoice with data.

Can anyone help?

Hi Chris,

Welcome to the community!

You can use an aggregator for each iterator and then use the merge function so that it’s like
merge (arrayagg-output1;arrayagg-output2;arrayagg-output3)

That said getting a detailed and clear answer does require a little more effort, so my recommendation is try post as much screenshots of
a) overview of your scenario setup
b) the input area of the module you are having trouble with
c) the output area of the module you are getting data from and want sent to Quickbooks

This helps us all answer you better! :slight_smile:

1 Like

Hi!
Thank you for coming back to me.
So the overall top down view is that a Salesforce object (invoice) is created, send the fields I mentioned before, run through the iterators, then the array aggregator sets them up into the correct format for QB.

All the iterators are using the split
Screen Grab 2022-05-17 at 12.29.08.jpg

And are outputting 4 bundles (which to me, seem like the line items within an invoice)

The last part of the puzzle is the formatting of the Quickbooks Invoice Arrau Aggregator
So Make requires me to Select a Source Module (this means I’m going to need to combine the other Iterators in to a single source module)
Then select Target Structure type = lines (see screenshot below)

Screen Grab 2022-05-17 at 12.31.42.jpg

Then, within the Lines drop down, I then need to attribute parts of the bundle, outputted by the Iterator to fill out the Amount, Description, Quantity, Unit price etc.

Hi Chris,

Thank you, these screenshots go a long way.

Can you screenshot the Salesforce output and highlight which data in there you are after?

Feel there’s a better way to iterate through all that.

Hi,
Yep, course

Screen Grab 2022-05-17 at 12.29.08.jpg

Screen Grab 2022-05-17 at 12.31.42.jpg

A little embarrassing but that took me way longer to figure out and might not be the most efficient solution but it should work. When you do that split function on the description code, is it processing the blanks correctly?

This will work properly only if it recognizes the same amount of items for each parameter.

So what you’ll do is remove the Price Iterator and the Iterator after that.

After your product iterator, look up the Tools module, and choose the “Set Multiple variables” option.

Under that create 2 or 3 (if you are using description code ) variables and name them accordingly, eg. Unit Price, Quantity, etc.

Set them as per below. Note the IMTIndex, is just the “Bundle Order Position” parameter

Then under Array aggregator just map your values, and that should work

1 Like

Wow, that’s amazing!
Ok, so I feel like we’re getting somewhere.

The only issue is that it’s creating 4 invoices with each line item on its own invoice.

and a few other things:

I’ve realised that I needed to add the invoice number to the Doc number, however after doing so, it only created the single invoice, then errors

I’ve also got a slight problem with the Items as Quick books gives its items/product IDs.
So I need to match these IDs to the values taken within the product field from Salesforce, for example,

Hosting and Maintenance is ID 9 within Quickbooks.
I’ve tried using the Search for Items, but as I understand it, i’ll need to put this before setting all the variables, so tried adding it here?

Any idea how I can tackle this?

Your array aggregator source should be the Price(iterator) module

I think your Search setup is fine

1 Like

Hi @D-EFFCON
I just wanted to say a MASSIVE thank you, I’ve managed to get it all working, and I’ve learnt a lot about the system as well.
Thanks once again, I owe you a beer

3 Likes

Thanks, it was a tricky one, but glad we got there in the end!

3 Likes