Welcome to Zuora Product Documentation

Explore our rich library of product information

zCharge to QCharge

This document provides information on accessing various methods using QCharge, including details on method return types and access instructions.

The following table provides information about how to access different methods using QCharge:

MethodReturn TypeDescriptionHow to access using QCharge
BILL_CYCLE_DAYStringThe day of the month customer is billed for the charge.charge.get('zqu__BillCycleDay__c')
BILL_CYCLE_TYPEString

The billing day for the charge.

You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment.

The following values are supported:

DefaultFromCustomerSpecificDayofMonth:SubscriptionStartDayChargeTriggerDaySpecificDayofWeekThe SpecificDayofWeek value is available in the version 7.43 or later.

If you set this field toSpecificDayofMonth , you must specify which day of the month as the billing day for the charge in the BILL_CYCLE_DAY field.

If you set this field to SpecificDayofWeek, you must specify which day of the week as the billing day for the charge in the WEEKLY_BILL_CYCLE_DAY field.

charge.get('zqu__BillCycleType__c')
CHARGE_TYPEStringThe type of the charge as defined in the product catalog. charge.get('zqu__ChargeType__c')
chargeObjectSObjectStores the QuoteCharge and QuoteRatePlanCharge field values.charge.getRecord()
chargeOverrideReferenceIdStringThe quote rate plan charge id of the initially added charge that is being updated by the current charge. (Read-only.)charge.get('zqu__ChargeOverrideReferenceId__c')
chargeTiersObjectsList<QuoteCharge_Tier__c>

A list of the custom tiers or default product catalog tiers based on the value of the hasCustomTiers property:

  • If hasCustomTiers is set to true, this property contains a list of the custom tiers.
  • If hasCustomTiers is set to false, this property contains the default tiers from the product catalog.

This property is available as of Zuora Quotes 6.0.

Use the populateCustomChargeTiers method to populate custom tiers.

List<zqu.QTier> tiers = charge.getTiers();
customfieldNameValueMapMAPA map of the custom field name to the labelNot available
DISCOUNTStringDiscountcharge.get('zqu__Discount__c')
DISCOUNT_LEVELStringFor the Discount type charge, the level at which the discount should apply to.charge.get('zqu__Discount_Level__c')
EFFECTIVE_PRICEStringEffective price of the chargecharge.get('zqu__EffectivePrice__c')
END_DATE_CONDITIONStringDefines when the charge ends after the charge trigger date.charge.get('zqu__enddatecondition__c')
fieldsChangedInRulesEngineList < String >Defines all of the charge fields modified by the Rules Engine.Not available
hasCustomTiersBoolean

A flag that you can get or set. Indicates if the current charge has custom tiers. Values:

  • true has custom tiers
  • false has no custom tiers

This property is available as of Zuora Quotes 6.0.

areTiersUpdated()
IdIdIf the charge is saved, it has a Salesforce record ID. Otherwise null. Read-only.charge.get('Id')
INCLUDED_UNITSStringIncluded units in the chargecharge.get('zqu__IncludedUnits__c')
isDiscountEditableBoolean

Specifies whether the DISCOUNT is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL. Read-only.

Not available
isDiscountLevelEditableBoolean

Specifies whether DISCOUNT_LEVEL is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL. Read-only.

Not available
isEffectivePriceEditableBoolean

Specifies whether the EFFECTIVE_PRICE is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL.

Not available
isEndDateConditionEditableBoolean

Specifies whether END_DATE_CONDITION is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL.

Not available
isIncludedUnitsEditableBoolean

Specifies whether the INCLUDED_UNITS is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL.d MODEL properties combination.

Not available
isListPriceBaseEditableBoolean

Specifies whether the LIST_PRICE_BASE is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL.

Not available
isListPriceEditableBooleanSpecifies whether LIST_PRICE is editable.Not available
isPeriodEditableBooleanSpecifies whether PERIOD is editable.Not available
isQuantityEditableBoolean

The condition is based on the combination of CHARGE_TYPE and MODEL.

Specifies whether the QUANTITY is editable.

Not available
isSpecificBillingPeriodEditableBoolean

The condition is based on the combination of CHARGE_TYPE and MODEL.

Specifies whether SPECIFIC_BILLING_PERIOD is editable.

Not available
isSpecificEndDateEditableBoolean

The condition is based on the combination of CHARGE_TYPE, PERIOD, and MODEL.

Specifies whether SPECIFIC_BILLING_PERIOD is editable.

Not available
isTotalEditableBoolean

The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL.

Specifies whether the TOTAL is editable.

The condition is based on the combination of CHARGE_TYPE and MODEL.

Not available
isUpToPeriodsEditableBoolean

Specifies whether UPTO_PERIODS is editable.

The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL.

Not available
isUpToPeriodsTypeEditableBoolean

Specifies whether UPTO_PERIODS_TYPE is editable.

The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL.

Not available
LIST_PRICEStringThe list price of the charge as defined in the product catalog.charge.get('zqu__ListPrice__c')
LIST_PRICE_BASEStringThe term a recurring list price charge is based on.charge.get('zqu__ListPriceBase__c')
LIST_TOTALStringThe total list price of the charge as defined in the product catalog.charge.get('zqu__ListTotal__c')
MODELStringThe charge model as defined in the product catalog.charge.get('zqu__Model__c')
NAMEStringThe charge name as defined in the product catalog.charge.get('Name')
PERIODStringThe recurring period of the charge as defined in the product catalog.charge.get('zqu__Period__c')
PRODUCT_RATE_PLAN_CHARGE_SFDC_IDStringUsed for binding records of Quote Rate Plan Charges to the Product Rate Plan Charge object in the product catalog.charge.get('zqu__ProductRatePlanCharge__c')
PRODUCT_RATE_PLAN_CHARGE_ZUORA_IDStringUsed for binding records of Quote Rate Plan Charges to the Zuora Product Rate Plan Charge.charge.get('zqu__ProductRatePlanChargeZuoraId__c')
QUANTITYStringQuantity of the chargecharge.get('zqu__Quantity__c')
SPECIFIC_BILLING_PERIODStringCustomizes the number of months or weeks for the billing period of the charge.charge.get('zqu__SpecificBillingPeriod__c')
SPECIFIC_END_DATEStringThe specific date on which the charge ends.charge.get('zqu__SpecificEndDate__c')
SUBSCRIPTION_RATE_PLAN_CHARGE_IDStringUsed for binding records of Quote Rate Plan Charge to the Zuora Subscription Rate Plan Charge.charge.get('zqu__QuoteRatePlanChargeZuoraId__c')
TOTALStringTotalNot available
UNIT_OF_MEASUREStringThe unit of measure used for this charge as defined in the product catalog.charge.get('zqu__UOM__c')
UPTO_PERIODSStringSpecifies the length of the period during which the charge is active.charge.get('zqu__Upto_How_Many_Periods__c')
UPTO_PERIODS_TYPEStringThe period type used to define when the charge ends.charge.get('zqu__Upto_How_Many_Periods_Type__c')
WEEKLY_BILL_CYCLE_DAYString

The day of the week as the bill cycle day for the charge.

This field is supported in the version 7.43 or later of Zuora Quotes.

The following values are accepted:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
charge.get('zqu__WeeklyBillCycleDay__c')

The zCharge class includes the following global methods.

Method

Return Type

Description

How to access using QCharge

getQuoteRatePlanChargeZuoraIdStringGets the quote rate plan charge Zuora IDcharge.get('zqu__QuoteRatePlanChargeZuoraId__c')
overrideListPriceVoid

Changes the LIST_PRICE to the specified newValue.

This method does not perform recalculations on other other values on zCharge. See the zQuoteUtil Class methods for recalculating charges based on pricing fields.

Supported Versions: 7.0+

put(String fieldName, Object value)
populateCustomChargeTiers(List<QuoteCharge_Tier__c> tiers)Void

Populates the custom tiers for required for calculations.

This method is available as of Zuora Quotes 6.0.

setTiers(List<QTier> qTiers)