Post Slack Notifications for Oracle CPQ Quote Approvals

Post Slack Notifications for Oracle CPQ Quote Approvals

Use this recipe to post notifications in Slack for Oracle Configure, Price, and Quote Cloud (Oracle CPQ) quote approvals.

Note: This recipe is available as Oracle CPQ — Slack | Post Notifications for Quote Approvals in the Integration Store. Oracle provides this recipe as a sample only. The recipe is meant only for guidance, and is not warranted to be error-free. No support is provided for this recipe.

Overview

This recipe posts a notification message to a specified Slack channel when an Oracle CPQ quote is sent for approval. The Slack notification message also contains a link to access the transaction approval page.

To use the recipe, you must install the recipe package and configure connections and other resources within the package. Subsequently, you can activate and run the integration flow of the package. When a quote is sent for approval in Oracle CPQ, the integration flow gets triggered, and it subsequently posts a notification message in the specified Slack channel with a link to the transaction approval page for the quote.

System and Access Requirements

Before You Install the Recipe

You must perform the following configuration tasks on your Oracle CPQ and Slack instances in order to successfully connect to these external systems using Oracle Integration and post Slack notifications for Oracle CPQ quote approvals.

Configure Oracle CPQ

To access Oracle CPQ using Oracle Integration and ensure that notifications are posted in Slack for quote approvals, you must perform certain configuration tasks in your Oracle CPQ instance.

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

  1. Create a user account for Oracle Integration with the Web Services Only permission.

    1. On the Oracle CPQ home page, click Admin Drawer on 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 details, see Setting Up Users.

  2. Obtain the REST Catalog URL. See Prerequisites for Creating a Connection.

  3. Create an integration in Oracle CPQ to establish a connection from Oracle CPQ to Oracle Integration.

    1. In the Admin navigation pane, expand Integration Platform and click Integration Center.

    2. On the Integration Center page, click Create Integration.

    3. From the Type drop-down list, select Integration Cloud Service.

    4. 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 Enter a variable name.
      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.
    5. Select Enable Integration, and then click Save.

  4. Link the integration that you created to a process.

    1. In the Admin navigation pane, expand Commerce and Documents and click Process Definition.

    2. 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.

    3. On the resulting Integrations page, click Add.

    4. In the Select Integration Types page, select Integration Cloud Service and click Next.

    5. On the Edit Integration page, enter the following details and click Add.

      Field Information to Enter
      Name Enter a suitable name.
      Variable Name Enter a variable name.
      Timeout Enter the timeout in milliseconds.
      Description If required, enter a suitable description.
      Action Select the Export option.
      Services Select the Service.
  5. 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 Actions List page, select Submit and then Request Approval.

    4. On the Admin Action page, click the Integration tab.

    5. From the Integration List box, select the integration created in Step 3 and click the > arrow to add it to the Selected Integration box.

    6. Click Update.

  6. Specify the approval rule and the user that will approve the quote.

    1. On the Processes page, select the process linked to the integration. Select Integrations 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 Actions List page, select Submit.

    4. Click the General tab, and navigate to Approval Sequence and Edit User Approval.

    5. Click +, enter the Reason Name and Variable Name, and then click Save.

    6. Select Simple Condition, specify the Attribute Name, Operator, and Attribute Value, and then click Save.

    7. Click Reason Flow, click Approvals, and then select the approver who would approve the quote from the drop-down list.

Configure Slack

To access Slack using Oracle Integration and ensure that Oracle CPQ quote approval notifications are posted in the specified Slack channel, you must perform certain configuration tasks in your Slack instance.

  1. Create a Slack workspace.

    1. Open the Slack get started page using the following URL:

      https://slack.com/get-started#/createnew
      
    2. Enter your email and click Continue.

    3. Enter the confirmation code that you receive in your email, click Create a workspace, and follow the prompts.

  2. Create a channel to post notifications.

    1. On your Slack instance, select your workspace.

    2. Click the workspace name on the left navigation pane, and from the menu that displays, select Create a channel.

    3. In the Create a channel dialog, enter your channel’s name in the Name field.
      For example, #cpq-quote-approval.

    4. Optionally, enter a suitable description for the channel in the Description field.

    5. Click Create.

  3. Add people to your channel.

    1. On your Slack workspace, select the channel from the left navigation pane to open it.

    2. Click Add people on the top right of the channel.

    3. In the resulting Add people dialog, enter names, emails, or user groups of people you want to add in the field provided.

    4. Click Add.

  4. Create a Slack App.

    1. Log in to the Slack app platform at https://api.slack.com.

    2. In the Slack API title bar, click Your Apps.

    3. Click Create an App, and in the resulting Create an app dialog, select From scratch.

    4. In the Name app & choose workspace dialog, enter the following details:

      1. In the App Name field, enter the name of your app.
        For example, Oracle Integration App.

      2. In the Pick a workspace to develop your app in field, select your workspace from the drop-down list.

    5. Click Create App.
      The app gets created and its Basic Information page appears.

  5. Get the Slack App API credentials.

    1. In the app’s Basic Information page, scroll down to the App Credentials section.

    2. Note the client ID in the Client ID field, and the client secret in the Client Secret field.
      You’ll use these later while configuring connections to your Slack instance from Oracle Integration.

  6. Set permissions for your Slack App.

    1. In the left menu, under Features, select OAuth & Permissions.

    2. In the OAuth & Permissions page, go to the Redirect URLs section.

    3. Click Add New Redirect URL and enter the URL of your Oracle Integration instance.
      For example, https://your_instance_URL:443/icsapis/agent/oauth/callback
      where your_instance_URL is the Host URL of your Oracle Integration instance.

    4. Click Add, and then click Save URLs.

    5. Scroll down to the Scopes section, and under User Token Scopes click Add an OAuth Scope.

    6. Enter the following scopes:

      • channels:read

      • channels:write

      • groups:read

      • groups:write

      • usergroups:write

      Note the scopes. You’ll use these later while configuring connections to your Slack instance from Oracle Integration.

    7. Press Enter.

Install and Configure the Recipe

On your Oracle Integration instance, install the recipe package to deploy and configure the integration and associated resources.

  1. On the Oracle Integration home page, scroll to the Accelerators & Recipes section.

  2. Click Search All.

  3. Find the recipe package that you want to install.

  4. Select the package, and then click the Install Install icon icon.

  5. After the package is installed, click the Configure Configure icon icon on the recipe card to configure the resources deployed by the package.

    The Configuration Editor page opens, displaying all the resources of the recipe package. Configure the following resources before you activate and run the recipe.

Configure the Oracle CPQ Connection

  1. On the Configuration Editor page, select Oracle CPQ Connection, then click Edit Edit icon.
    The connection configuration page appears.

  2. In the Connection Properties section, enter the following details.

    Field Information to Enter
    Connection Type Select REST Catalog URL. See Configure Oracle CPQ.
    Connection URL Enter the instance URL of Oracle CPQ.
  3. In the Security section, enter the following details.

    Field Information to Enter
    Security Policy Select Username Password Token.
    Username Enter the username of the account created for Oracle Integration in Oracle CPQ. See Configure Oracle CPQ.
    Password Enter the password of the account created for Oracle Integration in Oracle CPQ.
  4. Click Save. If prompted, click Save for a second time.

  5. Click Test to ensure that your connection is successfully configured. In the resulting dialog, click Test again.
    A confirmation message is displayed if your test is successful.

  6. Click Back Back icon to return to the Configuration Editor page. Click Save again if prompted.

Configure the Oracle Slack Connection

  1. On the Configuration Editor page, select Oracle SAP Connection, then click Edit Edit icon.
    The connection configuration page appears.

  2. Under the Security section:

    1. In the Client ID and Client Secret fields, enter the Client ID and Client Secret you obtained earlier while creating and configuring a Slack app.

    2. In the Scope field, enter the permission scopes you configured while creating and configuring a Slack app.

    See Configure Slack.

  3. Click Provide Consent.
    A new browser window opens to approve access to Slack.

  4. Click Allow.

  5. On the connection window, click Save. If prompted, click Save for a second time.

  6. Click Test to ensure that your connection is successfully configured. In the resulting dialog, click Test again.
    A confirmation message is displayed if your test is successful.

  7. Click Back Back icon to return to the Configuration Editor page. Click Save again if prompted.

Update Integration Property

You have to update the integration property value so that Oracle CPQ quote approval notification messages are sent to the right Slack channel.

  1. On the Configuration Editor page, select the Oracle CPQ Slack Quote Approval integration.

  2. Click Actions and then click Update Property Values.

  3. In the Update Property Values dialog, click SlackChannelId.

  4. In the New Value field, enter the name of the Slack channel where you want the notifications to be posted.

  5. Click Submit.
    You get a confirmation message that the integration property has been updated successfully.

Activate and Run the Recipe

After you’ve configured the connections and integration property, activate the recipe package and run it.

  1. On the Configuration Editor page, click Activate in the title bar. In the Activate Package dialog, click Activate again.
    A confirmation message is displayed informing that the integration has been submitted for activation. Refresh the page to view the updated status of the integration.

  2. Run the recipe.

    1. Log in to your Oracle CPQ instance.

    2. Create a transaction and specify the quote details.
      Note that you can only submit a quote for approval, if it fulfills the specified approval rule.

    3. Click Submit.

      You have now successfully triggered the recipe.

  3. Monitor the execution of the integration flow in Oracle Integration.

    1. In the Oracle Integration home page, click Monitoring, then Integrations, and then Tracking.

    2. On the Track Instances page, you’ll see the integration flow of the recipe being triggered and executing successfully. The recipe now posts a notification message with a link to the Oracle CPQ quote approval page in the specified Slack channel.

  4. Check if a notification message is posted in the Slack channel.

    1. In your Slack instance, navigate to the channel you created for posting notifications for Oracle CPQ quote approvals.

    2. Check if a notification message with a link to the Oracle CPQ quote approval page is posted to the channel.

  5. Check if you can access the Oracle CPQ quote approval page and approve the quote as the approver.

    1. Click the link in the Slack notification message.

    2. Log in to Oracle CPQ as the approver.

    3. On the Approval Status page, enter Approved in the My Approval field. A green check mark indicates that the quote has been approved successfully.
      The Approval History section displays details such as the user who approved the quote and the date on which the quote is approved.

Related Documentation