Zuora Query
With the Zuora Query function, you can send query operations to Zuora Billing and retrieve the response for further enrichment. This enrichment can provide more context and details to the subscription billing data, enabling deeper insights, improving decision-making, and enabling more efficient operations. Enriched data from the Zuora Query function can be passed down for further processing by the next function in the stream.
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 https://knowledgecenter.zuora.com/Zuora_Central_Platform/Query/Data_Query and https://knowledgecenter.zuora.com/Zuora_Central_Platform/Query/ZOQL.
You can configure the function by entering the following details:
Settings
Setting | Description |
|---|---|
Environment | |
Tenant | Select the Zuora environment. The following endpoints are available for selection:
|
Credentials | |
Select from secrets wallet | To select a predefined Zuora secret from your Secrets wallet, turn on the Secrets wallet toggle. |
Authentication by | Note! This option only appears Secrets wallet toggle is disabled. Select how you want to perform authentication. You can select either authentication method:
|
Client ID | Note! This option only appears Secrets wallet toggle is disabled, and the OAuth 2.0 authentication method is selected for the Authentication by option. Enter the client ID that is displayed when the OAuth client is created in Zuora. |
Client secret | Note! This option only appears Secrets wallet toggle is disabled, and the OAuth 2.0 authentication method is selected for the Authentication by option. Enter the client secret ID that is displayed when the OAuth client is created in Zuora. |
Access key ID | Note! This option only appears Secrets wallet toggle is disabled, and the API key authentication method is selected for the Authentication by option. Enter 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 | Note! This option only appears Secrets wallet toggle is disabled, and the API key authentication method is selected for the Authentication by option. Enter the key that is used along with the Access key ID to cryptographically sign the Zuora requests. |
Entity | |
Multi-entity | Enter the ID of the entity that you want this function to send data to. Note! Zuora expects each request to contain records for a single entity ID. If you have records for multiple entity IDs, split them before this function and configure a separate function instance for each entity ID. For more information about Zuora Multi-entity, see https://knowledgecenter.zuora.com/Billing/Tenant_Management/Multi-entity. Note! When you enter content in the Multi-entity field, you can use variable insertion (interpolation). For details, see Variable insertion. |
Query | |
Use data 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:
Note! When the Use data query toggle is turned on and a status
|
Query body | Enter the body of the query. Note! Sensitive parameters cannot be used in the Query body field. Note! When you enter content in the Query body field, you can use variable insertion (interpolation). For details, see Variable insertion. |
Use Index Join | Note! This option only appears when the Use data query toggle is enabled. Check the Use Index Join check box to enable Index Join to speed up retrieving data from multiple tables. See Zuora’s Index JOIN for more information. |
Result key | Enter a custom result key to be included in the query output. The default result key is 'ZuoraQueryResponse'. Note! Sensitive parameters cannot be used in the Result key field. |
Enable result headers | Select the check box to add a header to the response in the Result headers key field. The default result headers key is 'ZuoraQueryResponseHeaders'. Note! Sensitive parameters cannot be used in the Result headers key field. Enable result headers configuration |
Cache settings | |
Enable cache | 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 configuration |
Operational settings | |
Wait for job completion for maximum | Enter the wait time duration for the query job’s final state. Once a query is submitted to the Zuora tenant, the job will be retried repeatedly every second until a final response is received, or the defined wait time duration is reached. If no final state is received within the specified time period of the query job, the stream execution will be aborted. The maximum value allowed is 3600 seconds. |
Action on error | Select the action you want to take in case of an error, the options are:
Any response with the HTTP status code The default value is Ignore. |
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.
Input/Output data
Input data
None.
Output data
Below is a sample output data:
[
{
"value": 1,
"ZuoraQueryResponse": [
{
"Product Charge": "Annual User Charge"
},
{
"Product Charge": "CloudStream Power Supply"
},
{
"Product Charge": "Monthly User Charge"
},
{
"Product Charge": "t2.medium Usage Charge"
},
{
"Product Charge": "Professional Services Fixed Bid"
}
]
}
]