Welcome to Zuora Product Documentation

Explore our rich library of product information

Tier helpers

Helpers for updating product rate plan charge tiers and tier fields, with and without interval context.

updateTier(timelineId, chargeIdOrKey, tierIndexOrKey, patch)

Signature:

updateTier(
    timelineId: string,
    chargeIdOrKey: string,
    tierIndexOrKey: number | string,
    patch: object
): CustomEvent

Parameter

Type

Required

Description

ParameterTypeRequiredDescription
timelineIdstringYesTarget product timeline id.
chargeIdOrKeystringYesCharge id or key.
tierIndexOrKeynumber | stringYesTier index, tier id, or zqu__Tier__c value.
patchobjectYesTier field updates.

Example:

this.dispatchEvent(
    zqf.updateTier(timelineId, chargeIdOrKey, 1, {
        zqu__Discount__c: 10
    })
);

updateTierInInterval(intervalId, timelineId, chargeIdOrKey, tierIndexOrKey, patch)

Signature:

updateTierInInterval(
    intervalId: number | string | object,
    timelineId: string,
    chargeIdOrKey: string,
    tierIndexOrKey: number | string,
    patch: object
): CustomEvent

Parameter

Type

Required

Description

intervalIdnumber | string | objectYesInterval index, interval start date, or interval object.
timelineIdstringYesTarget product timeline id.
chargeIdOrKeystringYesCharge id or key.
tierIndexOrKeynumber | stringYesTier index, tier id, or zqu__Tier__c value.
patchobjectYesTier field updates.

updateTierField(timelineId, chargeIdOrKey, tierIndexOrKey, fieldName, value)

Signature:

updateTierField(
    timelineId: string,
    chargeIdOrKey: string,
    tierIndexOrKey: number | string,
    fieldName: string,
    value: any
): CustomEvent

Parameter

Type

Required

Description

timelineIdstringYesTarget product timeline id.
chargeIdOrKeystringYesCharge id or key.
tierIndexOrKeynumber | stringYesTier index, tier id, or zqu__Tier__c value.
fieldNamestringYesExact tier field API name.
valueanyYesValue to assign.

updateTierFieldInInterval(intervalId, timelineId, chargeIdOrKey, tierIndexOrKey, fieldName, value)

Signature:

updateTierFieldInInterval(
    intervalId: number | string | object,
    timelineId: string,
    chargeIdOrKey: string,
    tierIndexOrKey: number | string,
    fieldName: string,
    value: any
): CustomEvent

Parameter

Type

Required

Description

intervalIdnumber | string | objectYesInterval index, interval start date, or interval object.
timelineIdstringYesTarget product timeline id.
chargeIdOrKeystringYesCharge id or key.
tierIndexOrKeynumber | stringYesTier index, tier id, or zqu__Tier__c value.
fieldNamestringYesExact tier field API name.
valueanyYesValue to assign.