Integrating Oracle CPQ with Salesforce (SFDC) streamlines the quote creation process, enabling sales teams to generate quotes directly from Salesforce with a single click. This seamless integration not only enhances the efficiency of the sales process but also ensures data accuracy and reduces manual data entry errors. In this article, we’ll walk through the steps to set up this integration and provide sample code to help you launch Oracle CPQ configurations directly from SFDC on the click of a “Create Quote” action.
Prerequisites
- Access to Oracle CPQ and Salesforce (SFDC) with administrative privileges.
- Basic understanding of Salesforce setup and custom button/link creation.
- Familiarity with Oracle CPQ’s API and custom fields setup.
Step 1: Configure Salesforce for Integration
Creating a Connected App for OAuth
- In Salesforce, navigate to Setup > Apps > App Manager.
- Select New Connected App.
- Enter the necessary information:
- Connected App Name: OracleCPQIntegration
- API Name: Automatically generated based on the app name.
- Contact Email: Your email address.
- In API (Enable OAuth Settings), check Enable OAuth Settings.
- Callback URL:
https://<YourOracleCPQDomain>/oauth2/callback
(Replace<YourOracleCPQDomain>
with your actual Oracle CPQ domain.) - Selected OAuth Scopes: Add “Full access (full)” and any other required scopes.
- Note down the Consumer Key and Consumer Secret for later use.
Step 2: Set Up Oracle CPQ Integration User
- In Oracle CPQ, create an integration user account that Salesforce will use to authenticate API requests.
- Assign necessary permissions to access and modify quote configurations.
Step 3: Implement “Create Quote” Action in Salesforce
- Navigate to the Salesforce Object Manager and select the object you wish to add the “Create Quote” action to (e.g., Opportunity).
- Go to Buttons, Links, and Actions and click New Button or Link.
- Enter the details:
- Label: Create Quote
- Display Type: Detail Page Button
- Behavior: Execute JavaScript
- Content Source: OnClick JavaScript
- In the text box, enter the JavaScript code to call Oracle CPQ. Here’s a sample snippet:
{!REQUIRESCRIPT("/soap/ajax/48.0/connection.js")} // Use the latest AJAX toolkit version
var cpqUrl = "https://<YourOracleCPQDomain>/commerce/buyside/document.jsp?bs_id=<BS_ID>&";
var sfdcId = '{!Opportunity.Id}';
window.open(cpqUrl + "sfid=" + sfdcId, "_blank");
Replace <YourOracleCPQDomain>
and <BS_ID>
with your Oracle CPQ domain and the specific buy-side document ID, respectively.
Step 4: Configure Oracle CPQ to Accept Salesforce ID
- In Oracle CPQ, create a custom field to store the Salesforce record ID (e.g., Opportunity ID).
- Modify the CPQ layout or script to parse the Salesforce ID from the URL and populate the custom field upon quote creation.
Step 5: Automate Authentication from Salesforce to Oracle CPQ
- Use the stored Consumer Key and Consumer Secret from the Connected App to configure the authentication mechanism in Oracle CPQ.
- Implement OAuth flow or Single Sign-On (SSO) between Salesforce and Oracle CPQ to ensure secure access.
Testing the Integration
- From Salesforce, navigate to an Opportunity and click the “Create Quote” button.
- Verify that a new Oracle CPQ session opens, pre-populated with data from Salesforce.
Sample Code: Oracle CPQ Custom Script to Parse SFDC ID
function parseSFDCIdFromURL() {
var urlParams = new URLSearchParams(window.location.search);
var sfdcId = urlParams.get('sfid');
if(sfdcId) {
// Assume 'sfdc_opportunity_id' is the custom field API name in CPQ
document.getElementById('sfdc_opportunity_id').value = sfdcId;
}
}
Call this function on the quote configuration page load to ensure the Salesforce ID is captured and stored correctly.
Conclusion
Integrating Oracle CPQ with Salesforce streamlines the quote-to-cash process, enhancing productivity and ensuring data consistency across platforms. By following the detailed steps and utilizing the provided sample code, organizations can achieve a seamless integration that enables sales teams to launch CPQ configurations directly from SFDC with just a click. This integration not only saves time but also improves the overall sales process efficiency.