Build a Simple VCL Application for Zuora Data

Ready to get started?

Download for a free trial:

Download Now

Learn more:

Zuora FireDAC Components

Rapidly create and deploy powerful Delphi & C++Builder Apps that integrate with Zuora.



How to build a simple VCL Application to view Zuora data in RAD Studio using the CData FireDAC Components for Zuora.

Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData FireDAC Components for Zuora, you gain access to live Zuora data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to retrieve Zuora data. This article will walk through connecting to Zuora and creating a simple VCL application with the Form Designer.

Creating a VCL Application for Zuora Data

The following instructions show how to use the Form Designer to create a simple VCL Forms application that shows the basic FireDAC objects needed to connect to Zuora from any application.

The following example populates a TDBGrid control.

  1. Create a new VCL Forms Application.
  2. Drop a TFDPhysZuoraDriverLink and TFDConnection object onto the form.
  3. Double-click the TFDConnection object. The FireDAC Connection Editor is displayed. Select "CData.Zuora" in the DriverId menu and configure the connection properties.

    Zuora uses the OAuth standard to authenticate users. See the online Help documentation for a full OAuth authentication guide.

    Configuring Tenant property

    In order to create a valid connection with the provider you need to choose one of the Tenant values (USProduction by default) which matches your account configuration. The following is a list with the available options:

    • USProduction: Requests sent to https://rest.zuora.com.
    • USAPISandbox: Requests sent to https://rest.apisandbox.zuora.com"
    • USPerformanceTest: Requests sent to https://rest.pt1.zuora.com"
    • EUProduction: Requests sent to https://rest.eu.zuora.com"
    • EUSandbox: Requests sent to https://rest.sandbox.eu.zuora.com"

    Selecting a Zuora Service

    Two Zuora services are available: Data Query and AQuA API. By default ZuoraService is set to AQuADataExport.

    DataQuery

    The Data Query feature enables you to export data from your Zuora tenant by performing asynchronous, read-only SQL queries. We recommend to use this service for quick lightweight SQL queries.

    Limitations
    • The maximum number of input records per table after filters have been applied: 1,000,000
    • The maximum number of output records: 100,000
    • The maximum number of simultaneous queries submitted for execution per tenant: 5
    • The maximum number of queued queries submitted for execution after reaching the limitation of simultaneous queries per tenant: 10
    • The maximum processing time for each query in hours: 1
    • The maximum size of memory allocated to each query in GB: 2
    • The maximum number of indices when using Index Join, in other words, the maximum number of records being returned by the left table based on the unique value used in the WHERE clause when using Index Join: 20,000

    AQuADataExport

    AQuA API export is designed to export all the records for all the objects ( tables ). AQuA query jobs have the following limitations:

    Limitations
    • If a query in an AQuA job is executed longer than 8 hours, this job will be killed automatically.
    • The killed AQuA job can be retried three times before returned as failed.

  4. Drop a TFDQuery object onto the form and set the properties below:

    • Connection - Set this property to the TFDConnection object, if this object is not already specified.
    • SQL - Click the button in the SQL property and enter a query.
    • Active - Set this property to true.
  5. Drop a TDataSource object onto the form and set the following property:

    • DataSet - In the menu for this property, select the name of the TFDQuery object.
  6. Drop a TDBGrid control onto the form and set the following property:

    • DataSource - Select the name of the TDataSource.
  7. Drop a TFDGUIxWaitCursor onto the form. This is required to avoid a run-time error.

You now have an executable application that displays the results of the SQL Query set in the TFDQuery object.