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 then 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:
Tenant | Base URL for REST Endpoints |
---|---|
US DC1 Production | |
US DC2 Production | |
US DC1 API Sandbox | |
US DC2 API Sandbox | |
US Central Sandbox | |
EU Production | |
EU Sandbox | |
EU Central Sandbox | |
Custom | You 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 that you will see depending on which authentication method you have chosen.
Authentication Type | Field | Description |
---|---|---|
OAuth 2.0 | Client ID | The client ID is displayed when the OAuth client is created in Zuora. |
Client Secret | The client secret ID is displayed when the OAuth client is created in Zuora. | |
API Key | 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. |
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:
API | Zuora Endpoint |
---|---|
Data Query | Zuora endpoint is POST to /query/jobs |
ZOQL | Zuora 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 caching of items, turn on the Enable cache toggle. Here, an item refers to the response of a query. Specify the maximum number of items that you wish to store in the cache and the time (in seconds) after which the items are removed from the cache. 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 after every 20 seconds and will be updated in the logs simultaneously. And 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.