Zuora Export ZOQL (Zuora Object Query Language) is the query language used to create Exports with the Export object in the Zuora SOAP API. Zuora Export ZOQL is similar to our general ZOQL, with a few differences. The biggest difference is that with Exports, you query a Zuora data source, not a SOAP API object.
A Zuora data source is a SOAP object pre-joined with other related objects. For example, the Account data source includes all of the fields associated with the
account object, and also the fields from additional related objects such as, the bill-to contact, sold-to contact, and default payment method. This allows your query to include data from related objects in a single operation, convenient for reporting, business intelligence, and other applications that might otherwise require a multi-step operation to capture related data. Data sources save you the effort of constructing nested queries, and result in fewer round-trips and faster performance.
For example, when you query subscriptions through the Subscription data source, you also get the related accounts, bill-to contacts, sold-to contacts, and default payment methods.
To view all field and field values for any data source, you can use the Zuora REST API URL:
<datasource> is the name of the data source such as: Account, RatePlanCharge, InvoiceItem, or another data source name. You must specify your Zuora credentials using Basic Authentication or by setting a cookie with a valid Zuora Session ID. See Creating an Export for additional details.
For example, the following URL will return an XML description of the RatePlan data source:
Although any base object in the Z-Commerce API is also a data source, not every data source offers additional pre-joined objects. For example, the PaymentMethod data source does not have any additional objects joined to it. Because of this, the PaymentMethod data source is equivalent to the PaymentMethod Z-Object.
<datasource> call reveals all the data source field attributes. If a data source field has a context attribute value of "
<context>soap</context>, then the field may be queried using SOAP, and if the data source field has a context attribute value of "
export" then the field may be retrieved using export ZOQL. Many field attributes may be retrieved using either query method.
Zuora data sources include all the fields of the associated SOAP API objects.
In the version 78 and earlier of Zuora WSDL, some of the fields in data sources and in the associated SOAP API objects might have different returned values.
In the version 79.0+ of WSDL, the Trigger Event return value is consistent between the data source and the SOAP API object.
For example, the
TriggerEvent field of the
RatePlanCharge data source returns the following values:
TriggerEvent field of the
RatePlanCharge SOAP API object returns the following values:
You must use the data source returned values in the Export ZOQL filter statements. For example:
Select RatePlanCharge.triggerevent from RatePlanCharge where RatePlanCharge.triggerevent = 'UCE'
20,000 characters are allowed in a data source ZOQL query.
The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora:
Submit a request at Zuora Global Support if you require additional assistance.
We can work with you to determine if large file optimization is an option for you.
The following table lists the data sources, their the base objects and the pre-joined objects. The object names are specified via the Zuora API names, and the base objects have links to the corresponding SOAP objects.
|Data Source||Base Object||Pre-joined Objects|
|Credit Balance Adjustment |
(Credit Balance Permission Enabled)
|Payment Gateway |
Reconciliation Event Log
|Payment Reconciliation Log||PaymentReconciliationLog|| |
|Invoice Adjustment||InvoiceAdjustment|| |
|Invoice Item||InvoiceItem|| |
|Invoice Item Adjustment||InvoiceItemAdjustment|| |
|Invoice Payment||InvoicePayment|| |
(Z-Finance Enabled; SOAP API version 55.0+)
|Payment Method Transaction Log||PaymentMethod |
|Payment Transaction Log||PaymentTransactionLog|| |
|Processed Usage||ProcessedUsage|| |
|Product Rate Plan Charge||ProductRatePlanCharge|| |
|Product Rate Plan Charge Tier||ProductRatePlanChargeTier|| |
|Rate Plan||RatePlan|| |
|Rate Plan Charge||RatePlanCharge|| |
|Rate Plan Charge Tier||RatePlanChargeTier|| |
|Refund Invoice Payment||RefundInvoicePayment|| |
|Refund Transaction Log||RefundTransactionLog|| |
Revenue Event Item
|Payment Method Updater||UpdaterDetail|| |