Welcome to Zuora Product Documentation

Explore our rich library of product information

Commitment default value plugin

The Commitment Default Value Plugin lets you configure a dedicated Apex class that automatically pre-fills field values on a commitment and its schedules when a commitment is created.

Use this plugin when your business requires commitments to start with pre-populated values such as commitment type, currency, term length, payment method, schedule amount, or custom field values, without requiring sales reps to fill them in manually.

When a commitment is created, CPQ calls your plugin and passes the parent quote, the draft commitment record, and the draft schedule records. Your implementation updates those objects in place, and CPQ saves the updated values.

After the plugin is enabled and configured, applicable default values are automatically populated during commitment creation based on the logic in your Apex class.

The Commitment Default Value Plugin is available from Quotes version 10.60.

Interface

Your Apex class must implement the zqu.CommitmentDefaultValuesPlugin global interface. CPQ calls the initialize() method once for each commitment creation.

global interface zqu.CommitmentDefaultValuesPlugin {
    void initialize(
        zqu__Quote__c quote,
        zqu__Commitments__c commitment,
        List<zqu__CommitmentSchedule__c> schedules
    );
}

Parameters

Parameter

Type

Description

quotezqu__Quote__cThe parent quote. Contains at minimum the record ID and might contain additional fields available at runtime.
commitmentzqu__Commitments__cThe draft commitment being created. Update this object to set default field values.
schedulesList<zqu__CommitmentSchedule__c>The draft schedule records for the commitment. Update these objects to set default values on schedules. This parameter is never null, but it can be an empty list if no schedules have been generated yet.