Skip to main content

Default Values Plugin - MSQ


Default Values Plugin - MSQ

It is a common use case that default values of quotes need to be populated with a dependency on other opportunity settings. For example, the initial term of the quote needs to be defaulted based on the Lead Source field of an opportunity.

In this case, you need to use the Default Values Plugin of CPQ X that supplements the pre-defined default settings in the UI.

Note: If you have created your own plugins to populate default values of quotes in Zuora Quotes, you can continue to use your registered plugins in Quote Studio. See Populate Value Plugin example for a code example and the detailed steps.


Take the following steps to set the default values using Default Values Plugin of CPQ X:

  1. In your Salesforce org, click Setup.jpg and select Developer Console.
  2. In the Developer Console, navigate to File > New > Apex Class.
  3. Enter the custom plugin name in the dialog, for example, MyDefaultValuesPlugin. Then click OK.
  4. Programmatically create a plugin that implements the DefaultValuesPluginMSQ interface, then navigate to File > Save to save the plugin. The following code snippet provides the sample structure of the class.
    global class MyDefaultValuesPlugin implements zqu.DefaultValuesPluginMSQ {
    global void initializeParentQuote(zqu__Quote__c quote){
    //Add parent quote implementation code here...
    global void initializeChildQuote(List<zqu__Quote__c> quotes) {
    //Add child quote implementation code here...
    Note: Do not change the Initial Term value if the subscription type is Amendment Subscription or Renewal Subscription.
  5. Register the plugin name in the Default Values Plugin setting.
    1. Navigate to Zuora Config > Quote Studio Settings > Plugins.
    2. Switch the Default Values Plugin toggle to Active and enter the plugin name.
    3. Click Save.


Later, when you create a new subscription quote through the Quote Studio page, you can find that the applicable default values of the quote are populated based on the implementation in the MyDefaultPlugin class.