QuickBooks data synced with the Web Connector gets out of sync due to merges

QuickBooks entities on a remote system get out of sync with QuickBooks Desktop when you merge two entities. I believe this happens with any mergeable entity, but I'll use customer as an example:

A customer is created in QuickBooks, and the remote system receives the customer in the query response:

QB            remote system
------------  -------------
C1 ACME, Inc  C1 ACME, Inc

Somebody then adds a similar ('duplicate') customer. The remote system receives the 2nd customer in the query response:

QB             remote system
-------------  -------------
C1 ACME, Inc   C1 ACME, Inc
C2 ACME Inc.   C2 ACME Inc.

Somebody merges customer 1 into customer 2 in QuickBooks.

QB                 remote system
-----------------  -------------
C2 ACME Inc.       C2 ACME Inc.

At least 3 things don't happen in QuickBooks and the Web Connector that probably should (not necessarily in order of importance):

  1. C2's modified date is not changed (I'm not 100% sure about this but believe it to be true)
  2. There is no knowledge that the 'source' customer, C1, was just merged into the 'target' customer, C2.
  3. Not least, C1 is not included in ListDeletedQueryRs even though it is gone forever (sounds like very much like a delete when it was available a moment ago before the merge and now it's gone forever).

Now the remote system is not in sync and and CAN'T EVER be in sync with QuickBooks without querying for the FULL customer list to detect that the customer that was merged 'away' has been effectively deleted. If I want them to get back in sync, on the remote system, after re-querying for the full customer list (99.99% of which I don't need because I already have them in their up-to-date entirety), I now have to loop through every single remote customer and track which ones don't have a match in the full customer list that I [unnecessarily] had to query for.

Also I have no way of knowing that the two customers are combined, so related data, such as invoices created on the remote system, can't be moved from the merged-away customer, C1, to the customer that remains, C2.

I'm hoping I'm wrong about the above and that I'm missing something obvious or creative that will prevent the need to requery for all customers to get the remote system back in sync, and also allow me to know to transfer related data to the customer that remains.

One thought I've had as I've been writing this is that I could, for example, when I'm about to sync invoices for C1, I could first query for C1 by ListID. This could tell me that the customer is gone and to not try to sync the invoices. So I can flag that customer as "probably merged", but I still lack critical information about where the customer was merged to. Without that, the invoices on the remote system are unnecessary orphans!

Read more here: https://stackoverflow.com/questions/68473792/quickbooks-data-synced-with-the-web-connector-gets-out-of-sync-due-to-merges

Content Attribution

This content was originally published by jbobbins at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: