You can use a single quote to create multiple subscriptions and issue a single payment based on that quote. This feature is supported through global methods only.
A quote can have child quotes.
When a parent quote is sent to Zuora via the sendToZBilling global method, a subscription or a list of amendments will be created for each sub-quote.
Parent quotes include two attributes to support this feature:
Parent quotes are subject to the following validation rules when being sent to Zuora via the global method:
Although the two invoice-related attributes are enabled on all quotes, if a quote is a sub-quote, the values specified on its parent quote will take effect.
|Generate Invoice value on Parent Quote||Invoice Processing Option value on Parent Quote||Description|
The sub-quotes will be processed to generate subscriptions or amendments. Zuora 360 will generate a single invoice.
Zuora 360 will process all of the sub-quotes, even if exceptions are generated for some of the sub-quotes. The exceptions will be sent back to the customer and the invoice will not be generated.
The subscriptions generated will write the Subscription ID back to the sub-quotes. The Invoice ID and Payment ID will be written back to the parent quotes.
One parent quote will create one new billing account if its sub-quotes are of type New Subscription.
The sub-quotes will generate subscriptions or amendments and invoices separately.
The Invoice ID and Payment ID will be written back to the sub-quotes.
One parent quote will create one new billing account if its sub-quotes are type New Subscription.
|false||(none)||Zuora 360 will not generate invoices for either the parent quote or sub-quotes.|
All requests to send parent quotes to Zuora will be handled asynchronously. This means that the requests will be sent from Salesforce, but the results will not be immediately written back to the Salesforce records. Zuora Quotes writes the results to Salesforce when it completes the processing of the requests.
/* PRE-CONDITIONS: - the quote referenced by primaryQuoteId (the parent quote) has its Is_Parent_Quote__c field set to true. - at least two "standard" subscription, amendment, or renewal quotes are set to be children of the parent quote */ Id primaryQuoteId = 'a0GE0000005HRhD'; Quote__c primaryQuote = [select Id,GenerateInvoice__c,InvoiceProcessingOption__c from Quote__c where Id = :primaryQuoteId]; // construct the wrapper objects to pass to the global method // NOTE: the wrapper collection for a parent quote should contain only the parent quote in the quoteRequests property List<zQuoteUtil.ZBillingQuoteCollection> qCollections = new List<zQuoteUtil.ZBillingQuoteCollection>(); zQuoteUtil.ZBillingQuoteCollection qCollection = new zQuoteUtil.ZBillingQuoteCollection(); qCollection.zAccountId = 'new'; qCollection.quoteRequests = new List<zQuoteUtil.ZBillingQuoteRequest>(); zQuoteUtil.ZBillingQuoteRequest qRequest = new zQuoteUtil.ZBillingQuoteRequest(); qRequest.generateInvoice = primaryQuote.GenerateInvoice__c; qRequest.invoiceProcessingOption = primaryQuote.InvoiceProcessingOption__c; qRequest.sfdcQuoteId = primaryQuote.Id; qCollection.quoteRequests.add(qRequest); qCollections.add(qCollection); // pass the wrapper objects into the global method List<zQuoteUtil.ZBillingResult> results = zQuoteUtil.sendToZBilling(qCollections); // ... operate on the results collection ...