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): anyParameter | Type | Required | Description |
|---|---|---|---|
| fieldName | string | Yes | Exact API name on the quote record. |
Example:
const term = zqf.getQuoteField('zqu__InitialTerm__c');getSubscription()
Signature:
getSubscription(): object | nullReturns the active subscription object from quoteState.
getProductTimelines(filter?)
Signature:
getProductTimelines(filter?: {
timelineIds?: string[],
includeVoided?: boolean
}): object[]
Parameter | Type | Required | Description |
|---|---|---|---|
| filter.timelineIds | string[] | No | List of timeline ids to include. |
| filter.includeVoided | boolean | No | Include voided-only timelines. |
Example:
const timelines = zqf.getProductTimelines();getTimeline(timelineId)
Signature:
getTimeline(timelineId: string): object | nullParameter | Type | Required | Description |
|---|---|---|---|
| timelineId | string | Yes | Product timeline id. |
getVersions(timelineId, filter?)
Signature:
getVersions(
timelineId: string,
filter?: {
includeVoided?: boolean
}
): object[]
Parameter | Type | Required | Description |
|---|---|---|---|
| timelineId | string | Yes | Product timeline id. |
| filter.includeVoided | boolean | No | Include 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.timelineId | string | No | Restrict to one timeline. |
| filter.type | 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct' | No | Amendment type filter. |
| filter.effectiveDate | string | No | Exact effective date filter. |
| filter.effectiveDateFrom | string | No | Effective date range start. |
| filter.effectiveDateTo | string | No | Effective date range end. |
| filter.includeVoided | boolean | No | Include 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' | Yes | Amendment type to match. |
| filter.timelineId | string | No | Restrict to one timeline. |
| filter.effectiveDate | string | No | Exact effective date filter. |
| filter.effectiveDateFrom | string | No | Effective date range start. |
| filter.effectiveDateTo | string | No | Effective date range end. |
| filter.includeVoided | boolean | No | Include 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 |
|---|---|---|---|
| timelineId | string | Yes | Product timeline id. |
| filter.includeVoided | boolean | No | Include voided versions. |
getVersionByEffectiveDate(timelineId, effectiveDate, filter?)
Signature:
getVersionByEffectiveDate(
timelineId: string,
effectiveDate: string,
filter?: {
includeVoided?: boolean
}
): object | null
Parameter | Type | Required | Description |
|---|---|---|---|
| timelineId | string | Yes | Product timeline id. |
| effectiveDate | string | Yes | Effective date to resolve. |
| filter.includeVoided | boolean | No | Include 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 |
|---|---|---|---|
| version | object | Yes | Rate plan version object. |
| filter.includeVoided | boolean | No | Include voided charges. |
| filter.action | string | No | Filter by zqu__Action__c. |
| filter.optional | boolean | No | Filter by zqu__Optional__c. |
Example:
const charges = zqf.getCharges(version, {
optional: false
});
getCharge(version, chargeIdOrKey)
Signature:
getCharge(version: object, chargeIdOrKey: string): object | nullMatches by charge id, preview charge id, or product rate plan charge id.
Parameter | Type | Required | Description |
|---|---|---|---|
| version | object | Yes | Rate plan version object. |
| chargeIdOrKey | string | Yes | Charge 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 |
|---|---|---|---|
| charge | object | Yes | Charge object containing tiers. |
| tierIndexOrKey | number | string | Yes | Tier index, tier id, or zqu__Tier__c value. |
getRampIntervals()
Signature:
getRampIntervals(): object[]getActiveRampInterval()
Signature:
getActiveRampInterval(): object | nullUses pageState.currentInterval when present. Falls back to the quote start date interval.
getRampIntervalByDate(date)
Signature:
getRampIntervalByDate(date: string | Date): object | nullParameter | Type | Required | Description |
|---|---|---|---|
| date | string | Date | Yes | Date 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.timelineId | string | No | Restrict to one timeline. |
| filter.type | 'Original' | 'NewProduct' | 'UpdateProduct' | 'RemoveProduct' | No | Amendment type filter. |
| filter.effectiveDate | string | No | Exact zqu__ContractEffectiveDate__c value. |
| filter.effectiveDateFrom | string | No | Effective date range start. |
| filter.effectiveDateTo | string | No | Effective date range end. |
| filter.includeVoided | boolean | No | Include 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 |
|---|---|---|---|
| timelineIdOrFilter | string | object | Yes | Timeline id or a filter object. |
| filter | object | No | Additional filter when the first argument is a timeline id. |
Example:
const amendment = zqf.getAmendment({
timelineId,
type: 'UpdateProduct'
});
getAmendmentRecord(amendment)
Signature:
getAmendmentRecord(amendment: object): object | nullParameter | Type | Required | Description |
|---|---|---|---|
| amendment | object | Yes | Amendment wrapper object. |
getAmendmentType(version)
Signature:
getAmendmentType(version: object): string | null
Returns the normalized amendment type from the version.
Parameter | Type | Required | Description |
|---|---|---|---|
| version | object | Yes | Rate plan version object. |