Symptom
Resolution
Applies To:
CPQ, Salesforce
Summary:
This article is to show you how to set up Salesforce.com (SFDC) Integration with CallidusCloud CPQ.
Details:
This guide is to help you setup the integration between CallidusCloud CPQ and Salesforce.com (SFDC) so an end-user can create quotes within the SFDC environment as well as populate the quote back into the SFDC Opportunity.
Prerequisites and things to know about for integration:
-
Require Salesforce.com and CallidusCloud CPQ accounts.
-
Before you start, know where to enter the setup feature in SFDC. At any time, you can click the Setup button to get back into setup. Setup is found in the upper right hand side of SFDC.
-
Follow the directions closely, it will save you valuable time in the long run.
- Most of the parameters are case sensitive.
- SFDC uses "__c" at the end of their objects. This is a double underscore followed by a "c".
- SFDC is constantly upgrading their solution, so the below directions can easily be different in the tenant you are logged into. However, the procedures may be the same but the menu’s may have changed.
- Remember to click Save at the end of each task.
Solution/Workaround:
1. Create Custom Object ‘Quote’
This is done in Salesforce Setup (Setup → Build → Create → Objects → New Custom Object). Fill in the values as follows:
-
Object Name - Quote
-
Singular Label - Quote
-
Plural Label - Quotes
The API Name is created automatically - "Quote__c" (double underscore)
2. Add Custom Fields to Quote Object
Now that we've defined the Quote Object, we will need to define the fields in SFDC that we will eventually match up to CPQ.
Add the following fields within "Custom Field & Relationship" tab (next to the field is the field type) :
-
Discount Percent – Percent(16,2) (Length - 16, Decimal Places – 2)
-
Total List Price – Currency(16,2) (Length - 16, Decimal Places – 2)
-
Opportunity – Lookup Relationship (Opportunity)
-
Owner Id – Number(18, 0)
-
Primary – Checkbox
-
Quote Id – Number(18, 0)
-
Total Net Price – Currency(16,2) (Length - 16, Decimal Places – 2)
-
Revision Number – Text(10)
Also, for Quote’s standard field "Name", label should be changed to ‘Quote Number’.
Let’s walk through the first one and then you can do all other fields with the same procedure. Discount Percent – Percent (16,2) (Length - 16, Decimal Places – 2) Select the field type you want to use, example: percent discount.
3. Create Visual Force Pages
Create New Quote page by clicking new:
Fill in the following values:
-
Label: CPQQuoteNew
-
Name: CPQQuoteNew
- In the Visualforce Markup tab, add text below:
<apex:page standardController="Quote__c" showHeader="true" > <apex:iframe scrolling="true" height="1000" src="https://CPQApplication/salesforce/SfLogin.aspx?sfauthUserID={!$User.Username}&apiPartnerURL={!$Api.Partner_Server_URL_160}&apiSessionID={!$Api.Session_ID}&domain_name=TenantName&apiPass=Password&action=New&sfqpOpportunityID={!Quote__c.Opportunity__c}" /> </apex:page>
*Change the following bolded information in the code above to the following:
1. For "CPQApplication", replace with URL (i.e sandbox.webcomcpq.com)
2. For "TenantName", replace with domain name.
Below is what it should look like if page is configured correctly.
Now do the same for Edit Quote.
-
Label: CPQQuoteEdit
-
Name: CPQQuoteEdit
- In the Visualforce Markup tab, add text below:
<apex:page standardController="Quote__c" showHeader="true" > <apex:iframe scrolling="true" height="1000" src="https://CPQApplicationName/salesforce/SfLogin.aspx?sfauthUserID={!$User.Username}&apiPartnerURL={!$Api.Partner_Server_URL_160}&apiSessionID={!$Api.Session_ID}&domain_name=TenantName&apiPass=Password&action=Edit&sfqpOpportunityID={!Quote__c.Opportunity__c}&OwnerId={!CEILING(Quote__c.Owner_Id__c)}&QuoteId={!CEILING(Quote__c.Quote_Id__c)}"/> </apex:page>
*Change the following bolded information in the code above to the following:
1. For "CPQApplication", replace with URL (i.e sandbox.webcomcpq.com)
2. For "TenantName", replace with domain name.
You can also use apiPass to enhance security measure. You will need to replace the apiPass password in the visualforce page code above to match password entered in CPQ. Click here to find more information about apiPass.
4. Override Quote’s Standard Buttons and Links
Now that we've created VF pages, we want to use them right? So we need to replace the standard pages for new, edit and view with the pages we just created.
Click Setup>Build>Create>Objects
Scroll down to the "Buttons, Links and Actions" section, edit the following actions to override the following pages, View, Edit, and New.
In the Override section, select the Visualforce page previously created from the drop-down menu.
Override the following actions with the following Visualforce page below:
-
Override View : Choose Visual Force page CPQQuoteEdit.
-
Override Edit : Choose Visual Force page CPQQuoteEdit.
-
Override New : Choose Visual Force page CPQQuoteNew.
5. Change Opportunity Page Layout
Now that we have setup the Quote page, including its attributes, we need to add it to the Opportunity Page Layout.
Click Setup > Build > Customize > Opportunities > Page Layouts
You can edit all the pages for opportunity per business function. For now, we'll be editing "Sales Layout".
When you click Edit on the appropriate page layout, you will find a Quotes Section at the bottom of the screen. Scroll down to the Quotes Section and click on the "wrench" icon to enter properties. Note: You can drag the quote section to the top so that it will display at the top of the opportunity page.
Now let's configure CPQ:
In CPQ setup, go to page CRM Integration Setup → CRM Quote. In the first section (Basic mappings), populate fields with the following values:
-
CRM Quote Object Name: Quote__c
-
CRM Field For Persisting Quote Id: Quote_Id__c
-
CRM Field For Persisting Quote Owner Id: Owner_Id__c
-
CRM Field For Persisting About Primary Quote: Primary__c
In the second section (additional mappings), add the following values (first CRM Quote Field, then CPQ Tag) :
-
Discount_Percent__c:<*CTX(Quote.Total.AverageProductDiscountPercent.DefaultDecimal)*>
-
Total_List_Price__c:<*CTX(Quote.Total.TotalListPrice.MarketDecimal)*>
-
Name : <*CTX(Quote.CartCompositeNumber)*>
-
Total_Net_Price__c:<*CTX(Quote.Total.TotalNetPrice.MarketDecimal)*>
-
Revision_Number__c: <*CTX(Quote.Revision.RevisionNumber)*>
Keywords
KBA , CEC-SAL-CPQ , Sales Cloud CPQ , How To
Product
Attachments
s1.png |
s5.png |
t11.png |
t111.png |
t112.png |
t113.png |
t14.png |
t15.png |
t19.png |
t20.png |
t21-1.png |
t21-1.png |
t21.png |
t23.png |
t23.png |
t8.png |