Database to QuickBooks Integration
Configure your Database for Integration with your QuickBooks file by following the steps given below.
For this Tutorial I will use SQL Server Database Named "DBSyncDB" and 2011 US Edition of QuickBooks.
Create tables "Account" and "Invoice" in Database with following the SQL script.
Database Setup
Open www.mydbsync.com in your browser. Then, click on Customer Login.
Enter in your DBSync Username and Password to Sign in. Once logged in, click on Launch to access DBSync Integration Console.
Once logged into the DBSync console, click on Create New Project button .
You can use any naming convention for a project as long as there are no white spaces in the name of the Project.
Once the Project is created, click on Connector --- Edit to configure the Connectors.
Click on the Create New Connector from the top right section of the page.
Enter the name for the Connector and select Database Adapter from the drop down. Click on Save button once done.
Similarly, click on the Create New Connector button again to add QuickBooks Connector to your DBSync profile.
Once both the Connectors are added, you will see them listed in the Connector listing page.
Click Edit link next to the Database Connector. Enter your Database credentials as shown. In this tutorial, the database used is SQL Server 2005 and corresponding credentials are entered.
Click on Validate link for the Database adapter. If the credentials entered are accurate, you will get a pop-up message saying the "Connection Settings are Valid".
At this point, you have successfully validated your Database Adapter.
QuickBooks setup
Click Edit link next to the QuickBooks Connector from the Connector listing page.
Under the file section, enter the full path of your QuickBooks file as shown.
You can retrieve full path/location of your QuickBooks file by pressing 'F2' key on your keyboard when in QuickBooks 'Home' page - as shown below.

Click on configuration Link at the bottom of the page. A Pop-up box will appear, prompting you to open the file with "QuickBooks Web Connector (default)". Click OK as highlighted in the image given belowbelow.

Click OK in the next window (first screenshot below). Then, select the option button "Yes, always; allow access even if QuickBooks is not running" and check the check box for "Allow this application to access personal data". Finally, click continue.


In the Access Confirmation window, click Done - as shown above . And the profile will get added to your QuickBooks Web Connector. A screenshot of the QuickBooks Web Connector is shown below.

Enter your DBSync password in the password section of the Web Connector and Save.
At this point, you have successfully completed configuring your QuickBooks with DBSync. You can run the integration by clicking on the Update Selected button.
Custom Account Mapping For Account And Invoice Tables
Create a Project, Process with Names of your choices.
Create a Workflow with name "DB2Customer" *and likewise create another Workflow with name "DB2QBInvoice"*.
Click Edit on workflow "DB2QBCustomer". This will redirect you to Workflow detail page.
Create a rule. Then, select the Target as QuickBooks and choose the object to which you want insert/upsert the records.
From the Trigger section, choose the DB connector. From Advanced Query builder, enter the following query. User can run the query and view the result in Query Designer.
6. If a user wishes to set the properties, s/he can do it from the Properties Tab.
For a rule created, set the following properties by selecting the Properties Tab.
Table : CustomerAddRq
maxbatchsize : 1
writetype_ _ : insert
autocreate : True
Click on the Map link from the available options under the Rule to set the following field to field maps.
CustomerAddRq/CustomerAdd/BillAddress/Addr1
=
VALUE("billingstreet")
CustomerAddRq/CustomerAdd/BillAddress/City
=
VALUE("billingcity")
CustomerAddRq/CustomerAdd/BillAddress/Country
=
VALUE("billingcountry")
CustomerAddRq/CustomerAdd/BillAddress/PostalCode
=
VALUE("billingcode")
CustomerAddRq/CustomerAdd/BillAddress/State
=
VALUE("billingstate")
CustomerAddRq/CustomerAdd/CompanyName
=
VALUE("company")
CustomerAddRq/CustomerAdd/Fax
=
VALUE("fax")
CustomerAddRq/CustomerAdd/FirstName
=
VALUE("firstname")
CustomerAddRq/CustomerAdd/IsActive
=
"true"
CustomerAddRq/CustomerAdd/LastName
=
VALUE("lastname")
CustomerAddRq/CustomerAdd/Name
=
VALUE("Name")
CustomerAddRq/CustomerAdd/Phone
=
VALUE("phone")
VALIDATEROW
=
"true"
At this point, your DBSync is set to move Account records from your database table to QuickBooks Customer.
Invoice Mappings
From the Workflow listing page, click on the Edit link to open the "DB2QBInovoice" worfklow.
Follow the same procedure for Creating and Configuring Rule as explained in earlier section.
Configure the Trigger for the DB2QBInvoice state with the following code from the Advanced query builder section.
Make sure the XML Formatter section is populated with the following code.
5. Now configure the Rule Properties as given below.
Table : InvoiceAddRq
maxbatchsize : 1
writetype_ _ : insert
autocreate : True
The Rule mapping can be mapped from the following table .
InvoiceAddRq/InvoiceAdd/BillAddress/Addr1
=
VALUE("billingaddress")
InvoiceAddRq/InvoiceAdd/BillAddress/City
=
VALUE("billingcity")
InvoiceAddRq/InvoiceAdd/BillAddress/Country
=
VALUE("billingcountry")
InvoiceAddRq/InvoiceAdd/BillAddress/PostalCode
=
VALUE("billingpostalcode")
InvoiceAddRq/InvoiceAdd/BillAddress/State
=
VALUE("billingpostalcode")
InvoiceAddRq/InvoiceAdd/CustomerRef/FullName
=
VALUE("customerid")
InvoiceAddRq/InvoiceAdd/InvoiceLineAdd
loop
"invoice_no/list"
InvoiceAddRq/InvoiceAdd/InvoiceLineAdd/Desc
=
VALUE("itemdesc")
InvoiceAddRq/InvoiceAdd/InvoiceLineAdd/ItemRef/FullName
=
VALUE("item")
InvoiceAddRq/InvoiceAdd/InvoiceLineAdd/Quantity
=
VALUE("quantity")
InvoiceAddRq/InvoiceAdd/InvoiceLineAdd/Rate
=
VALUE("salesprice")
InvoiceAddRq/InvoiceAdd/IsPending
=
"true"
InvoiceAddRq/InvoiceAdd/TxnDate
=
VALUE("date")
VALIDATEROW
=
"true"
In the above mappings, we are using the operator Type as Loop so that line items are grouped as a list. For more info on the loop operator, refer to the above XML Formatter link .
At this point, you have configured your DBSync profile to integrate both the Accounts and Invoice tables that were created in your SQL Server Database. A similar procedure can be followed for other databases like MYSQL,Oracle,DB2 etc. The only thing that would be different, within DBSync, would be the connection strings for the respective databases.
Last updated