Manage Existing Products on a Subscription

Knowledge Center > Zuora CPQ > Zuora Quotes > Manage Quotes > Manage Existing Products on a Subscription

Manage Existing Products on a Subscription

This article describes the Store Existing Products feature, which enables you to manage existing products on a subscription.

A batch job called storeExistingProductsJob and a new Quote Amendment type called Original are introduced for this feature. The batch job gets a single Quote Amendment record created in your quote with the type being Original, which contains the data from the existing subscription in Zuora. Therefore, you can manage the existing products on a subscription in your org without having to retrieve the data from Zuora again. You can monitor the status of this job by navigating to Setup > MonitorJobs > Apex Jobs. See more information about the Quote Amendment object in Zuora for Salesforce Object Model.

You can enable the Store Existing Products feature by navigating to Zuora Config > Advanced Quoting Configuration Settings and selecting the Store Existing Products check box.

Once the Store Existing Products feature is enabled, the storeExistingProducts batch job will be triggered when an amendment or renewal quote first gets created from the Create Amendment/Renewal Quote page. The Quote Rate Plans, Quote Rate Plan Charges, and Tiers information of your existing products on a subscription will be stored in an Original Quote Amendment object record. Next time, when the Product Selector is initiated, the ORIGINAL product information is retrieved from the record rather than from Zuora, improving the data retrieving performance.

You can check the generated Original Quote Amendment record in the Quote Amendments section on your Quote Detail page, as shown below:

Quotes_Amendment_Original.png

To display the Quote Amendments section on your Quote Detail page:

  1. Click Edit Layout on the right top of your Quote Detail page.
  2. Click Related Lists to display the related lists that you can add to the Quote Details page. 
  3. Drag Quote Amendments from the list of related lists to the page.
  4. Click the Related List Properties icon for Quote Amendments.
  5. In the Related List Properties dialog, select the columns that you want to display in quote amendments, and the order in which you want them to be displayed.
  6. Click OK.
  7. Click Save.

You can also trigger the storeExistingProductsJob job and get the Original Quote Amendment record generated via the zqu.zQuoteUtil.storeExistingProducts global method. See zQuoteUtil Global Methods for the zqu.zQuoteUtil.storeExistingProducts global method. A sample code is as below:

//Trigger the storeExistingProducts job
zqu__Quote__c quote = [SELECT Id, Name, zqu__SubscriptionType__c, zqu__ExistSubscriptionID__c FROM zqu__Quote__c WHERE Id = 'a0if40000013dLPAAY'];
zqu.zQuoteUtil.storeExistingProducts(new List<zqu__Quote__c>{quote}); 

Store Custom Fields for Existing Products

As of Quotes 9.7, custom fields can be stored on the Existing Product records generated by the storeExistingProductsJob job. See the following table for the object mapping from Zuora to Salesforce.

Zuora Object Salesforce Object
RatePlan QuoteRatePlan__c
RatePlanCharge QuoteRatePlanCharge__c
SubscriptionProductFeature QuoteProductFeature__c

 

To store a custom field:

  1. Create the custom field on the QuoteRatePlan__c, QuoteRatePlanCharge__c, or QuoteProductFeature__c object in Salesforce. The API name and Type of the custom field must be exactly the same as those of the custom field on the corresponding Zuora object (RatePlan, RatePlanCharge, or SubscriptionProductFeature).
  2. Add the custom field you created in Step #1 to the object's field set. See the following table for the object and field set mapping.
    Salesforce Object Field Set Name
    QuoteProductFeature__c CustomFeatureQueryFields
    QuoteRatePlan__c CustomRatePlanQueryFields
    QuoteRatePlanCharge__c CustomChargeQueryFields
  3. After the storeExistingProductsJob job finishes successfully, the custom field value will be stored in the containing object.

Note that the storeExistingProductsJob job will fail if you add a field that does not exist in the corresponding Zuora object to any of the field sets. You will be prompted with an error message indicating that the query into Zuora is invalid.

Last modified

Tags

This page has no custom tags.

Classifications

(not set)