Zuora Query

With the Zuora Query Function, you can send query operations to Zuora Billing and retrieve the response. The Function sends requests using the POST method and then receives the responses, which are routed to the next Function in the stream. This Function supports two APIs Data Query and ZOQL

Sample stream with Zuora Query


 

Zuora Query Configuration


Configuration

You can configure the Function by entering the following details:

Environment

Specify the name of the Zuora environment in Tenant and the base URL for the REST endpoint in the URL. Select Custom to manually specify the appropriate endpoint.

You can access the Zuora REST API using the following endpoints:

TenantBase URL for REST Endpoints

US DC1 Production

https://rest.na.zuora.com/

US DC2 Production

https://rest.zuora.com/

US DC1 API Sandbox

https://rest.sandbox.na.zuora.com/

US DC2 API Sandbox

https://rest.apisandbox.zuora.com/

US Central Sandbox

https://rest.test.zuora.com/

EU Production

https://rest.eu.zuora.com/

EU Sandbox

https://rest.sandbox.eu.zuora.com/

EU Central Sandbox

https://rest.test.eu.zuora.com/

CustomYou can also access your custom tenant environment. Specify the URL for your endpoint.


Credentials

Select how you want to perform authentication. You can either select to use a predefined secret in your Secrets Wallet or an authentication method; either OAuth 2.0 or API Key. To select a predefined Zuora secret from your Secrets Wallet, turn on the Secrets Wallet toggle. If you enable the Secrets Wallet, the authentication settings will be replaced with a Secrets Wallet drop-down where you can select which secret to use.

Secrets Wallet Selection


Authentication using OAuth 2.0 or API Key

The following table describes the different settings you will see depending on your chosen authentication method.

Authentication TypeFieldDescription

OAuth 2.0

Client IDThe client ID is displayed when the OAuth client is created in Zuora. 
Client SecretThe client secret ID is displayed when the OAuth client is created in Zuora.
API KeyAccess Key IDThe identifier that is used to sign the requests sent to Zuora. It is displayed when the API User is created in Zuora.
Secret Access KeyThe key is used along with the Access Key ID to cryptographically sign the Zuora requests.

Entity

If you have Zuora Multi-entity enabled, specify the name of the Multi-entity you want to access. With Zuora Mulity-entity, you can create and manage multiple entities within a single Zuora tenant, see https://knowledgecenter.zuora.com/Billing/Tenant_Management/Multi-entity for more information.

You can specify the query-specific Function behavior in the Query section.

Query

Select if you want to write your queries as Data Query or ZOQL. By default, the queries use the Data Query language. To perform queries using ZOQL, turn off the Use Data Query toggle. You can access the Zuora API using the following endpoints:


APIZuora Endpoint
Data Query Zuora endpoint is POST to /query/jobs
ZOQLZuora endpoint is POST to/v1/action/query.

Result key

Enter a custom result key to be included in the query output.

Enable result headers

Select the checkbox to add a header to the response.

Cache settings

To enable the caching of items, turn on the Enable cache toggle. Here, an item refers to the response to a query. Specify the maximum number of items you wish to store in the cache and the time (in seconds) after which the items are removed.  An item is removed from the cache in case either the maximum number of items is reached or if an item is stored for more than the defined duration.


Cache Settings

Operational settings

In this section, you can define the behavior of the Function during execution. 

  • Wait for job completion for maximum: Enter the timeout duration. Once a query is submitted to the Zuora tenant, the query status will be sent repeatedly every 20 seconds and will be updated in the logs simultaneously. This is done until a final response is received or the defined timeout duration is reached. The maximum value allowed is 3600 seconds

  • Action on error: Select from the following actions you want to take in case of an error:
    • Ignore: The error is ignored and the stream will continue executing.
    • Stop the stream: The stream will stop. 

Note!

If you click Preview, only a maximum of five records will be displayed. However, during the actual execution of the stream, the entire result will be displayed.