2022

Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

QuickBooks Queries

(info) Knowledge of QuickBooks and QuickBooksXML is required for mapping and creating process for integrating with QuickBooks.

QuickBooks Online Adapter provides interfaces for

  • Reader: reading from QuickBooks with a SQL like query
  • Writer: writing into QuickBooks
  • Metadata query: navigating through QuickBooks objects

You can build the queries of QuickBooksOE or QuickBooks Desktop Adapter from the Reader Section of the Process Definition. You can build the queries similar to SQL, which includes the straightforward query.

Reader Query Examples:

Customer Query

The following is a query to extract all Customer in batches of 100 which have been changed since the last successful run of the process.

select * from Customer where Customer.MaxReturned=500
  • MaxReturned suggests how many records to be retrieved from QuickBooks.
  • FromModifiedDate suggests the filter for selection the Customers which are edited or created after the previous sync run.
  • $last_success_run is a process specific variable that gets setup whenever the ETL process is successfully completed.

Note: Refer the filters from the QuickBooksXML, which is available in DBSync2 Conf folder. The XML Structures of all QuickBooks Objects are specified in this file.

ItemService Query

The following is a query to extract all ItemService in batches of 100 which have been changed since the last successful run of the process.

Select * from ItemService where ItemService.MaxReturned=500

(info) Other items such as ItemNonInventory, ItemInventory, ItemDiscount are not supported in QuickBooks Online Edition.

Complex query with join

select * from Invoice,Customer where Invoice.MaxReturned=500 and Invoice.ModifiedDateRangeFilter.FromModifiedDate=$last_success_run
and Invoice.IncludeLineItems=true and Invoice.OwnerID=0 join on Invoice.CustomerRef.FullName=Customer.FullName


The above query joins Invoice and Customer QuickBooksXML responses into one XML, so that the transformation engine can avoid multiple processes. This is done to optimize data flow to and from QuickBooks.

  • No labels