Before You Install the Recipe

You must perform the following configuration tasks on your Oracle CPQ and Salesforce instances in order to successfully connect to these external systems using Oracle Integration and synchronize data in both systems.

  1. Configure Oracle CPQ
  2. Configure Salesforce

Configure Oracle CPQ

To access an Oracle CPQ instance using Oracle Integration and ensure that data is synchronized, you must perform certain configuration tasks on your Oracle CPQ instance.

Log in to your Oracle CPQ instance as an Administrator and complete the following tasks.

  1. Obtain the SOAP WSDL from the Oracle CPQ site.

    Oracle Integration uses the Oracle CPQ transaction WSDL to understand the valid data and operations provided by Oracle CPQ.

    For details, see Prerequisites for Creating a Connection in Using the Oracle CPQ Adapter with Oracle Integration.

  2. Obtain the REST catalog URL of Oracle CPQ.

    This URL is used to access the Oracle CPQ application’s business resources for outbound connections. It is formatted as http(s)://site_URL/rest/v3/metadata-catalog where site_URL is the base URL of the Oracle CPQ site.

    For details, see Prerequisites for Creating a Connection in Using the Oracle CPQ Adapter with Oracle Integration.

  3. Create a user account for Oracle Integration with the Web Services Only permissions.
    1. On the Oracle CPQ home page, click Admin Drawer on the top left of the title bar.
    2. In the Admin navigation pane, expand Users and click Internal Users.

      The User Administration List page appears.

    3. Add the user from the User Administration List page.
      For detail information, see Setting Up Users in the Oracle CPQ online help.
  4. Create a connection from Oracle CPQ to Oracle Integration by creating an integration.
    1. On the Oracle CPQ home page, click Admin Drawer on the top left of the title bar.
    2. In the Admin navigation pane, expand Integration Platform and click Integration Center.
    3. On the Integration Center page, click Create Integration.
    4. From the Type drop-down list, select Integration Cloud Service.
    5. In the resulting page enter the following details, and click Test to verify if your connection works.
      Field Information to enter
      Name Enter a suitable name.
      Variable Name

      This field is automatically populated.

      Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.

      Discovery URL Enter the Oracle Integration instance URL.
      Username Enter the username to access your Oracle Integration instance.
      Password Enter the password to access your Oracle Integration instance.
    6. Select Enable Integration, and then click Save.
  5. Link the integration that you created to an existing process.
    1. On the Oracle CPQ home page, click Admin Drawer on the top left of the title bar.
    2. In the Admin navigation pane, expand Commerce and Documents and click Process Definition.
    3. On the Processes page, select the process to which you want to link the integration. Select Integrations from the Navigation drop-down list, and click List.
    4. On the resulting Integrations page, click Add.
    5. On the Select Integration Types page, select Integration Cloud Service and click Next.
    6. On the Edit Integration page, enter the following details and click Add:
      Field Information to Enter
      Name

      Enter the name of the integration cloud service. For example, Salesforce Quote Update.

      Variable Name Enter a variable name. For example, salesforceQuoteUpdate
      Timeout Enter the timeout in milliseconds. For example, 30000.
      Description If required, enter a suitable description.
      Action Select the Export option.
      Services Select the service. For example, Oracle CPQ Salesforce Transaction2Quote Sync.
  6. Specify the action that triggers the integration.
    1. On the Processes page, select the process linked to the integration. Select Documents from the Navigation drop-down list, and click List.
    2. In the Transaction row of the Document List page, select Actions from the Navigation drop-down list, and click List.
    3. On the Action List page, click the Copy Of Save link.
    4. On the Admin Action page, click the Integration tab.
    5. From the Integration List box, select the integration created in Step a and click the > arrow to add it to the Selected Integration box.
    6. Click Update.
  7. Configure the Salesforce ID.
    Set up the Salesforce ID as an attribute so that in case you need to update the Oracle CPQ transaction, you can use the Salesforce ID as a lookup to identify the change required.
    1. On the Processes page, select the process linked to the integration. Select Documents from the Navigation drop-down list, and click List.
    2. In the Transaction row of the Document List page, select Attributes from the Navigation drop-down list, and click List.
    3. On the Attribute List page, scroll down to the end of the page and click Add.
    4. On the Attribute Editor page, enter the following details and click Add:
      Field Information to Enter
      Label

      Enter the name of the attribute. For example, QuoteID.

      Variable Name

      Enter the variable name. For example, quoteID.

      Attribute Type

      Select Text.

    5. In the Text Attribute Editor, enter a suitable description in the Description field, and click Update.
  8. Deploy the process.
    Now that you've created the integration and configured it with the required action and attribute, you can deploy the process linked to the integration.
    1. On the Processes page, select the process linked to the integration. Select Deployment Center from the Navigation drop-down list, and click List.
    2. On the Deployment Center page, select Deploy under Event Type, and click Add Event.
    3. Click Refresh.
      Once the deployment completes, the Last Deployed time will be updated.

Configure Salesforce

To access Salesforce using Oracle Integration and ensure that the opportunity quote data is synchronized, you must perform certain configuration tasks on your Salesforce instance.

Log in to your Salesforce instance as an Administrator and execute the following tasks.

Note:

The steps provided here apply to the Salesforce Classic UI. If you're using the Lightning Experience UI on your Salesforce instance, switch to the Classic UI. See Toggle or switch between Lightning Experience and Salesforce Classic.
  1. Create an API-enabled custom role.
    1. On the Salesforce Setup page:
      1. Expand Manage Users under the Administer section in the left navigation pane.
      2. Click Profiles.
    2. On the Profiles page, click New Profile, and on the resulting page complete the following:
      1. Select Standard User in the Existing Profile field.
      2. Enter a name for the new profile, for example, API Enabled.
      3. Click Save.
    3. On the Profile Detail page, click Edit, and on the resulting Profile Edit page complete the following:
      1. Scroll to the Administrative Permissions section and ensure that the API Enabled check box is selected.
      2. Scroll to the Standard Object Permissions section and complete the following:
        • In the Accounts row, leave Read, Create, Edit, and Delete selected. Additionally, select ViewAll.
        • In the Contacts row, leave Read, Create, Edit, and Delete selected. Additionally, select ViewAll.
        • In the Price Books row, leave Read selected. Additionally, select Create, Edit, and Delete.
        • In the Products row, leave Read selected. Additionally, select Create, Edit, and Delete.
      3. Scroll down to the end of the page and click Save.
  2. Create a user account for Oracle Integration and assign the custom role created in step 1 to this account.

    You'll use the credentials of this user account while configuring the Salesforce connection in Oracle Integration.

    Note:

    If you have already created a user account for Oracle Integration, you can assign the API-enabled custom role to the existing account.
    1. On the Profile Detail page of the API Enabled profile, click View Users.
    2. In the resulting page, click New User.
    3. Create a username and password.
      1. On the New User page, enter the first and last name of the user. For example, Integration User05.
      2. In the Email field, enter a valid email address.

        Note that the email address you enter is automatically populated in the Username field. Note the username.

      3. In the User License field, select Salesforce.
      4. In the Profile field, select the profile you created previously, that is, API Enabled.
      5. Scroll to the end of the page, ensure that the Generate new password and notify user immediately check box is selected, and click Save.

        The user account is now created, and a verification email is sent.

      6. Click the Verify Account button in the email message from Salesforce. You're redirected to the Salesforce instance to set a password for the new user account.
      7. Set a password and note down the same.
      Subsequently, you're signed in to the Salesforce instance with the new account.

      Note:

      If you're shown the Lighting Experience UI, switch to the Salesforce Classic UI. See Toggle or switch between Lightning Experience and Salesforce Classic.
    4. Generate a security token for the new user account. You'll need this security token along with the password to access Salesforce using Oracle Integration.
      1. Stay signed in as the new user, and click the user name at the top of the page to open a menu.
      2. Click My Settings from the menu.
      3. On the My Settings page, under the Quick Links section, click Edit my personal information.
      4. On the left navigation pane of the resulting page, click Reset My Security Token.
      5. Select the Reset Security Token button.

        A new security token is sent to the email address associated with the account. Note down the security token.

      6. On the Salesforce instance, click the user name again and select Logout from the menu. Log back in as the Administrator.
  3. Identify your current Salesforce API version.
    1. On the Salesforce Setup page:
      1. Scroll to the Build section in the left navigation pane.
      2. Expand Develop, and then click API.
    2. On the API WSDL page, click the Generate Enterprise WSDL link.
      The WSDL is displayed in a new browser tab, and your current API version is present in the second line. For example:
      Salesforce.com Enterprise Web Services API Version 52.0
    3. Note down the API version.
  4. Identify your Salesforce instance type.
    1. If you use the URL https://login.salesforce.com to log in to your Salesforce account, your instance type is Production.
    2. If you use the URL https://test.salesforce.com to log in to your Salesforce account, your instance type is Sandbox.
  5. Identify the Salesforce ID for the Standard Price Book.
    1. On the Salesforce Setup page, click the Products tab.
    2. Scroll to the Maintenance section and click Manage Price Books .
    3. On the resultant Price Books page, click Standard Price Book in the Price Book Name column.
      The Standard Price Book details page appears.
    4. Locate the 15 character Salesforce ID in the Standard Procice Book page's URL. For example, if the URL is https://<instance name>.my.salesforce.com/01s0o75956AleUQ, then the Salesforce ID is 01s0o75956AleUQ.
      Note the Salesforce ID. You'll require it when you configure the lookup table in Oracle Integration.
  6. Configure the lookup value for Oracle CPQ Cloud.
    1. In the left navigation pane of the Salesforce Setup page, scroll to the Build section, expand Customize, then Quotes, and then click Fields.
    2. On the resultant Quote Fields page, scroll to the Quote Custom Fields & Relationships section and click New.
    3. On the New Custom Field page, select the Text radio button and click Next.
    4. Enter the following details for the new custom field and click Next:
      Field Information to Enter
      Field Label Enter the field name. For example, TransactionId_CPQ.
      Length Enter the maximum length that you want to allow for the text field. For example, 255.
      Field Name This field is automatically populated.
      Description If required, enter a description for the custom field.
    5. On the Establish field-level security page, select Visible and click Next.
    6. Leave all check boxes selected in the next page, and click Save.
    On the Quote Fields page, you can see the new custom field added under the Quote Custom Fields & Relationships section.
  7. Configure the Salesforce platform event. The platform event notifies external systems about changes to the Salesforce opportunity quote.
    1. In the left navigation pane of the Salesforce Setup page, scroll to the Build section, expand Develop, and then click Platform Events.
    2. On the Platform Events page, click New Platform Event.
    3. On the New Platform Event page, enter the following information:
      Field Information to Enter
      Label Enter the field label. For example, TransactionId_CPQ.
      Plural Enter the plural form of the field label.
      Object Name This field is automatically populated.
      Description If required, enter a description for the new platform event.
      Publish Behaviour
      Select one of the following options:
      • Publish After Commit

        The event message is published only after a transaction commits successfully. Subsequently, the subscriber receives the event message after the data is committed. If the transaction fails, the event message isn't published.

      • Publish Immediately

        The event message is published when the publish call executes, irrespective of whether the transaction succeeds or not. Subsequently, the subscriber receives the event message before the data is committed.

    4. In the Deployment Status section, select Deployed.
    5. Click Save.
      The Platform Event page displays the details of the event.
    6. Create a custom field.
      1. In the Custom Fields & Relationships section of the Platform Event page, click New.
      2. On the resultant New Custom Field page, select the Text radio button, and click Next.
      3. Enter the following details:
        Field Information to Enter
        Field Label Enter a name for the field label. For example, QuoteID.
        Length Enter the maximum length that you want to allow for the text field. For example, 255.
        Field Name This field is automatically populated.
        Description If required, enter the description of the custom field.
      4. Click Save.
    7. Create another custom field by repeating the steps a - f, but enter a different label name, for example TransactionId_CPQ.
  8. Create and activate a process that triggers the platform event.
    1. On the left navigation pane of the Salesforce Setup page, scroll to the Build section. Expand Create and then Workflow and Approvals, and click Process Builder.
    2. Create a process.
      1. On the Process Builder page, click New.
      2. Enter the following details in the New Process dialog:
        Field Information to Enter
        Process Name Enter a name for the process. For example, CPQ.
        API Name This field is automatically populated.
        Description If required, enter a suitable description for the process.
        The process starts when Select A record changes.
      3. Click Save.

        The Process Builder page now displays a default process flow.

      4. Click the Add Criteria decision box in the flowchart.

        The Process Builder displays Define Criteria for this Action Group section.

      5. In the Immediate Actions box beside the TRUE arrow, click Add Action.

        The Process Builder displays Select and Define Action section for adding actions.

      6. Click Save.
    3. Configure the process trigger. After you have created the process in the previous step, you have to configure the rules required for the process to trigger the platform event.
      1. Click the Add Object box in the process flowchart.
      2. From the Choose Object and Specify When to Start the Process pane that opens, select the following and click Save.
        Field Information to Enter
        Object Select Quote.
        Start the process Select When a record is created or edited.
    4. Add the process criteria. You can specify the criteria that must be true for the process to execute associated actions.
      1. Click Add Criteria in the decision box.
      2. In the Define Criteria for this Action Group pane that opens, provide the following information.
        Field Information to Enter
        Criteria Name Enter a name for the criteria.
        Criteria for Executing Actions Select Conditions are met.
      3. Create a condition to restrict the user from triggering the process.
        In the Set Conditions table, configure the following:
        Field Information to Enter
        Field Search for LastModifiedBy.CommunityNickname and select it.
        Operator Select Does not equal.
        Type Select String.
        Value Enter the nickname of the Salesforce user who creates or edits the quotes.
      4. Create another condition to ensure that the process gets triggered when line items are available.
        Click Add Row and configure the following:
        Field Information to Enter
        Field Search for LineItemCount and select it.
        Operator Select Greater than.
        Type Select Number.
        Value Enter 0.
      5. From the Conditions options list, select All of the conditions are met (AND).
      6. Expand the Advanced drop-down list, and for Do you want to execute the actions only when specified changes are made to the record? select Yes.
      7. Click Save.
    5. Add action to your process.
      1. In the Immediate Actions box beside the TRUE arrow, click Add Action.
      2. In the Select and Define Action pane, from the Action Type drop-down list, select Create a Record.
      3. From the Record Type drop-down list, enter the name of the platform event you have created in step 7.

        In the Set Field Values section, create two rows with the following values:

        For row 1, set the following values:

        Field Information to Enter
        Field Type the name of the custom field you have created in sub-step f of step 6. For example, QuoteID.
        Type Select Field Reference.
        Value Click this field and on the resultant Select a Field dialog, select Quote ID from the drop-down, and click Choose.

        For row 2, set the following values:

        Field Information to Enter
        Field Type the name of the custom field you have created in sub-step g of step 6. For example, TransactionId_CPQ.
        Type Select Field Reference.
        Value Click this field and on the resultant Select a Field dialog, select TransactionId_CPQ from the drop-down, and click Choose.
      4. Click Save.
    6. Activate the process.
      1. On the top right of the Process Builder page, click Activate.
      2. In the Activate Version dialog, click Confirm.