Oracle Process Cloud Service (PCS) Integration
Overview
The Oracle Configure, Price, and Quote (CPQ) application includes approval functionality and now provides customers with the ability to integrate Oracle CPQ with Oracle Process Cloud Service (PCS) or other remote approval systems to manage their approval workflows. Remote approval systems such as PCS also allow customers to consolidate all of their approvals into a central location and provide a common configuration and common attributes to manage approvals for an entire suite of applications. This eliminates the need to migrate approval data from one system to another. When customers choose remote approvals, Oracle CPQ sends approval requests to external approval systems for processing. Once complete, the associated approve or reject action is performed on the remote approval system, which then calls the appropriate approve or reject Oracle CPQ REST endpoint to update the Oracle CPQ quote history and status.
In 2016 R1, Oracle CPQ introduces a new Submit action attribute to enable remote approvals. Use this new functionality to create a new Submit action for your remote approval system. The purpose of this Oracle CPQ – PCS Integration Implementation Guide is to provide an overview of remote approvals and instructions on how to implement the Oracle CPQ − PCS integration.
Check with Oracle PCS customer support for the availability of this integration.
The following figure provides a visual depiction of the Oracle CPQ – PCS remote approval call process.
The remote approval lifecycle is broken down into three steps (Submit, Remote Approval, and Final Approval), these steps are described below.
Administration
Before leveraging the pre-built PCS flows, administrators must establish a connection between PCS and CPQ.
Establish a connection from Oracle CPQ to PCS that complements the existing connection from PCS to CPQ.
- In CPQ, navigate to the Admin Home Page.
- Click Integration Center under Integration Platform. The Integration Center page opens.
-
Click Create Integration. The Create Integration page opens.
If a user selects Create Integration and there are not any integrations available, the system displays an error message. The following figure provides a sample error message.
- Select Remote Approval from the Type drop-down menu.
- There is a limit of one entry for each integration type. Any previously created integration types are disabled.
- Administrators can only select integration types that are not yet created. By default, the first valid option is selected.
- Changing the integration type immediately changes the available fields.
- Enter a Name. Use a name that makes it easy to find your integration.
- Enter the Request URL and Revise URL. For PCS integrations, these fields are pre-populated with "https://"
For example, Request URL and the Revise URL might look like the following:
https://<host:port>/bpm/api/1.0/processes
- Enter your PCS User name and Password.
-
Click Save to enable your integration.
- Navigate to the Admin Home Page.
- Select Process Definition under Commerce and Documents. The Processes page opens.
- For the appropriate process, select Documents in the Navigation drop-down menu and click List.
The Document List page opens. - For the appropriate document, select Actions in the Navigation drop-down menu and click List.
The Action List page opens. - Select Add to create a new submit action. The Admin Action page opens.
- Enter a Label and a Variable Name.
- Select Submit from the Action Type drop-down.
-
Click Add to create a new submit action.
- From the Approval Sequence options, select Use Remote to enable the remote approval sequence.
-
Click Update.
Remote Approvals use BML functions for the following activities:
- Send a request to the remote approval system to initiate the approval process.
- Parse the response, return the process ID, and store the ID in the remote approval process ID attribute. The Submit action creates this attribute.
- Send the payload, with or without attachments, to PCS to start the PCS process.
- Use BMQL to fetch the username, password, and the URL fields defined in the integration center.
Set the username and password in the header while using the URL functions.
Define Remote Approval BML Functions
Complete the following steps to define a request approval function:
- Navigate to the Admin Home Page.
- Select Process Definition under Commerce and Documents.
The Processes page opens. - For the appropriate process, select Documents in the Navigation drop-down menu and click List.
The Document List page opens. - For the appropriate document, select Actions in the Navigation drop-down menu and click List.
The Action List page opens. - Set up the following sub-actions:
- Request Approval – perform to Step 6 through Step 8.
- Approve/Reject Function (optional) – perform to Step 9 through Step 11.
- Revise Function (optional) – perform to Step 12 through Step 14.
- Select remote approval Request Approval sub-action.
The remote approval Request Approval Admin Action page opens. -
Click Define Function next to Remote Call Processing.
- Enter and save the BML script for the request approval function. Refer to the following samples:
- Select the remote approval Approve sub-action.
The remote approval Approve Admin Action page opens. - Click Define Function next to Remote Call Processing.
- Enter and save the BML script for the approve function.
For additional information, refer to the Approve/Reject BML sample. - Select the remote approval Revise sub-action.
The remote approval Revise Admin Action page opens. - Click Define Function next to Remote Call Processing.
- Enter and save the BML script for the revise function.
For additional information, refer to the Revise BML sample.
JSON urlmultipartbypost – Send attachments with the payload to start the PCS process.
JSON urldatabypost – Send only the JSON payload to start the PCS process.
SOAP urldatabypost – Send only the SOAP payload to start the PCS process.
A new Submit action attribute called “remote_approval_process_id” is available for remote approvals. This attribute stores the value returned from the request approval BML function, which is typically processed for the PCS process instance. Use this attribute in the revise flow to cancel an existing PCS process instance.
Approve and reject sub actions are automatically exposed as REST endpoints. PCS uses these REST endpoints to notify Oracle CPQ when a quote is approved or rejected. When the REST endpoints are invoked with the “POST” operation, the corresponding BML in these actions is executed. The return value from the BML is used to update the approval history. If no BML is defined, then the approval history is not updated.
As shown below, the REST endpoints use the standard format:
http://hostname:port/rest/v17/commerceDocuments<processName>Quote/<bsid>/actions/
<action_variable_name>
The PCS setup information provided in this section is intended as guidance only. With future versions of PCS, some portions of the user interface may change. For additional setup guidance, refer to the PCS documentation or contact PCS support.
Web Form Parameters for Start Node and JSON
The JSON string defined in the BML Request Approval sub action should match the Web Form parameters for the PCS process Start Node. If they do not match, an error displays when executing the request approval action.
If the Start node in PCS is defined to accept a structure like header and lines, then the JSON in Oracle CPQ should contain the same XML tags and header and line data.
JSON string in BML Request Approval sub action:
Service Activity Data Association to Call Oracle CPQ REST Endpoint
PCS uses a service activity to call the Oracle CPQ REST endpoint for the approve and reject action. In the data association for this service activity, verify the bs_id and sub action variable name when constructing the URL to invoke.
An example data association for a service activity is shown below.