QuickBooks EDI Integration

Electronic Data Interchange (commonly known as EDI) is essentially the standard method when it comes to exchanging files in modern industry. Since its inception in the 1960s, EDI can be found in industries ranging from manufacturing to healthcare. Through EDI, businesses have a process for exchanging their business documents with their trading partners.

One big part of EDI is processing and storing the necessary data contained within the business documents. This is what the Arc application does for you. And it's built to work comprehensively with QuickBooks to process QuickBooks EDI integrations.

This article will provide a walk-through for configuring Arc to receive an EDI purchase order, inject it into QuickBooks, retrieve an invoice, and send it as an EDI invoice to a trading partner.

Setting up the Sample

To begin, download and install the Arc application (free, 30-day trial). Then download the sample project and extract and copy the contents to the "data" folder in the installation location for Arc. For Windows installations, this will likely be C:\Program Files\CData\Arc. Please consult the documentation for the Java build of Arc for Linux/Unix/Mac installations.

Next, modify the X12 document in the sample to refer to existing Items in your QuickBooks Company. Use a text editor to open the 850.x12 file located in the Send subfolder of the X12_Wayne_Tech_IN folder, find the placeholder Item Ids FILLER_ITEM_ID1 and FILLER_ITEM_ID2 for the Purchase Order Line Items, and replace them with actual Item Ids for Items in your QuickBooks Company.

850.x12

The last step for setting up the sample is editing the Sales Order template for the MAP_850_IN Connector. You can do this by editing the file SALESORDER.template (located in the MAP_850_IN subfolder of the data folder). Open the file in a text editor and replace the text FILLER_CUSTOMER_ID with an existing Customer Id from your QuickBooks company. This will assign the incoming Sales Order to the specified Customer.

SALESORDER.template

Once you have filled in the X12 document with actual values from your QuickBooks Company and edited the translation script, you need to ensure that you have configured your connection to QuickBooks properly.

Connecting to QuickBooks

If you have not already, you will need to install the CData ODBC Driver for QuickBooks (you can download a free, 30-day trial). If you just downloaded and installed the provider, please restart Arc before proceeding.

With the ODBC Driver installed, the next step is to configure your connection to QuickBooks as an ODBC data source. You can create one from the ODBC administration tool for your operating system. It is recommended that you connect to QuickBooks through the included Remote Connector. For information on configuring the connection to QuickBooks, refer to the online Help documentation for the ODBC driver.

Configure the ODBC Driver for QuickBooks

Lastly, click the Ports tab and select the QuickBooks Database Connector from the Connector drop-down menu. On the Settings tab, you can configure your connection to your QuickBooks instance. Click the ODBC radio button for the Connection Type and select the DSN you just configured from the drop down menu for the Data Source Name (DSN). To confirm your connection, you can click the Test Connection button.

Configure the QuickBooks Port

Document Translation / Data Integration Walk-Through

With the inbound X12 document, Sales Order template, and connection to QuickBooks properly configured, you are now ready to begin the walk-through.

Translate an X12 Document to XML

As we work through the sample, we start with the assumption that your trading partner has just sent you an 850 document (purchase order) in X12 format. This document is sitting in the Send folder of the X12_WayneTech_IN Connector, ready to be processed. When you select the document and click the Send button on the Send tab of the X12_WayneTech_IN Connector, Arc will translate the standard X12 format into an XML format and place it in the Send folder for the MAP_850_IN Connector.

X12 IN Port

Translate an XML Purchase Order to an XML Sales Order

The MAP_850_IN Connector is a scripting connector designed to translate the 850 document (in XML) from the X12_IN Connector into a Sales Order (in XML) that can be processed by the QuickBooks Database Connector.

Now that you have the XML file for the 850 document (a Purchase Order), you can use the script and template included in the sample to translate the document into a Sales Order formatted for use by the QuickBooks Database Connector. The XML elements used in the mapping template are derived directly from the column listing for the Sales Order table in QuickBooks, as exposed by the ODBC Driver (see the online documentation).

How the Translation Works

The TranslationScript.rsb file maps the values at specific XPaths in the XML document to new fields, which will be used to create a new document, based on the SALESORDER.template file.

Performing the Translation

To translate the XML 850 document, simply select the 850.xml document in the Send folder of the MAP_850_IN Connector and click Send. This will create a new document, SALESORDER_TIMESTAMP.xml, and place it in the Send folder of the QuickBooks Connector.

850 IN Port

Push a Sales Order to QuickBooks and Retrieve an Invoice

Now that you have a Sales Order in the Send folder for your QuickBooks Connector, you can inject the Sales Order into QuickBooks, generate a new Invoice, retrieve the new Invoice from QuickBooks, and prepare the Invoice to be sent out.

Push the Sales Order to QuickBooks

To insert the Sales Order into QuickBooks, select the SALESORDER_TIMESTAMP item in the Send folder and click Send. This connector uses the CData ODBC Driver to add the Sales Order, ready for processing, to the QuickBooks account.

QuickBooks Database Port

Generate a new Invoice

To generate a new Invoice, open your QuickBooks account/company file and find the Sales Order that you just inserted. Once you have found the Sales Order, you can click Create Invoice to create the Invoice that you will ultimately send back to your trading partner.

Create the Invoice in QuickBooks

Retrieve the Invoice from QuickBooks

Once the Invoice has been created in QuickBooks, you can trigger the QuickBooks connector in Arc to retrieve it and place it, prepared to be translated and sent to the trading partner, in the Send folder for the MAP_810_OUT Connector. To do this, you will need to first edit the INVOICES Output Template: On the Settings tab for the QuickBooks Connector, click the Edit button in the row for the INVOICES template in the Output Templates table. Replace the 'filler_customer_id' and the datetime in the WHERE clause of the selectQuery attribute with the Customer Id you used earlier and a datetime that falls just before the time you created the new Invoice for the Sales Order.

INVOICES Output Template

After you edit the INVOICES template, you can click the play button to execute the template to retrieve the newly created Invoice and create an XML document ready to be processed in the MAP_810_OUT Connector. The XML elements used in the mapping template are derived directly from the column listing for the Invoices table in QuickBooks, as exposed by the ODBC Driver (see the online documentation).

Translate an XML Invoice to an XML 810 Document

Like the MAP_850_IN Connector, the MAP_810_OUT Connector is a scripting connector. In this case, the connector is designed to translate an Invoice in XML based on its QuickBooks structure into XML that relates to the X12 format.

Because you already have the XML for the Invoice, you can use the script and templates included in the sample to translate the document into an XML format that is more closely related to the 810 document expected by your trading partner.

How the Translation Works

The TranslationScript.rsb file maps the values at specific XPaths in the XML document from the QuickBooks Database Connector to new fields, which will be used to create a new document based on the 810 template file.

Performing the Translation

To translate the XML Invoice, simply select the INVOICES_TIMESTAMP.xml document in the Send folder of the MAP_810_OUT connector and click Send. This will create a new document, 810_TIMESTAMP.xml, and place it in the Send folder of the WayneTech_810_Out Connector.

810 OUT Port

Translate an XML 810 Document to an X12 810 Document

The last piece of the sample is the process of translating the 810 in XML format into X12 format. This is accomplished by clicking on the 810_TIMESTAMP.xml file on the Send tab for the X12_WayneTech_OUT Connector and clicking Send.

It is at this point that the 810/Invoice is ready for transport to your trading partner. In a real-world, end-to-end integration, you would then use a communication connector like AS2 or SFTP to transmit the file to the trading partner.

X12 OUT Port

More Information & Next Steps

As you can see, with Arc and CData Software, you can rapidly and effectively automate your business document exchange with direct QuickBooks EDI integration. For more information on Arc, visit our home page and for more information on the QuickBooks ODBC Driver available from CData Software, visit the CData Software website. You can also see a full list of the data sources CData Software connects to with ODBC Drivers. Download your free, 30-day trials and start controlling your business document exchange today!



Download & Install Sample

Already running Arc? This sample will setup Arc with the data and connector configurations referenced in this article: