Follow

QB Remote Connector

QuickBooks SDK is a time tested option while doing custom programming against any flavor of QuickBooks Desktop edition. This SDK is based on COM with two interfaces: QBFC and QBXML.

QBFC uses pre-defined objects to build XML requests, whereas much of the plumbing has to be done by you with QBXML that includes XML serialization and deserialization.

While it is a breeze to consume the SDK from .NET based languages, the same is not true with other popular languages/frameworks such as PHP, Java, Node.js etc., because of the SDK’s roots in COM. Common problem across programming languages/frameworks is connecting to a remote instance of QuickBooks and perform pull/push of data.

Remote Connector™ for QuickBooks
(http://www.remoteconnector.com) provides answers for the COM headache and remote connectivity and best of all it is FREE. It is language/framework agnostic since it uses QBXML as the medium while communicating with QuickBooks. Please check the website on how to install and configure the product.

This Blog will not delve too much into the functioning of Remote Connector™ for QuickBooks but will focus on an issue observed while using it through QB SDK (http://www.remoteconnector.com/#1#quickbookssdk) and suggests a fix .

As per the provided documentation a simple POST request has to be issued to the Remote Connector™ for QuickBooks in QBXML format and response is returned in the HTTP response body. However, when we’ve sent a CustomerAdd request through C# code, received empty value in response.

qbconnector_01

Re verified the Request QBXML which has no issues at all:

Checking the logs of QB didn’t reveal much, hence went through the Verbose log maintained by the Remote Connector™ for QuickBooks. Looking at the HTTP headers gave us a clue and added another Header to the HTTP request: X-AcctSyncInteractionType with 0 as the value and voila the same QBXML request worked this time:

qbconnector_02

qbconnector_03

Below shows the other Headers tried to solve the issue, however including/omitting them didn’t make any difference. These may come handy down the road, one never knows!!!!

Header Name Header Value
X-AcctSyncVersion 1.0.0
X-AcctSyncApplicationName Provide a name, ex: QB Synchronizer.
X-AcctSyncConnectionMode 3
X-QBXMLVersion 13.0 This value has to reflect the QB XML version being used by you.
X-QBPOS False
X-AcctSyncMIC Unique Numeric value. Used DateTime.Now.Ticks.ToString() from C#.

Please check the sample code used to verify the Remote Connector™ for QuickBooks.

Using HTTPWebRequest

Using HTTPClient

 Posted By: Keshava Chandra, Osmosee

Are you interested? follow us and get notified of new posts

Leave A Reply

18 − one =