Date post: | 06-Dec-2014 |
Category: |
Documents |
Upload: | samuel-sharaf |
View: | 70 times |
Download: | 3 times |
#Subscribed14 @twittername
Section 301
Templates, Components & Plugins
Advanced Concepts
OBJ 1:
OBJ 2:
OBJ 3:
Understand the need when to extend and add to the OOTB Quote workflow and the benefits offered by ZQuotes Templates, Components & Plugin functionality
Get comfortable with developing components & plugins and enhancing Quote workflow
Objectives
Explore the Component Registration Feature in ZuoraConfig and examples of OOTB components available
#Subscribed14 @twittername
Business Need For Components
& Plugins
#Subscribed14 @twittername
Business Scenario - Advanced Sales Quote Workflow
CreateAccount
Create Opp
Create Quote• Add Custom Page as Step #2• Extend Existing Functionality etc.
Add Products & RatePlans• Custom Product
SelectorSubmit QuoteReview Subscription
& Invoice
With a large number of variations in the quote to subscription workflow, very often it is required to either extend existing functionality or add new functionality to Zuora Quotes. This is where Components and Plugins in Zuora For Salesforce comes into the picture.
#Subscribed14 @twittername
Understanding Components &
Plugins
#Subscribed14 @twittername
Components Definition
A way to encapsulate a common design pattern in a custom component and then reuse that component several times in one or more Visualforce pages.
#Subscribed14 @twittername
Plugins Definition
An Apex plugin is an Apex class referenced from within a managed package via a component at runtime. It is a method to encapsulate your own business logic within our existing Zuora for Salesforce Visualforce pages.
#Subscribed14 @twittername
Why use Components & Plugins?
ComponentsThey dramatically speed up development what previously was pure Apex code by reusing successful patterns already established in our Quotes application
PluginsThey allow custom functionality over and above what Zuora for Salesforce provides out of the box, but in a managed way, an example being the default values exercise you will perform in a lab exercise.
#Subscribed14 @twittername
Component Registration and Library
Zuora Provides
– A Component Registration feature if you wish to develop your own Components and Plugins
– A library of Components and Plugins that you can customize and use in your own Quoting workflows
#Subscribed14 @twittername
Component Registration Benefits
• Provides a central place to manage all of your custom components and plugins
• Reduces the number of steps it previously took to use a component or a plugin in your system
• Puts you on an upgrade path such that when we add additional functionality to these components, you get an immediate benefit as opposed to if you had used custom code
• It means you will take advantage for your own components of any point and click Admin UI we decide to put on top of the components or plugins
• It allows Zuora to isolate custom code versus product issues occurring in your implementation much more easily
Components & Plugin - ArchitectureVisual Force Page
Page Level Component
UI Component
UI Component
UI Component
UI Component
= Plug-In
#Subscribed14 @twittername
Examples of OOTB Components
#Subscribed14 @twittername
UI Components
#Subscribed14 @twittername
List Component
#Subscribed14 @twittername
Lookup Component
#Subscribed14 @twittername
Mutton (Menu + Button) Component
#Subscribed14 @twittername
Page Level Components
#Subscribed14 @twittername
Create Quote Component
#Subscribed14 @twittername
Select Products Component
#Subscribed14 @twittername
Billing Account Component
#Subscribed14 @twittername
Section 301
Lab Exercises
#Subscribed14 @twittername
Lab Exercise 1: Basic ComponentComponent Code Example to develop New Subscription Quote Page
#Subscribed14 @twittername
Lab Steps
#Subscribed14 @twittername
Basic Component - Lab Exercise Steps
1. Develop Create Quote Page using out of box CreateQuote Component
2. Add the newly added Visualforce page to Quote Workflow
3. Create a new Quote to verify the custom page is functional
#Subscribed14 @twittername
Lab Step 1Develop Custom Create Quote Page
#Subscribed14 @twittername
Component Development Example
Under AppSetup – Click on Pages
Click on New to create a new Visualforce Page
#Subscribed14 @twittername
Component Development Example
Name the Page <YourName>CustomQuoteCreatePage
#Subscribed14 @twittername
Code for the Visualforce Page
Download the code from this link:http://bit.ly/Z4SF-Lab1
#Subscribed14 @twittername
Lab Step 2Add the new Quote Page to Quote Workflow
#Subscribed14 @twittername
Add the New Page to Quote Workflow
Edit the New Subscription workflow to add your page as step #2
#Subscribed14 @twittername
Lab Step 3Create a new Quote and Verify CreateQuote Page is working
#Subscribed14 @twittername
End of Lab Exercise 1
#Subscribed14 @twittername
Lab Exercise 2
#Subscribed14 @twittername
Advanced Component – Lab 2 Exercise Steps
1. Develop Custom Quote Page and Controller
2. Add the Custom Quote Page to Quote Wizard Workflow
3. Create a new Quote and Verify that the new Custom Step is functional.
#Subscribed14 @twittername
Lab Exercise 2: Advanced Component Create Custom Quote Workflow Page
#Subscribed14 @twittername
Adding Page for Selecting Business Channel and Sales Region
We will be adding another custom Visualforce page and associated Apex ControllerVisualforce Page:http://bit.ly/labexercise1
Apex Controller:http://bit.ly/labexercise1-2
#Subscribed14 @twittername
Adding Page for Selecting Business Channel and Sales Region
Follow the steps from the previous Visualforce page to create a new Page and call it <YourNameCustomQuoteStep>
#Subscribed14 @twittername
Adding Page for Selecting Business Channel and Sales Region
Click on AppSetup-Develop-Apex Classes-New to create a new Apex Class and call it <YourNameApexCustomQuoteWizardStep>
#Subscribed14 @twittername
Add the new Step to Quote Workflow
#Subscribed14 @twittername
Add the new Step to Quote Workflow
Ensure the Quote Wizard Configuration looks similar to the following figure
#Subscribed14 @twittername
Create a new Quote and Verify the Newly Added Pages are functional
Step #3 should be selecting Business Channel and State.
#Subscribed14 @twittername
Other Component Examples
In the previous two examples we just scratched the surface on what’s possible with components.
More code and examples can be found at:https://github.com/zuora/Z-Force/tree/master/ZDKSampleCode&http://knowledgecenter.zuora.com/CB_Commerce/Zuora_for_Salesforce/E_Z-Force_Builder/B_Component_Library
#Subscribed14 @twittername
Lab Exercise 3: Plugin
Zuora For Salesforce Titanium edition provides plugins for extending the functionality of high-level components. With component registration, you can write your custom plugins (here the "Default Value" plugin for the create quote component used in the out of box flow) and extend the out of box default plugin used.
#Subscribed14 @twittername
Plugin - Lab Exercise Steps
1. Develop Apex Plugin (Code Provided)
2. Use Component Registration Feature under ZuoraConfig to extend the CreateQuote PropertyComponent
3. Create a new Quote to verify the Default Value Plugin works
#Subscribed14 @twittername
Step 1- Create Apex Class
Under AppSetup – Click on Pages
Click on New to create a new Apex Class
#Subscribed14 @twittername
DefaultValuePlugin - Code
Download the code from here http://bit.ly/Z4SF-Lab3
Lab Step 2Use Component Registration
& Extend Default PropertyComponent
#Subscribed14 @twittername
Using Component Registration
Click on ZuoraConfig Tab
Select Component Registration
#Subscribed14 @twittername
Extend the Default Value Plugin
Click on Edit Action for zqu:PropertyComponent for CreateQuote
#Subscribed14 @twittername
Extend the Default Value Plugin
We will be extending the PopulateValuePlugin
Enter the name of the Plugin Apex class you created in the Class Name
Click on Update Button
#Subscribed14 @twittername
Lab Step 3Create a New Quote
#Subscribed14 @twittername
Create a new Quote and See the new Plugin in Action
Note the required values have default values populated.
#Subscribed14 @twittername
End of Section 301