Enrichment with data query function
When metering a raw usage event, Zuora enriches it with the related Zuora business models for further guidance. For example, we add the charge name based on the value of a custom field in the event.
For all the available business models, see Zuora Business Model.
Prerequisites
Zuora will enable the Prefetch & Lookup feature for your tenant before you can enrich or look up the Zuora business models. Please provide the following information for your tenant and send the request to support@zuora.com.
- ClientId: The OAuth client ID for Data Query. Please make sure that ClientId must have permission to Custom Object if you want to reference the Billing business model with Custom Objects.
- Cron Settings (optional): To configure the refresh interval for the billing objects synced from the Billing database to our internal store. The sync can work in Full or Incremental mode. In Full mode, it will refresh the data in the internal store based on the setting:
cronFull
. In incremental mode, it will only update the objects that are modified in the Billing Database. The setting:cronIncremental
controls the update frequency. If you want to auto-sync the standard billing objects, these settings must be configured.
Here is an example of a full configuration:
{
"dataPrefetch": {
"clientId": "d8298dc0-b0a0-4f6b-8c15-ab1687df41bd",
"cronFull": "0 0 2 * * 7",
"cronIncremental": "0 0/10 * * * *"
}
}
Enrichment Processor
Step 1: Select the Enrichment Option
There are three options in the Enrichment Processor:
- Enrich events using Product or Account data: Guiding more fields in the Account group (including Account, Subscription, RatePlan, RatePlanCharge, RatePlanChargeTier) or Product group (including Product, ProductRatePlan, ProductRatePlanCharge, ProductRatePlanChargeTier)
- Enrich events using Data Query: Guiding any field in Billing Objects by Data Query SQL.
- Enrich events using Account Number and Charge Name or Subscription Id: Guiding the ASCU by Account Number and Charge Name or Subscription ID
Step 2: Setting the Field Mapping and Fields to Append
Enrich events using fields from Zuora Standard Objects
Enrich events using Data Query
You can copy the SQL to a Data Query and verify it before prefetching. In case of a large dataset, make sure to append limit 1 to the SQL when you verify in the DQ.
Step 3: Check the prefetch status
Click the Prefetch button on the top right and verify the following information that appears in the Data Prefetch dialog:
Processor: The name of Enrichment Processor.
Status: The data prefetch status. NEVER FETCHED, FETCHING, FETCHED.
Last Updated: The DateTime of syncing data from Billing.
Action: Fetch/ Cancel/ Fetch Again.
Step 4: Run / Test a meter
Usage Guidelines
The following usage limits apply to the enrichment options:
Enrich events using Product and Account data
- The maximum number of input records per Billing model after filters have been applied is 10M, and for output records is 10M
Enrich events using Data Query
- The maximum number of input records per Billing model after filters have been applied is 10M, and the maximum number of output records is 500K.
- By default, Mediation will not automatically sync data from Billing on the DQ queries defined in the advanced enrichments scripts since it needs a FULL sync-up. But you can refresh the synced data manually, as shown in the image below:
Contact support@zuora.com for further assistance on auto sync-up. Zuora will review your SQL first and enable the auto full sync-up as the prerequisite described.
- The output schema of guiding fields is wrapped as text.
- The updated/created billing objects might not be reflected in the enrichment until the next incremental sync-up or a full sync-up.
Contact us
- Please contact support to give an estimation of the volume of Billing objects.
- Reach out to our support team if your tenant needs a big volume of billing objects support.