The CData ADO.NET Providers offer an easy way to integrate with different data sources. This article walks through the included, fully functional application that can be used to synchronize contacts between Google and desktop editions of QuickBooks. The application can easily be modified to synchronize contacts with QuickBooks Online and QuickBooks POS.
Connecting to QuickBooks and Google
To connect to Google, specify the User and Password connection properties. The provider also supports the OAuth standard.
To connect to QuickBooks Desktop and QuickBooks POS, specify the User, Password, and the URL of the Remote Connector. To connect to QuickBooks Online, you will need to obtain the OAuth authentication values.
For guides to connecting to your edition of QuickBooks, see the "Getting Started" chapter in the help documentation.
Getting the Contacts
Follow the steps below to define simple SELECT queries to retrieve the Google and QuickBooks contacts.
- To obtain a list of a user's Google Contacts, issue a query to the Contacts table. For example:
- QuickBooks stores contact information in multiple tables. Depending on your use case, you may want to synchronize your Google Contacts with QuickBooks Customers, Employees, Vendors, or a combination of the three. To get data from a specific table, issue a SELECT query to that table. For example:
- Retrieving all results from QuickBooks may take some time, depending on the size of your company file. To narrow your results, you may want to use a filter by including a WHERE clause in your query. For example:
Synchronizing the Contacts
Synchronizing the contacts is a simple process. Once the contacts from Google and the customers from QuickBooks are available, they can be compared and synchronized based on user preference. The sample application does this based on user input, but it is easy to create one that does the synchronization automatically. The standard SQL syntax makes it easy to create, update, or delete contacts in either data source as needed.
Pre-Built Demo Application
The executable for the demo application can be downloaded here.
You can download the full source of the demo application here. You will need the Google ADO.NET Data Provider and theQuickBooks ADO.NET Data Provider.