QuoteWizardManager Class
The QuoteWizardManager class provides global methods for quote wizard navigation and easy access to quote wizard configuration metadata.
The QuoteWizardManager class is available in the Versions 6.0 and later of Zuora Quotes.
See Creating Custom Quote Wizard Pages for resources, templates, and sample code needed to create custom quote wizard pages.
QuoteWizardManager Page Navigation Methods
The following global methods are used to control the page navigation of the quote wizard. All of the methods returns the static PageReference type.
Method | Input Parameter | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
navigateNext |
Map<String,String> UrlParams
String SubscriptionType
|
Navigates to the next step in the quote wizard. If this method is called from the last step in the quote wizard process, a Use the finish method to redirect to a different page upon finishing the quote wizard . This method does not update any fields, such as |
||||||||||||||||
navigateBack |
Map<String,String> UrlParams
|
Navigates back one step in the quote wizard. If unable to navigate back, that is, the current page is the first step, this method returns a null |
||||||||||||||||
start |
String SubscriptionType
Integer InitialStepNumber
Map<String,String> UrlParams
|
Defines the initial entry (starting point) to the the quote wizard. |
||||||||||||||||
finish |
zqu__Quote__c Quote
String FinishUrl
zqu__Quote__c Quote.
|
Finishes the quote wizard and optionally redirects to a developer-specified page. This method upserts the Quote SObject passed in as the first argument. |
||||||||||||||||
cancel |
String CancelUrl
|
Exits the quote wizard and redirects to a page with the URL of CancelUrl. This method deletes the Quote object for the wizard instance and all child objects of the quote. |
Example Code
navigateNext Method
Example 1:
Navigates to the next page in this instance of the quote wizard and places the ID of thisQuote
in the URL parameters:
zqu.QuoteWizardManager.navigateNext(new Map<String, String> {'Id' => thisQuote.Id})
Example 2:
Navigates to the next page in this instance of the quote wizard for the Amendment subscription type, and places the ID of thisQuote
in the URL parameters:
zqu.QuoteWizardManager.navigateNext(new Map<String, String> {'Id' => thisQuote.Id}, 'Amendment')
navigateBack Method
Example:
Navigates back one page in the quote wizard and places the ID of the opportunity object associated with this quote in the URL parameters:
zqu.QuoteWizardManager.navigateBack(new Map<String, String> {'oppId' => thisOpportunity.Id})
Start Method
Example 1:
Explicitly calls the subscription type, initialStepNumber parameter of 1, and map of URL parameters:
zqu.QuoteWizardManager.start('New', 1, new Map<String, String>{'oppId', '009p000000185EJ'})
Example 2:
Performs the same action as the first example without explicitly specifying a map of URL parameters:
zqu.QuoteWizardManager.start('New', 1)
Example 3:
Performs the same action as the first example where the InitialStepNumber
parameter is not specified:
zqu.QuoteWizardManager.start('New', new Map<String, String>{'oppId', '009p000000185EJ'})
Example 4:
Performs the same action as first example where the InitialStepNumber
parameter and a map of URL parameters are not specified:
zqu.QuoteWizardManager.start('New')
Finish Method
Example 1:
Upserts thisQuote
, exits the quote wizard, and redirects to the Quote Detail page of thisQuote
:
zqu.QuoteWizardManager.finish(thisQuote)
Example 2:
Upserts thisQuote
, exits the quote wizard, and redirects to myCustomPage:
zqu.QuoteWizardManager.finish(thisQuote, '/apex/myCustomPage')
Cancel Method
Example:
Cancels the current instance of the quote wizard, deletes the quote and all related objects, and redirects to the Detail page of the opportunity object associated with this quote:
zqu.QuoteWizardManager.cancel('/' + thisOpportunity.Id)
QuoteWizardManager Metadata Access Methods
The following global methods are used to access metadata associated with the quote wizard configuration.
Method | Input Parameter | Return Type | Description |
---|---|---|---|
getQuoteWizardSteps | String SubscriptionType | static List<zqu__QuoteWizardStep__c> | Returns all QuoteWizardStep__c SObjects for the specified subscription type.
The input parameter, SubscriptionType, is required. Valid values are:
|
getBackButtonText | static String | Retrieves the text value for the back button of the current step. If called outside of the quote wizard, this method returns null. | |
getBackButtonText | static String | Retrieves the text value for the next button of the current step. If called outside of the quote wizard, this method returns null. |