Skip to main content

Zuora CPQ metric fields mapping and derivation

Zuora

Zuora CPQ metric fields mapping and derivation

Overview

In the Zuora CPQ application, when the pricing information of the product is changed, the application gets the effective billing amount of the change from Zuora by making a call to the Preview an order API operation. After getting the response from the preview call, the metrics data of Zuora Billing is stored in the CPQ application in different objects based on the level of information. The following list includes objects in the CPQ where the billing amounts are stored from the preview response:

  • Quote (zqu__Quote__c): Stores summary information for all rate plans and charges at the parent level.
  • Quote Rate Plan Charge (zqu__QuoteRatePlanCharge__c)
    • Stores the charge information displayed in the UI. 
    • Zuora CPQ does not use any metrics in this object as a reference for Billing metrics. Only the list of fields returned from the Preview an order API operation are used as a reference for any amounts in this object.
  • Quote Charge Summary ((zqu__QuoteChargeSummary__c)
    • Stores the delta metrics as returned by the preview response.
    • Zuora CPQ references the metrics fields in this object to the OrderMetrics fields returned from the preview response.
  • Quote Charge Detail ((zqu__QuoteChargeDetail__c)
    • Stores the total lifetime amount of the charge for the subscription as returned by the preview response.
    • Zuora CPQ references the metrics fields in this object to the ChargeMetrics returned by the preview response.
  • Quote Charge Interval Detail ((zqu__QuoteChargeIntervalDetail__c)
    • Stores the interval level metrics of the charge for the ramp subscription as returned by the preview response.
    • Zuora CPQ references the metrics fields from in object to the RampMetrics fields returned by the preview response.
  • Quote Order Line Item ((zqu__QuoteOrderLineItem__c)
    • Stores the non subscription items attached to the quote and its related metrics as returned by the preview response.
    • Zuora CPQ references the metrics fields in this object to the Invoices fields returned by the preview response.
  • Quote Ramp Interval (zqu__QuoteRampInterval__c)
    • Stores the interval level metrics for the ramp subscription as returned by the preview response.
    • Zuora CPQ references the metrics fields in this object to the RampMetrics and Invoices fields returned by the preview response.

See the sections below for detailed information about the mapping relationships.

In addition, you should understand the following differences between CPQ X and CPQ 9 if you are using the Zuora CPQ API:

  • {{{cpqx}} Quote Studio application is built on top of the new QPlan data model and API. See CPQ X API for more information.
  • Zuora CPQ 9 UI is built on the existing legacy zChargeGroup data model and API.

Zuora CPQ objects and Preview an Order response mapping

This section describes how metric fields on Zuora CPQ objects are mapped or derived from the fields returned from the previewResult data block in the Preview an order response.

Quote Charge Summary (zqu__QuoteChargeSummary__c)

The Quote Charge Summary (zqu__QuoteChargeSummary__c) object is designed to store the delta metrics as returned by the preview response. The delta metrics are returned in the OrderMetrics data block. Below table describes the mapping between the Quote Charge Summary object with the OrderMetrics data block as returned in the preview response.

Metric Field  Preview Result field mapping Description
Delta MRR
(zqu__DeltaMRR__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> amount Identify the OrderMetrics data block for the corresponding charge (based on the “chargeNumber” & “OrderAction” type field) and get the “mrr.amount” field value with condition “mrr.type” = “Regular”.
Delta MRR Start Date
(zqu__DeltaMRRStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> startDate Get the “mrr.startDate” field value with condition “mrr.type” = “Regular”.
Delta MRR End Date
(zqu__DeltaMRREndDate__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> endDate Get the “mrr.endDate” field value with condition “mrr.type” = “Regular”.
Delta Discount MRR
(zqu__DeltaDiscountMRR__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> amount Get the “mrr.amount” field value with condition “mrr.type” = “Discount”.
Delta Discount MRR Start Date
(zqu__DeltaDiscountMRRStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> startDate Get the “mrr.startDate” field value with condition “mrr.type” = “Discount”.
Delta Discount MRR End Date
(zqu__DeltaDiscountMRREndDate__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> endDate Get the “mrr.endDate” field value with condition “mrr.type” = “Discount”.
Delta TCV
(zqu__DeltaTCV__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> amount Get the “tcv.amount” field value with condition “tcv.type” = “Regular”.
Delta TCV Start Date
(zqu__DeltaTCVStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> startDate Get the “tcv.startDate” field value with condition “tcv.type” = “Regular”.
Delta TCV End Date
(zqu__DeltaTCVEndDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> endDate Get the “tcv.endDate” field value with condition “tcv.type” = “Regular”.
Delta Discount TCV
(zqu__DeltaDiscountTCV__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> amount Get the “tcv.amount” field value with condition “tcv.type” = “Discount”.
Delta Discount TCV Start Date
(zqu__DeltaDiscountTCVStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> startDate Get the “tcv.startDate” field value with condition “tcv.type” = “Discount”.
Delta Discount TCV End Date
(zqu__DeltaDiscountTCVEndDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> endDate Get the “tcv.endDate” field value with condition “tcv.type” = “Discount”.
Delta TCB
(zqu__DeltaTCB__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> amount

Get the “tcb.amount” field value with condition “tcb.type” = “Regular”.

Delta TCB Start Date
(zqu__DeltaTCBStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> startDate Get the “tcb.startDate” field value with condition “tcb.type” = “Regular”.
Delta TCB End Date
(zqu__DeltaTCBEndDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> endDate Get the “tcb.endDate” field value with condition “tcb.type” = “Regular”.
Delta Discount TCB
(zqu__DeltaDiscountTCB__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> amount Get the “tcb.amount” field value with condition “tcb.type” = “Discount”.
Delta Discount TCB Start Date
(zqu__DeltaDiscountTCBStartDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> startDate Get the “tcb.startDate” field value with condition “tcb.type” = “Discount”.
Delta Discount TCB End Date
(zqu__DeltaDiscountTCBEndDate__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> endDate Get the “tcb.endDate” field value with condition “tcb.type” = “Discount”.
Delta TCB Tax
(zqu__DeltaTCBTax__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> tax Get the “tcb.tax” field value with condition “tcb.type” = “Regular”.
Delta Discount TCB Tax
(zqu__DeltaDiscountTCBTax__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> tax Get the “tcb.tax” field value with condition “tcb.type” = “Discount”.
Quantity
(zqu__Quantity__c)
orderMetrics -> orderActions -> orderMetrics -> quantity -> amount

Get the “quantity.amount” field value.

Quote Rate Plan Charge (zqu__QuoteRatePlanCharge__c)

The Quote Rate Plan Charge (zqu__QuoteRatePlanCharge__c) object also stores the delta metrics as returned by the preview response. Currently, the same delta metrics information is stored in both the Quote Rate Plan Charge and Quote Charge Summary object.

Metric Field Preview Result field mapping Description
Delta MRR
(DeltaMRR__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> amount Identify the OrderMetrics data block for the corresponding charge (based on the “chargeNumber” & “OrderAction” type field) and get the “mrr.amount” field value with condition “mrr.type” = “Regular”.
Delta Discount MRR
(DeltaDiscountMRR__c)
orderMetrics -> orderActions -> orderMetrics -> mrr -> amount Get the “mrr.amount” field value with condition “mrr.type” = “Discount”.
Delta TCV
(DeltaTCV__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> amount Get the “tcv.amount” field value with condition “tcv.type” = “Regular”.
Delta Discount TCV
(DeltaDiscountTCV__c)
orderMetrics -> orderActions -> orderMetrics -> tcv -> amount Get the “tcv.amount” field value with condition “tcv.type” = “Discount”.
Delta TCB
(DeltaTCB__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> amount Get the “tcb.amount” field value with condition “tcb.type” = “Regular”.
Delta Discount TCB
(DeltaDiscountTCB__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> amount Get the “tcb.amount” field value with condition “tcb.type” = “Discount”.
Delta TCB Tax
(DeltaTCBTax__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> tax Get the “tcb.tax” field value with condition “tcb.type” = “Regular”.
Delta Discount TCB Tax
(DeltaDiscountTCBTax__c)
orderMetrics -> orderActions -> orderMetrics -> tcb -> tax Get the “tcb.tax” field value with condition “tcb.type” = “Discount”.

Quote Charge Detail (zqu__QuoteChargeDetail__c)

The Quote Charge Detail (zqu__QuoteChargeDetail__c) object is designed to store the total lifetime amount of the charge for the subscription as returned by the preview response. This information is returned in the ChargeMetrics data block. Below table describes the mapping between the Quote Charge Detail object with the ChargeMetrics data block as returned in the preview response.

Metric Field Preview Result field mapping Description
MRR
(MRR__c)
chargeMetrics -> charges -> cmrr -> regular Identify the ChargeMetrics data block for the corresponding charge based on the “chargeNumber” and get the “cmrr.regular” field value.
TCB
(TCB__c)
chargeMetrics -> charges -> tcb -> regular Get the “tcb.regular” field value.
TCV
(TCV__c)
chargeMetrics -> charges -> tcv -> regular Get the “tcv.regular” field value.
Delta MRR
(DeltaMRR__c)
chargeMetrics -> charges -> cmrr -> regularDelta Get the “cmrr.regularDelta” field value.
Delta TCB
(DeltaTCB__c)
chargeMetrics -> charges -> tcb -> regularDelta Get the “tcb.regularDelta” field value.
Delta TCV
(DeltaTCV__c)
chargeMetrics -> charges -> tcv -> regularDelta Get the “tcv.regularDelta” field value.
Discount MRR
(DiscountMRR__c)
chargeMetrics -> charges -> cmrr -> discount Get the “cmrr.discount” field value.
Discount TCB
(DiscountTCB__c)
chargeMetrics -> charges -> tcb -> discount Get the “tcb.discount” field value.
Discount TCV
(DiscountTCV__c)
chargeMetrics -> charges -> tcv -> discount Get the “tcv.discount” field value.
Delta Discount MRR
(DeltaDiscountMRR__c)
chargeMetrics -> charges -> cmrr -> discountDelta Get the “cmrr.discountDelta” field value.
Delta Discount TCB
(DeltaDiscountTCB__c)
chargeMetrics -> charges -> tcb -> discountDelta Get the “tcb.discountDelta” field value.
Delta Discount TCV
(DeltaDiscountTCV__c)
chargeMetrics -> charges -> tcv -> discountDelta Get the “tcv.discountDelta” field value.
TCB Tax
(TCBTax__c)
chargeMetrics -> charges -> tax -> regular Get the “tax.regular” field value.
Delta TCB Tax
(DeltaTCBTax__c)
chargeMetrics -> charges -> tax -> regularDelta Get the “tax.regularDelta” field value.
Discount TCB Tax
(DiscountTCBTax__c)
chargeMetrics -> charges -> tax -> discount Get the “tax.discount” field value.
Delta Discount TCB Tax
(DeltaDiscountTCBTax__c)
chargeMetrics -> charges -> tax -> discountDelta Get the “tax.discountDelta” field value.

Quote Charge Interval Detail (zqu__QuoteChargeIntervalDetail__c) 

The Quote Charge Interval Detail (zqu__QuoteChargeIntervalDetail__c) object is designed to store the interval level metrics of the charge for the ramp subscription as returned by the preview response. This information is returned in the RampMetrics data block. Below table describes the mapping between the Quote Charge Interval Detail object with the RampMetrics data block as returned in the preview response.

Metric Field Preview Result field mapping Description
Net TCB
(TCB__c)
rampMetrics -> intervals -> intervalMetrics -> netTcb Identify the ramp interval metrics data block for the corresponding charge based on the “chargeNumber”, “startDate”, “endDate” and get the “netTcb” field value.
Net MRR
(MRR__c)
rampMetrics -> intervals -> intervalMetrics -> mrr -> net Get the “mrr.net” field value.
Delta TCB
(DeltaTCB__c)
rampMetrics -> intervals -> intervalDeltaMetrics -> deltaNetTcb Identify the ramp interval delta metrics data block for the corresponding charge based on the “chargeNumber”, “startDate”, “endDate” and get the “deltaNetTcb” field value.
Delta MRR
(DeltaMRR__c)
rampMetrics -> intervals -> intervalDeltaMetrics -> deltaMrr -> net Get the “deltaMrr.net” field value.

Quote Order Line Item (zqu__QuoteOrderLineItem__c)

The Quote Order Line Item (zqu__QuoteOrderLineItem__c) object is designed to store the non subscription items attached to the quote and its related metrics as returned by the preview response. This information is returned in the Invoices data block. Below table describes the mapping between the Quote Order Line Item object with the Invoices data block as returned in the preview response.

Metric Field Preview Result field mapping Description
Subtotal
(Subtotal__c)
invoices -> invoiceItems -> amountWithoutTax Identify the invoice item data block for the corresponding line item element matching the “chargeNumber” with the line item name and “orderLineItemNumber” is not null. Then get the “amountWithoutTax” field value.
Tax
(Tax__c)
invoices -> invoiceItems -> taxAmount Get the “taxAmount” field value.
Total
(Total__c)
invoices -> invoiceItems -> (amountWithoutTax + taxAmount) Sum of “amountWithoutTax” and “taxAmount” value.

Quote Ramp Interval (zqu__QuoteRampInterval__c)

Quote Ramp Interval (zqu__QuoteRampInterval__c) object is designed to store the interval metrics as returned by the preview response. This information is returned in the IntervalMetrics data block. Below table describes the mapping between the Quote Ramp Interval object with the IntervalMetrics data block as returned in the preview response.

 

Metric Field Preview Result field mapping Description
Inline Discount                                              (zqu__Inline_Discount__c) NA (Doesn’t depend on Preview Response) Calculated on Quote Studio screen
Interval Discount (zqu__Interval_Discount__c) invoices -> invoiceItems -> amountWithoutTax SUM (invoiceItems.amountWithoutTax) of all the invoiceItems data blocks where “processingType” = “Discount” and date range is within the interval.
Interval Subtotal    (zqu__Interval_Subtotal__c) invoices -> invoiceItems -> amountWithoutTax SUM (invoiceItems.amountWithoutTax) of the invoiceItems data blocks where “processingType” = “Charge” and date range is within the interval.
Interval Tax                  (zqu__Interval_Tax__c) invoices -> invoiceItems -> taxAmount SUM (invoiceItems.taxAmount) of the invoicelitems data blocks where date range is within the interval
Interval Total              (zqu__Interval_Total__c) Interval Subtotal + Interval Tax - Interval Discount Interval Subtotal + Interval Tax - Interval Discount
Gross TCB                  (zqu__Gross_TCB__c) rampMetrics -> intervals -> grossTcb Get the “interval” from “intervals” list, then get the “interval.grossTcb” field value
Gross TCV                  (zqu__Gross_TCV__c) rampMetrics -> intervals -> grossTcv Get the “interval” from “intervals” list, then get the “interval.grossTcv” field value
Net TCB                                                      (zqu__Net_TCB__c) rampMetrics -> intervals -> netTcb Get the “interval” from “intervals” list, then get the “interval.netTcb” field value
Net TCV                                                      (zqu__Net_TCV__c) rampMetrics -> intervals -> netTcv Get the “interval” from “intervals” list, then get the “interval.netTcv” field value
Discount TCB          (zqu__Discount_TCB__c) rampMetrics -> intervals -> discountTcb Get the “interval” from “intervals” list, then get the “interval.discountTcb” field value
Discount TCV          (zqu__Discount_TCV__c) rampMetrics -> intervals -> discountTcv Get the “interval” from “intervals” list, then get the “interval.discountTcv” field value

Quote (zqu__Quote__c)

The Quote (zqu__Quote__c) object is designed to store the cumulative metrics amounts of the subscription as returned by the preview response. Quote metrics will store the amounts for subscription charges, non-subscription order line items and combined total amounts. This information is derived from the ChargeMetrics and Invoices data blocks. Below table describes the mapping between the Quote object with the ChargeMetrics and Invoices data blocks as returned in the preview response.

Metric Field Preview Result field mapping Description
MRR
(Previewed_MRR__c)
chargeMetrics -> charges -> cmrr -> regular SUM (cmmr.regular) of all the charge metrics data blocks.
TCB
(Previewed_TCB__c)
chargeMetrics -> charges -> tcb -> regular SUM (tcb.regular) of all the charge metrics data blocks.
TCV
(Previewed_TCV__c)
chargeMetrics -> charges -> tcv -> regular SUM (tcv.regular) of all the charge metrics data blocks.
Delta MRR
(Previewed_Delta_MRR__c)
chargeMetrics -> charges -> cmrr -> regularDelta SUM (cmmr.regularDelta) of all the charge metrics data blocks.
Delta TCB
(Previewed_Delta_TCB__c)
chargeMetrics -> charges -> tcb -> regularDelta SUM (tcb.regularDelta) of all the charge metrics data blocks.
Delta TCV
(Previewed_Delta_TCV__c)
chargeMetrics -> charges -> tcv -> regularDelta SUM (tcv.regularDelta) of all the charge metrics data blocks.
Discount MRR
(DiscountMRR__c)
chargeMetrics -> charges -> cmrr -> discount SUM (cmmr.discount) of all the charge metrics data blocks.
Discount TCB
(DiscountTCB__c)
chargeMetrics -> charges -> tcb -> discount SUM (tcb.discount) of all the charge metrics data blocks.
Discount TCV
(DiscountTCV__c)
chargeMetrics -> charges -> tcv -> discount SUM (tcv.discount) of all the charge metrics data blocks.
Delta Discount MRR
(DeltaDiscountMRR__c)
chargeMetrics -> charges -> cmrr -> discountDelta SUM (cmmr.discountDelta) of all the charge metrics data blocks.
Delta Discount TCB
(DeltaDiscountTCB__c)
chargeMetrics -> charges -> tcb -> discountDelta SUM (tcb.discountDelta) of all the charge metrics data blocks.
Delta Discount TCV
(DeltaDiscountTCV__c)
chargeMetrics -> charges -> tcv -> discountDelta SUM (tcv.discountDelta) of all the charge metrics data blocks.
TCB Tax
(TCBTax__c)
chargeMetrics -> charges -> tax -> regular SUM (tax.regular) of all the charge metrics data blocks.
Delta TCB Tax
(DeltaTCBTax__c)
chargeMetrics -> charges -> tax -> regularDelta SUM (tax.regularDelta) of all the charge metrics data blocks.
Discount TCB Tax
(DiscountTCBTax__c)
chargeMetrics -> charges -> tax -> discount SUM (tax.discount) of all the charge metrics data blocks.
Delta Discount TCB Tax
(DeltaDiscountTCBTax__c)
chargeMetrics -> charges -> tax -> discountDelta SUM (tax.discountDelta) of all the charge metrics data blocks.
Total
(Previewed_Total__c)
invoices -> amountWithoutTax SUM(invoices.amountWithoutTax) of all the invoices data blocks.
Tax
(Previewed_Tax__c)
invoices -> taxAmount SUM(invoices.taxAmount) of all the invoices data blocks.
Discount
(Previewed_Discount__c)
invoices -> invoiceItems -> amountWithoutTax SUM(invoiceItems.amountWithoutTax) of all the invoiceItems data blocks where “processingType” = “Discount”.
Sub-Total
(Previewed_SubTotal__c)
Total - Tax - Discount Calculate (Total - Tax - Discount).
Quote Line Item Subtotal
(Qli_Subtotal__c)
invoices -> invoiceItems -> amountWithoutTax SUM(invoiceItems.amountWithoutTax) of all the data blocks for the Order Line Items (which is identified with “orderLineItemNumber” is not null).
Quote Line Item Tax
(Qli_Tax__c)
invoices -> invoiceItems -> taxAmount SUM(invoiceItems.taxAmount) of all the data blocks for the Order Line Items (which is identified with “orderLineItemNumber” is not null).
Quote Line Item Total
(Qli_Total__c)
invoices -> invoiceItems -> (amountWithoutTax + taxAmount) SUM(invoiceItems.amountWithoutTax) + SUM(invoiceItems.taxAmount) of all the data blocks for the Order Line Items (which is identified with “orderLineItemNumber” is not null).
Subscription Subtotal
(Subscription_Subtotal__c)
Quote Subtotal - OLI Subtotal Calculate (Quote Subtotal - OLI Subtotal).
Subscription Tax
(Subscription_Tax__c)
Quote Tax - OLI Tax Calculate (Quote Tax - OLI Tax).
Subscription Total
(Subscription_Total__c)
Quote Total - OLI Total Calculate (Quote Total - OLI Total).
Inline Discount
(Inline_Discount__c)
NA (Doesn’t depend on Preview Response) Calculated on Quote Studio Screen