Shopify & QuickBooks Error 400

:bullseye: What is your goal?

I run a very small business and I’m looking to automate some of my Shopify sales on QuickBooks to save time.

I’m trying to set it up so that at 23:59 each day, Shopify searches for new orders created/paid that day, then creates a deposit in QuickBooks.

:thinking: What is the problem?

The aggregator keeps giving me error 400 codes when I’m trying to map the fields, as it says it failed to load data for the account and tax code I want to use for each line on the deposit.

:test_tube: What have you tried so far?

So far, my scenario is [Shopify: Search Orders] > [ Array Aggregator] > [QuickBooks: Create A Deposit].

I’ve tried adding in various QuickBooks account search functions, but I’ve had absolutely no luck. Any help would be much appreicated!

:link: Create public scenario page

Hello @BMD,

Welcome to the Community!

Unfortunately, I don’t have direct access to QuickBooks to provide a ready-to-use solution, but it looks like the issue is quite clear.

Right now, you’re trying to pass a Shopify-formatted array directly into QuickBooks, which won’t work. QuickBooks expects a very specific structure for Deposit line items.

What you should do:

Please open your Array Aggregator settings and follow these steps:

  1. Change the Target structure to QuickBooks Lines

  1. Adjust the mapping so it matches QuickBooks requirements

  1. Save your changes

  2. Run the scenario again - it should work correctly

Important note

QuickBooks requires the DepositToAccountRef parameter.

If this value differs depending on the product or order:

  • you’ll need to adjust your workflow logic (e.g., routing or conditional mapping)
  • or split the flow into multiple branches with different account mappings

Here is the official QuickBooks API reference for Deposits:

Please let me know if that helps!
Have a nice day,
Michal

Hi Michal,

Thank you for your advice here. Unfortunately, I’ve tried that and I’m still getting an error 400 message on those fields in question.

Any further help you can offer would be much appreciated.

Thanks in advance!

Hi @BMD,

You’re getting error 400 because the Array Aggregator can’t run RPC queries to get the Account and Payment Method options directly from QuickBooks. You’ll need to map those in yourself - not the names, but their IDs.

You can open your QuickBooks module, select an Account, toggle Map to ON, then pull the value from that field and use that value in the same field in the Array Aggregator.

Do this for Payment Method as well and for any other field that requires an ID input.

As Michal mentioned, it may not be the same Account, Payment Method, etc… for every order so in that case you need to use a combination of routing and/or switch() functions and/or other functions to figure out which Account and Payment Method needs to be used for each order.

Personally, I like to sync the Accounts, Payment Methods, and other entities with my Airtable or other database.
I will then pull in data from the external system, like Shopify in your case, store that info in another table, then use links and relations to match up the QuickBooks entities with the order (giving me access to the underlying IDs for the Account and Payment Method), then I have everything I need to push that up into QuickBooks, in your case as a Deposit.

Hope that makes sense and hope it helps!