Working with QuickBooks Desktop Custom Fields in SSIS

12 April 2022
KingswaySoft Team

Custom fields have some special behaviors in the QuickBooks desktop application, which makes them to some degree difficult to work with if we don't know exactly how to work with them. This can create some substantial challenges for any integration projects that we might be working on. In this blog post, we will explain how to work with custom fields using our SSIS Integration Toolkit for QuickBooks product by giving you some detailed instructions which we hope you may leverage in your integration projects.

Let's get started.

Setup QuickBooks Desktop Gateway and Establish Connection

Our first step is to configure the QuickBooks Desktop Gateway which provides an API access to the underlying QuickBooks application which is otherwise not accessible from a different computer or server. QuickBooks desktop gateway is a program shipped with our SSIS Integration Toolkit for QuickBooks product, and it is a required component for us to connect to the application in an SSIS ETL process. In order for the it to work, the QuickBooks Desktop Gateway program has to be installed on the computer where the QuickBooks desktop application is installed and operated on. Once the gateway has been installed, it exposes a set of APIs which provide access to the SSIS components installed on a different development workstation or SSIS runtime server. The following is a screenshot of the gateway program in operation.

Image 001 - QuickBooks Desktop Gateway

Once the QuickBooks Desktop Gateway has been configured and running, we will be moving to our SSIS development environment. From within the Visual Studio (SSDT) environment, we will create a QuickBooks Connection Manager that connects to the desktop gateway in order to facilitate data integration with the QuickBooks desktop application behind the scenes.

Within the connection manager, we would set the Deployment type to Desktop and provide the Service URL and credentials by following the QuickBooks Desktop Gateway setup. The Service URL should have an address in the following format:

  • http(s)://<server-name>:<port>

The <port> number in the Service URL is the port number used in the QuickBooks Desktop Gateway.

Image 002 - QuickBooks Connection Manager

If everything has been set up correctly, clicking the Test Connection button at the bottom left of the editor should return a “Test connection succeeded” message as shown above.

Reading Custom Fields Values

Reading data from QuickBooks is generally accomplished by using the QuickBooks source component shipped in our SSIS Integration Toolkit for QuickBooks product. Custom fields are stored as data extensions in QuickBooks Desktop applications. To retrieve the values of custom fields from an object (such as the list object or transaction object), you would need to enable the DataExt child entity in the QuickBooks source component, and apply an OwnerID filter of 0 in the query. To elaborate a little further, OwnerID of 0 is specifically reserved for custom fields, which is the reason that this query is required in the source component when reading custom field values.

The screenshot below shows a configuration that will retrieve all Employee records along with all Employees’ custom field data:

Image 003 - Read custom fields from QuickBooks Desktop

Now, with the OwnerID filter provided, let's setup two dummy destination components that would receive the data from the QuickBooks source component. When doing so, we have enabled the Data Viewer before the two destination components in order to view the data flowing through the SSIS pipeline while debugging the data flow. As shown in the screenshot below, the QuickBooks custom field data is returned in the DataExt child entity output (the data viewer on the right). The DataExt rows can be linked back to the parent Employee rows by the virtual LinkId field and ParentLinkId field, which are made available to the QuickBooks Source component's two outputs.

Image 007 - QuickBooks Source Outputs

Writing Custom Fields Values

Now let's talk about the writing. In order to write data to QuickBooks custom fields, we need to work with the DataExt object as well in the QuickBooks Destination component, in which you will find 3 actions available to the DataExt object, including Create, Update and Delete.

Image 004 - QuickBooks Destination

In our case, we will be working with the same custom field under the name of "Source" which we have just discussed in the reading section above and will be adding values to the field in the Employee object. Before we set up the destination component, we use a Premium Derived Column component to generate our hard-coded value, which is "Email", as shown below. Then, it will be added to the Employee record that has an EmployeeId of “40000-1199214003”, this is an Employee record that already exists in QuickBooks.

Image 005 - Premium Derived Column Test Data

The screenshot below shows the columns mapping of the QuickBooks Destination component for writing purpose:

Image 006 - QuickBooks Destination Columns Mapping

Once we have the destination component properly configured, as shown above, we should be able to run this data flow task. When executed, we will write to the custom field successfully.

Conclusion

In conclusion, working with QuickBooks Desktop data can be extremely easy using the KingswaySoft QuickBooks components without the needs of writing a single line of code. We hope you find this post helpful.

Archive

November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags