Intacct Invoice to PDF

Intacct Accounting Software, like many accounting tools, provides a way to create PDF files of the different reports and documents created in the same software; however, there may be times when you wish to customize these documents beyond what the software is natively able to support.

This article will provide a walk-through for configuring Arc to retrieve invoices from Intacct and convert them to PDF files based on a custom PDF template.

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.

Connecting to Intacct

If you have not already, you will need to install the CData ODBC Driver for Intacct (you can download a free, 30-day trial). If you installed the provider while Arc was running, please restart the application before proceeding.

With the ODBC Driver installed, the next step is to configure your connection to Intacct as an ODBC data source. You can create a DSN from the ODBC administration tool for your operating system or use an existing one. The configuration for the Intacct driver is simple and straight-forward because there are only a handful of properties that you need to set: Company ID, User, Password, Sender ID, and Sender Password. The Sender properties are attached to your Intacct Web Services Developer License.

Click the Ports tab in Arc and select the Intacct database connector from the Connector drop-down menu. On the Settings tab, you can configure your connection to your Intacct 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.

Create a PDF Template

The last step involves creating a PDF template file for the invoice. For this example, the PDF template already exists. When needed, you can create your own PDF templates and save them to the PDF folder in the data folder for Arc.

Document Translation Walk-Through

With the Intacct ODBC Driver and Connector configured, you are now ready to begin the walk-through. The other ports (MAP_Invoice_XML and PDF) come preconfigured and should work out of the box.

Retrieve an Invoice from Intacct

The Intacct Connector uses the CData ODBC Driver to retrieve invoices from your Intacct account, and these invoices are ready to be converted to PDF files. Navigate to the Settings tab of the Intacct Connector and scroll down to the XML Templates section. You should see a SalesOrderInvoices template in the Output Templates section. This template allows Arc to send calls to the Intacct ODBC Driver to retrieve sales order invoices and any corresponding items and subtotals. We limit the results from the SODocuments table to only invoices by including the WHERE Docparclass='INVOICE' clause in the selectQuery attribute. Click the play () button to execute the template and retrieve the newly created invoice and create an XML document ready to be processed in the MAP_Invoice_XML Connector. The XML elements used in the mapping template are directly derived from the column listing for the SODocument, SODocumentEntry, and SODocumentSubTotals tables in Intacct. This functionality is a product of being exposed by the ODBC Driver.

Translate an XML Invoice to an XML Document for a PDF Template

The MAP_Invoice_XML Connector is a scripting connector designed to translate an invoice in XML based on its Intacct structure into XML that will be used in a custom PDF template in order to build a PDF file using the invoice data.

Because we have the XML for the invoice, we can use the script and templates included in the sample to translate the document into an XML format that is ready to be used to build a PDF file.

How the Translation Works

The script.rsb file maps the values at specific XPaths in the XML document from the Intacct database connector to new fields, which correspond to the names of the editable fields in the PDF form and will be used to create a new document based on the PDF template file.

Performing the Translation

To translate the XML invoice, simply select an XML document in the Send folder of the MAP_Invoice_XML Connector and click Send. This will create a new XML document with a named based on the DocId of the SODocument and the current time, and the same process will also place the document in the Send folder of the PDF Connector. This XML document is comprised of elements that correspond to the names of the editable fields in PDF template for the PDF Connector.

Convert an XML Invoice to a PDF

The last piece of the sample is converting the invoice in XML format into a PDF. We trigger the Arc application to process the XML file by selecting the file on the Send tab for the PDF Connector and clicking Send.

When we click Send, the XML from the mapping connector is injected into the PDF template referenced by the PDF Connector. The elements in the XML file correspond directly with the names of the empty fields in the PDF template.

It is at this point that the invoice (as a PDF) 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.

Here, we should note that the PDF Connector is capable of generating bar codes based on numeric strings. To do so, you would simply configure the PDF template to include a bar code image and either embed the bar code font in the PDF or ensure that your trading partners have the appropriate font installed on their machines. To configure the XML data file to be converted into PDF, the bar code value to be encoded must start and end with an asterisk (*):


  ...
  *5789337490548932*
  ...

More Information & Next Steps

With Arc and CData Software, it is possible to automate your business document translation and integrate directly with Intacct. For more information on Arc, visit our home page. For more information on the Intacct 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 trial 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: