Welcome to Zuora Product Documentation

Explore our rich library of product information

Read helpers

Helper functions for reading quotes, subscriptions, timelines, rate plans, charges, tiers, ramp intervals, and amendments.

getQuote()

Signature:

getQuote(): object | null

Returns the current quote record.

Example:

const quote = zqf.getQuote();
const quoteName = quote?.Name;

getQuoteField(fieldName)

Signature:

getQuoteField(fieldName: string): any

Parameter

Type

Required

Description

fieldNamestringYesExact API name on the quote record.

Example:

const term = zqf.getQuoteField('zqu__InitialTerm__c');

getSubscription()

Signature:

getSubscription(): object | null

Returns the active subscription object from quoteState.

getProductTimelines(filter?)

Signature:

getProductTimelines(filter?: {
    timelineIds?: string[],
    includeVoided?: boolean
}): object[]

Parameter

Type

Required

Description

filter.timelineIdsstring[]NoList of timeline ids to include.
filter.includeVoidedbooleanNoInclude voided-only timelines.

Example:

const timelines = zqf.getProductTimelines();

getTimeline(timelineId)

Signature:

getTimeline(timelineId: string): object | null

Parameter

Type

Required

Description

timelineIdstringYesProduct timeline id.

getVersions(timelineId, filter?)

Signature:

getVersions(
    timelineId: string,
    filter?: {
        includeVoided?: boolean
    }
): object[]

Parameter

Type

Required

Description

timelineIdstringYesProduct timeline id.
filter.includeVoidedbooleanNoInclude voided versions.

getRatePlans(filter?)

Signature

getRatePlans(filter?: {
    timelineId?: string,
    type?: 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct',
    effectiveDate?: string,
    effectiveDateFrom?: string,
    effectiveDateTo?: string,
    includeVoided?: boolean
}): object[]

Parameter

Type

Required

Description

filter.timelineIdstringNoRestrict to one timeline.
filter.type'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct'NoAmendment type filter.
filter.effectiveDatestringNoExact effective date filter.
filter.effectiveDateFromstringNoEffective date range start.
filter.effectiveDateTostringNoEffective date range end.
filter.includeVoidedbooleanNoInclude voided versions.

Example:

const updatedPlans = zqf.getRatePlans({
    type: 'UpdateProduct'
});

getRatePlansByAmendmentType(type, filter?)

Signature:

getRatePlansByAmendmentType(
    type: 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct',
    filter?: {
        timelineId?: string,
        effectiveDate?: string,
        effectiveDateFrom?: string,
        effectiveDateTo?: string,
        includeVoided?: boolean
    }
): object[]

Parameter

Type

Required

Description

type'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct'YesAmendment type to match.
filter.timelineIdstringNoRestrict to one timeline.
filter.effectiveDatestringNoExact effective date filter.
filter.effectiveDateFromstringNoEffective date range start.
filter.effectiveDateTostringNoEffective date range end.
filter.includeVoidedbooleanNoInclude voided versions.

Example:

const removedPlans = zqf.getRatePlansByAmendmentType('RemoveProduct');

getUpdatedRatePlans(filter?)

Signature:

getUpdatedRatePlans(filter?: object): object[]

getRemovedRatePlans(filter?)

Signature:

getRemovedRatePlans(filter?: object): object[]

getOriginalRatePlans(filter?)

Signature:

getOriginalRatePlans(filter?: object): object[]

Example:

const updated = zqf.getUpdatedRatePlans();
const removed = zqf.getRemovedRatePlans();
const original = zqf.getOriginalRatePlans();

getLatestVersion(timelineId, filter?)

Signature:

getLatestVersion(
    timelineId: string,
    filter?: {
        includeVoided?: boolean
    }
): object | null

Parameter

Type

Required

Description

timelineIdstringYesProduct timeline id.
filter.includeVoidedbooleanNoInclude voided versions.

getVersionByEffectiveDate(timelineId, effectiveDate, filter?)

Signature:

getVersionByEffectiveDate(
    timelineId: string,
    effectiveDate: string,
    filter?: {
        includeVoided?: boolean
    }
): object | null

Parameter

Type

Required

Description

timelineIdstringYesProduct timeline id.
effectiveDatestringYesEffective date to resolve.
filter.includeVoidedbooleanNoInclude voided versions.

Example:

const version = zqf.getVersionByEffectiveDate(timelineId, '2026-07-13');

getCharges(version, filter?)

Signature:

getCharges(
    version: object,
    filter?: {
        includeVoided?: boolean,
        action?: string,
        optional?: boolean
    }
): object[]

Parameter

Type

Required

Description

versionobjectYesRate plan version object.
filter.includeVoidedbooleanNoInclude voided charges.
filter.actionstringNoFilter by zqu__Action__c.
filter.optionalbooleanNoFilter by zqu__Optional__c.

Example:

const charges = zqf.getCharges(version, {
    optional: false
});

getCharge(version, chargeIdOrKey)

Signature:

getCharge(version: object, chargeIdOrKey: string): object | null

Matches by charge id, preview charge id, or product rate plan charge id.

Parameter

Type

Required

Description

versionobjectYesRate plan version object.
chargeIdOrKeystringYesCharge id, preview charge id, or product rate plan charge id.

getTiers(charge)

Signature:

getTiers(charge: object): object[]

getTier(charge, tierIndexOrKey)

Signature:

getTier(
    charge: object,
    tierIndexOrKey: number | string
): object | null

Matches by index, tier id, or zqu__Tier__c.

Parameter

Type

Required

Description

chargeobjectYesCharge object containing tiers.
tierIndexOrKeynumber | stringYesTier index, tier id, or zqu__Tier__c value.

getRampIntervals()

Signature:

getRampIntervals(): object[]

getActiveRampInterval()

Signature:

getActiveRampInterval(): object | null

Uses pageState.currentInterval when present. Falls back to the quote start date interval.

getRampIntervalByDate(date)

Signature:

getRampIntervalByDate(date: string | Date): object | null

Parameter

Type

Required

Description

datestring | DateYesDate to match against ramp interval boundaries.

Example:

const interval = zqf.getRampIntervalByDate('2026-07-13');

getAmendments(filter?)

Signature:

getAmendments(filter?: {
    timelineId?: string,
    type?: 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct',
    effectiveDate?: string,
    effectiveDateFrom?: string,
    effectiveDateTo?: string,
    includeVoided?: boolean
}): object[]

Parameter

Type

Required

Description

filter.timelineIdstringNoRestrict to one timeline.
filter.type'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct'NoAmendment type filter.
filter.effectiveDatestringNoExact zqu__ContractEffectiveDate__c value.
filter.effectiveDateFromstringNoEffective date range start.
filter.effectiveDateTostringNoEffective date range end.
filter.includeVoidedbooleanNoInclude voided versions.

Example:

const removedAmendments = zqf.getAmendments({
    type: 'RemoveProduct'
});

getAmendment(timelineIdOrFilter, filter?)

Signature:

getAmendment(
    timelineIdOrFilter: string | {
        timelineId?: string,
        type?: 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct',
        effectiveDate?: string,
        effectiveDateFrom?: string,
        effectiveDateTo?: string,
        includeVoided?: boolean
    },
    filter?: object
): object | null

Returns the last matching amendment.

Parameter

Type

Required

Description

timelineIdOrFilterstring | objectYesTimeline id or a filter object.
filterobjectNoAdditional filter when the first argument is a timeline id.

Example:

const amendment = zqf.getAmendment({
    timelineId,
    type: 'UpdateProduct'
});

getAmendmentRecord(amendment)

Signature:

getAmendmentRecord(amendment: object): object | null

Parameter

Type

Required

Description

amendmentobjectYesAmendment wrapper object.

getAmendmentType(version)

Signature:

getAmendmentType(version: object): string | null

Returns the normalized amendment type from the version.

Parameter

Type

Required

Description

versionobjectYesRate plan version object.