First steps with the SDKTestPlus3 tool

SDKTestPlus3 is an application that allows you to proceed step-by-step through an interaction, via the SDK, with QuickBooks Desktop. Its interface has separate controls for each step, so you can open a connection to QuickBooks, review the status message returned by QuickBooks, then begin a session and review the status message for that step, and so on. You will probably find SDKTestPlus3 useful throughout the development cycle, as it allows you to test connectivity options and qbXML message validity independent of your application logic, but in this example, you’ll be using it to familiarize yourself with the basics of communicating with QuickBooks via the SDK. You’ll be opening a connection, beginning a session, sending a request message, processing the response message, ending the session, and closing the connection, and at each step you’ll be reviewing the status returned from QuickBooks and observing the behavior of the QuickBooks UI.

Using the SDKTestPlus3 tool

The step-by-step instructions that follow walk you through using SDKTestPlus3 to perform the basic steps for interacting with QuickBooks via the SDK:

  1. The default location of the file that contains the qbXML request message you’re going to use in this demonstration is C:\Program Files (x86)\Intuit\IDN\QBSDK16.0\samples\xmlfiles\legacy\CustomerQuery.xml. To run this query, QuickBooks needs to write to the directory that contains the file. You need to either:
    • Change the permissions of the directory containing this file from read-only to writable, or
    • Copy CustomerQuery.xml to a directory known to be writable.
  2. Start your copy of QuickBooks Desktop and open a company file. It is advisable to use one of the test or demonstration company files supplied with QuickBooks.
  3. In the installed SDK, navigate to the SDKTestPlus3 tool. The default path is C:\Program Files (x86)\Intuit\IDN\QBSDK16.0\tools\SDKTest\SDKTestPlus3.exe.
  4. Run SDKTestPlus3.
  5. In the SDKTestPlus3 interface, enter the following:
    • Company File– leave this blank. QuickBooks will interpret this as “use the company file currently open in the QuickBooks UI.”
    • Request File – specify the file that contains the query, in qbXML form, that you want to execute. (You can use the Browse… button to navigate to the file that you made accessible in Step 1; its default location is C:\Program Files (x86)\Intuit\IDN\QBSDK16.0\samples\xmlfiles\legacy\CustomerQuery.xml.)
  1. Click Open Connection. You should see a message confirming that a connection has been opened.
  1. Click Begin Session.

    1. You should see QuickBooks open the authorization dialog, indicating that SDKTestPlus3 is requesting access to the company file. Notice that the default is to allow one-time access. Click Continue… to accept this.

    2. You should see a QuickBooks message confirming that SDKTestPlus3 has been given one-time authorization. Click Done.

    3. In the SDKTestPlus3 tool’s interface, you should see a message confirming that the session has begun with the company file currently open in the QuickBooks UI.

  2. Click Send XML to Request Processor. You should see a message confirming that the request has been processed.

  3. To see what you have accomplished:

    • Click View Input – This displays the qbXML message that you sent to QuickBooks.
    • Click View Output – This displays the qbXML message that QuickBooks returned in response to your request.
  4. Click End Session.

  5. Click Close Connection.

  6. Click Exit.

  7. Close QuickBooks.

In this brief demonstration you used the SDKTestPlus3 tool to open a connection to QuickBooks, begin a session, and send a request message in qbXML. When you develop applications, you will write code that performs these same steps. You also, in this demonstration, used the QuickBooks authorization dialog to choose the default authorization option, which give the SDKTestPlus3 application one-time authorization to the company file that was already open in the QuickBooks UI. When you design and develop your applications you will want to consider other possibilities that are available for authorization, including sending authorization preferences in your BeginSession calls. If you’re curious about the code that opens connections and begins sessions, or about the other options available for authorizing an application, see the page covering Connections, session, and authorizations.

SDKTestPlus3 sends and receives qbXML messages that already exist. You applications will often build their messages from data supplied by the user, and can do this either by writing the qbXML directly, or by using the QBFC support classes. You will see more about this in the next steps.

Next steps

Now that you’ve seen the basic steps in action, dive a bit deeper into programming with the SDK by viewing the SDK Essentials videos.