Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Removed

...

With the Zuora Query function, you can send query operations to Zuora Billing . This function supports two APIs that the users can choose from namely, Action Post Query and Data Query. Users can query data from Zuora to enrich their data processing and create meaningful chargeable records.

Configuration

To configure the Zuora Query Function, follow these steps:

In Environment, to access the Zuora tenant environment, specify:

...

If the Zuora tenant is available, you can access the Zuora REST API using the following endpoints:

...

and retrieve the response for further enrichment. This enrichment can provide more context and details to the subscription billing data, enabling deeper insights, improve decision-making, and for 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 Data Query and 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:

...

...

...

...

...

  • : Use this option to access your own custom tenant environment. Specify the URL for your endpoint.

...

In Credentials, you can choose to authenticate using two methods. In Authenticate by specify:

...

OAuth

...

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 toggleis disabled.

Select how you want to perform authentication. You can select either authentication method:

  • OAuth 2.0

  • API key

Client ID

Note!

This option only appears Secrets wallet toggleis 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 toggleis 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 toggleis 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 toggleis 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

...

titleNote!

...

You can also use the Secrets Wallet toggle button to select a predefined Zuora secret from your Secrets Wallet.

...

Multi-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

...

...

Query

Use data query

Select if you want to write your queries

...

as Data Query or ZOQL. By default, the queries use the

...

titleNote!

...

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:

  • Data Query - Zuora endpoint is POST to /query/jobs

  • ZOQL - Zuora endpoint is POST to/v1/action/query.

When using Data Query API, the Zuora endpoint is POST to /query/jobs.

...

Query body

Enter the body of the query.

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'.

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'.

Enable result headers.pngImage Added

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.pngImage Added

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:

  • Ignore

  • Stop the stream

...

Any response with the HTTP status code 4xx or 5xx is considered an error. All errors get logged in the system logs. See Logs for more information.

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

InputData

None.

Output Data

The query response from Zuora.

...

Below is a sample output data.

Code Block
[
    {
        "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"
            }
        ]
    }
]