Integration asp net application with quickbooks desktop edition


Integration between an ASP.NET application and QuickBooks Desktop Edition can provide numerous benefits for businesses. It allows for seamless data and synchronization between the two systems, eliminating the need for manual data and reducing the chances of errors. In this article, we will explore how to integrate an ASP.NET application with QuickBooks Desktop Edition, using examples to illustrate the .

Step 1: Setting up QuickBooks SDK

The first step in integrating an ASP.NET application with QuickBooks Desktop Edition is to set up the QuickBooks SDK (Software Development Kit). The SDK provides the necessary tools and libraries to interact with QuickBooks. You can download the SDK from the Intuit Developer and install it on your development machine.

Step 2: Establishing

Once the SDK is installed, you need to establish a connection between your ASP.NET application and QuickBooks Desktop Edition. This can be done by creating an instance of the QuickBooks Application object and initializing it with the appropriate connection parameters. Here's an example:

using Interop.QBFC13;

public void ConnectToQuickBooks()
    QBSessionManager sessionManager = new QBSessionManager();
    sessionManager.OpenConnection("", "Your App Name");
    sessionManager.BeginSession("", ENOpenMode.omDontCare);

In the above example, we create an instance of the QBSessionManager and open a connection to QuickBooks using the OpenConnection . The parameter is the name of your application, which will be displayed in QuickBooks when the integration is active. The BeginSession method is then called to a session with QuickBooks.

Step 3: Performing Operations

Once the connection is established, you can perform various operations on QuickBooks data from your ASP.NET application. For example, you can retrieve customer information, create invoices, or update inventory. Here's an example of retrieving customer information:

public void GetCustomerInfo()
    IMsgSetRequest request = sessionManager.CreateMsgSetRequest("US", 13, 0);
    ICustomerQuery customerQuery = request.AppendCustomerQueryRq();
    customerQuery.ORCustomerListQuery.FullNameList.Add("John Doe");

    IMsgSetResponse response = sessionManager.DoRequests(request);
    IResponseList responseList = response.ResponseList;
    ICustomerRet customerRet = (ICustomerRet)responseList.GetAt(0).Detail;

    string customerName = customerRet.Name.GetValue();
    string customerEmail = customerRet.Email.GetValue();

    // Process retrieved customer information

In the above example, we create a request using the QBSessionManager's CreateMsgSetRequest method. We then append a CustomerQueryRq to the request and specify the criteria for the query (in this case, retrieving customer information for a customer named “John Doe”). The DoRequests method is called to execute the request, and the response is obtained. We can then the desired information from the response and process it accordingly.

Step 4: Closing the Connection

After performing the necessary operations, it is important to close the connection to QuickBooks to release system resources. Here's an example:

public void DisconnectFromQuickBooks()

In the above example, we call the EndSession method to end the session with QuickBooks, and then the CloseConnection method to close the connection.


Integrating an ASP.NET application with QuickBooks Desktop Edition can greatly enhance the efficiency and accuracy of data management. By following the steps outlined in this article and using the provided examples, you can successfully integrate your ASP.NET application with QuickBooks and streamline your business processes.

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

Table of Contents