Welcome to Zuora Product Documentation

Explore our rich library of product information

Product helpers

Helpers for updating and removing products and product timelines, with optional interval-based operations.

updateProduct(timelineId, options?)

Signature:

updateProduct(
    timelineId: string,
    options?: {
        ratePlanPatch?: object,
        amendmentPatch?: object,
        chargePatches?: Array<{
            chargeIdOrKey: string,
            recordPatch?: object,
            patch?: object,
            [fieldName: string]: any
        }>
    }
): CustomEvent

Parameter

Type

Required

Description

timelineId string Yes Target product timeline id.
options.ratePlanPatch object No Patch for the rate plan record.
options.amendmentPatch object No Patch for the amendment record.
options.chargePatches Array<object> No Charge updates to apply as part of the same event.

Example:

this.dispatchEvent(
    zqf.updateProduct(timelineId, {
        ratePlanPatch: {
            Name: 'Updated Rate Plan Name'
        },
        amendmentPatch: {
            zqu__ContractEffectiveDate__c: '2026-07-13'
        },
        chargePatches: [
            {
                chargeIdOrKey,
                recordPatch: {
                    zqu__Quantity__c: 9
                }
            }
        ]
    })
);

updateProductInInterval(intervalId, timelineId, options?)

Signature:

updateProductInInterval(
    intervalId: number | string | object,
    timelineId: string,
    options?: {
        ratePlanPatch?: object,
        amendmentPatch?: object,
        chargePatches?: Array<{
            chargeIdOrKey: string,
            recordPatch?: object,
            patch?: object,
            [fieldName: string]: any
        }>
    }
): CustomEvent

Parameter

Type

Required

Description

intervalId number | string | object Yes Interval index, interval start date, or interval object.
timelineId string Yes Target product timeline id.
options.ratePlanPatch object No Patch for the rate plan record.
options.amendmentPatch object No Patch for the amendment record.
options.chargePatches Array<object> No Charge updates to apply as part of the same event.

removeProducts(removals)

Signature:

removeProducts(
    removals: Array<string | { timelineId: string }>
): CustomEvent

Parameter

Type

Required

Description

removals Array<string | { timelineId: string }> Yes List of timeline ids or removal objects.

Example:

this.dispatchEvent(
    zqf.removeProducts([
        { timelineId: 'a0z...' }
    ])
);

removeProductsInInterval(intervalId, removals)

Signature:

removeProductsInInterval(
    intervalId: number | string | object,
    removals: Array<string | { timelineId: string }>
): CustomEvent

Parameter

Type

Required

Description

intervalId number | string | object Yes Interval index, interval start date, or interval object.
removals Array<string | { timelineId: string }> Yes List of timeline ids or removal objects.

removeProduct(timelineId)

Signature:

removeProduct(timelineId: string): CustomEvent

Parameter

Type

Required

Description

timelineId string Yes Target product timeline id.

removeProductInInterval(intervalId, timelineId)

Signature:

removeProductInInterval(
    intervalId: number | string | object,
    timelineId: string
): CustomEvent

Parameter

Type

Required

Description

intervalId number | string | object Yes Interval index, interval start date, or interval object.
timelineId string Yes Target product timeline id.