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
You can configure the Function by entering the following details:
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:
You can also access your custom tenant environment. Specify the URL for your endpoint.
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.
The client ID is displayed when the OAuth client is created in Zuora.
The client secret ID is displayed when the OAuth client is created in Zuora.
Access Key ID
The identifier that is used to sign the requests sent to Zuora. It is displayed when the API User is created in Zuora.
Secret Access Key
The key is used along with the Access Key ID to cryptographically sign the Zuora requests.
You can specify the query-specific Function behavior in the Query section.
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 UseData Query toggle. You can access the Zuora API using the following endpoints:
Zuora endpoint is POST to /query/jobs
Zuora endpoint is POST to/v1/action/query.
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.
To enable the caching of items, turn on theEnable 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.
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.
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.