CPQ SubMgmt Integration
CPQ SubMgmt Integration
Subscription Management
Integration Guide
October 2021
07 JUL 2020 Updated content in the following sections: Document revised for Oracle CPQ and Oracle CX Sales
Prerequisites product branding and content clarification.
13 SEP 2019 Added the following sections: Document revised for Oracle CPQ 19B features.
Oracle CPQ Account Lookup
Integration
Subscription Workbench
INTRODUCTION
Businesses across the industries are looking to adapt the change in buyer behavior and embrace subscription business
models. In order to address these needs, Oracle recently launched the Oracle Subscription Management cloud application. By
integrating front and back office business processes on one platform, Oracle Subscription Management allows organizations
to build predictable, recurring revenue models by providing an end-to-end subscription solution that manages billing and
revenue recognition and also informs customer-facing personnel with a complete view of purchasing behavior.
As part of the end-to-end subscription solution, Oracle CPQ 21D provides an integration with the Oracle Subscription
Management application. This allows customers to create and manage products and services they can sell using a
subscription model. The subscription model supports the ability to manage a given product or service as a recurring or usage-
based price item.
Leveraging this integration, customers can enable their sales teams to capture subscription orders and perform subscription
management activities throughout the lifecycle of these customer relationships. The integration, enabled by Oracle’s next
generation Oracle Integration Cloud (OIC) middleware, sometimes referred to as Oracle Autonomous Integration Cloud
Service (OAIC) or Integration Cloud Service (ICS), comes with a Subscription Management package that includes installable
artifacts for both Oracle CPQ and OIC.
Note: Oracle Subscription Management (OSS) is a separately licensed product. Please contact your Oracle Sales
representative for more details.
Audience
This installation guide is intended for administrators responsible for setting up and configuring the Oracle CPQ - Subscription
Management solution. This guide assumes administrators have prior Oracle CPQ, OSS, and OIC administration experience.
Prerequisites
Administrators must integrate the Oracle CPQ Release 21D or later Sales Cloud Reference Application image, commonly
referred to as the “Ref App”, with the following:
OSS Release 21D or later using OIC 15.4.3 or later middleware, which is used to establish an integration between Oracle
CPQ and OSS.
Subscription Ordering Package which is used to support the Subscription Management amend, renew, and terminate
workflows. For additional information, refer to Doc ID 2182966.1 on My Oracle Support.
Optionally, Oracle recommends integration with Oracle CX Sales (formerly called Oracles Sales Engagement Cloud) to enable
account, user, product synchronization, and reconciliation of Oracles CX Sales opportunities with Oracle CPQ Transactions.
For information, refer to Doc ID 2015009.1 on My Oracle Support for the Oracle CPQ – Oracle CX Sales Integration Guide.
Notes:
Administrators performing the Subscription Management installation must have the Oracle CPQ, OSS, and OIC sites
setup with administrator privileges.
An error will not display to end users when a BML integration queries a non-existing external integration (e.g. the
CDM integration for EBS).
For information about how to obtain any of the above prerequisites, contact an Oracle sales representative.
Acronym List
Definitions of the acronyms used within this document are provided in the below table. For additional information, refer to the
Oracle CPQ Administration Online Help.
BOM Bill of Material Fulfillment systems often maintain BOMs containing complex,
multi-level part structures that differ from the Configuration
attributes used in Oracle CPQ when sales users configure
products. BOM Mapping provides a data-driven mechanism
for mapping these differing product views. To use the
Subscription Management solution to create a subscription
from an Oracle CPQ Transaction, the subscription products
must be modeled as a BOM.
CDM Customer Data Management An integration and common object for EBS and Fusion. The
Subscription Management solution retrieves account
information from CDM, which functions as the account
master.
Fusion PIM Product Information Management The product master for OSS subscriptions. Administrators
have the option of replacing PIM with an alternate solution
such as Salesforce.
OIC Oracle Integration Cloud The Oracle middleware used by Oracle CPQ to provide an all-
encompassing, standard Oracle solution for all integration
needs. By using OIC, system integrators can manage all Oracle
CPQ integrations from a single location with a consistent
toolset.
OSS Oracle Subscription Management Allows organizations to build predictable, recurring revenue
models by providing an end-to-end subscription solution that
manages billing and revenue recognition and also informs
customer-facing personnel with a complete view of
purchasing behavior.
WSDL Web Services Description Language When setting up Oracle CPQ and Subscription Management
Cloud connections in OIC administrators must enter the Oracle
CPQ WSDL URL that integrates with OIC.
Create Subscription
Renew Subscription
1. Integrate Oracle CPQ with Oracle CX Sales: Integrating Oracle CX Sales (formerly called Oracle Sales Engagement
Cloud) with CPQ provides customers seamless support for the entire selling cycle. The integration allows users to
create Transactions and sales orders for an opportunity originating in Oracle CX Sales.
2. Synchronize Products: Oracle CX Sales comes provisioned and fully integrated with the Oracle Fusion Product
Model module, which is used to create and manage product items for use in Oracle CPQ. Products are referred to as
parts in CPQ and as items in Oracle Product Information Management.
The synchronization process pushes or pulls new and updated products between Oracle CPQ and the Fusion Product Model.
Users can create products in the Oracle Fusion Product Model and synchronize the products into CPQ. Likewise, they can
create parts in Oracle CPQ and synchronize them into the Oracle Product Information Management.
Notes:
To create an Oracle CPQ Transaction using the Subscription Ordering flow, users must model the subscription
product as a BOM in Oracle CPQ.
The Subscription Management Integration supports the use of System Configuration BOMs.
Administrators can use a root model to bundle multiple offerings of subscription products.
Use the BOM definition to determine whether to update the old subscription or create a new subscription during the
Amend flow.
The reference integration illustrated in this guide assumes that the customer’s Oracle CPQ environments are
provisioned with a Reference Application, also known as a “Ref App image”, which comes with a set of Commerce
attributes and actions that administrators can configure to meet their business requirements. Customers who do
not have the Reference Application deployed on their CPQ environment can create these Commerce attributes and
actions as mentioned in this guide to complete the below described flows.
In Oracle CPQ 21C and earlier, subscription product line items under the Model part were rolled up into one Model-
level price and part number. Oracle CPQ 21D introduces a new subscription pricing structure that provides a
consistent pricing structure for subscription and non-subscription products by allowing single price type for each
line item. With the new pricing structure, a price change can be made at a more granular level since every charge is
represented with a distinct part. Every line item/part charge is able to roll-up to the Model price. Refer to Pricing
Engine Setup for price setup details.
Sample Scenario: Modeling for the Vision Vehicles SUV Subscription Product
In this sample scenario, Outright SUV Buy and SUV Lease are two Oracle CPQ subscription offerings. To create a subscription
from an Oracle CPQ Transaction, model these subscription products as a BOM. Since users can switch between products when
performing a product upgrade or downgrade from the CPQ Model Configuration page, administrators can bundle the
products with a root model and add a configurable attribute to select one of the offerings.
When a subscription is created, all product lines in the Transaction are added to the same subscription. When there is the root
model, users can track the content of the subscription using a single asset key.
Companies often choose to bundle their subscription products to give more value to the customer and make the selling
process convenient for the customer. The bundle generally consists of two categories of products - the ones that are
mandatory as part of the bundle and others which are optional.
Users can add, update, or delete optional products independently during the Amend flow. All mandatory parts should be
grouped together in a model and expose options only to switch between models. There can be multiple models defined with
various flavors of mandatory products. Optional parts should expose option to configure same in configurator layout.
When amending an existing subscription, the Amend flow can create a new subscription in OSS or apply changes to the
existing subscription in OSS. The approach is based on the flag defined in BOM and the Configurator.
To enable this functionality, create a new Commerce attribute at the Transaction Line level. Define the attribute as follows:
Label: updateOldSubscriptionFlag
Type: Single Select Menu. Supported values are: True and False.
In the Oracle_BomAttrMap table, make an entry as follows for each product in BOM. This configuration ensures the
updateOldSubscriptionFlag is set based on the BOM definition and configuration. Sales users can expose the
updateOldSubscription flag in the layout by defining Configurator attributes.
targetType: LINE_ATTRIBUTE
targetVariableName: oRCL_sm_updateOldSubscription
SourceType: STATIC_ENTRY
Populate BomItemMapVarName
Populate RootBomMapVarName
OIC Integration for End to End Flow The integration in OIC for creating, amending, renewing, and terminating
(CPQ-OSS-Integration-21D) subscriptions.
OIC Flow for the Subscription The integration in OIC for creating renewed Transactions in Oracle CPQ.
Management Cloud Renew Event
OIC Usage Rating Flow The OIC flow for rating usage charges for OSS by invoking the Oracle CPQ Pricing
REST API.
Populate Amend Charge Flow The integration flow that populates charge information from the original
subscription into the amended Oracle CPQ Transaction.
Note: OIC is also known as Integration Cloud Service (ICS). When creating the OIC integration in the Integration Center,
select Integration Cloud Service as the integration type.
7. Enter the username for the OIC environment in the Username field.
8. Enter the password for the OIC environment in the Password field.
9. Click Test to verify the connection.
If the status returned is “Test Connection Passed”, proceed to step 10.
1. Download the Subscription Management package (i.e. CPQ_OSS_Package_21D_1.zip) from My Oracle Support (Doc ID
2508999.1).
To define email notifications for subscription renewals, perform the following steps:
4. Click List.
5. Expand the Start step.
6. Expand Admin.
7. Expand Save.
8. Double click Save -> In Progress.
9. Click Define Notifications from the bottom right corner. The Add Notification Rule page opens.
10. Select the Send Email option.
11. Select the Advanced Recipient Email Address(es) option under Recipient(s).
12. Click Define Function.
13. Change the email ID on line 4 of the BML and set it as required.
14. Click Save and Close.
15. Repeat the above steps for the Start step and the Sales User.
Define the price definition for products in Oracle Pricing Data Tables.
Define tier information, if any, for products in the Pricing Data Table.
You can re-use the existing Pricing profile, enhance condition to run pricing for products in BOM, or add a new Pricing
profile.
OIC Integration for End-to-End Flow (CPQOSSIntegrations_21D.par): Contains the integrations in OIC for the Create
Subscription, Amend Subscription, Renew Subscription, and Terminate Subscription workflows.
OIC Flow for OSS Renew Event: Contains the integration for creating a new Transaction in Oracle CPQ based on an
OSS Renew event.
OIC Usage Rating Flow: Provides the rating usage charges for OSS by invoking the Oracle CPQ Pricing API. Refer to
Appendix O: Calculate Price API.
Note: For information about the REST APIs used in these integrations, refer to the OIC Mapping Details section of this
installation guide.
To import the OIC package into OIC, perform the following steps:
Note: Record the integrations designated from the Import Packages and Integrations. Each integration provides a
connection icon that you can hover over to get connection name.
The OIC CPQ-OSS-Integration-21D Integration creates two connections required for Oracle CPQ and OSS.
The Renew Event Integration creates four connections in OIC. These connections are created with the integration import and
require set up of end point and security credentials, as follows:
OSC225_CONMGR (or any other name): Oracle CX Sales Connection. This creates a Renewal Opportunity in the CX Sales CRM
as part of Renewal Flow initiated by OSS.
To configure the Oracle CPQ and OSS connections in OIC, perform the following steps:
Tip: Oracle recommends that the Enable Tracing and Include Payload checkboxes are selected when activating an
integration. Doing so will capture valuable troubleshooting information that may be useful in troubleshooting a failed
activation.
12. Click Activate. A message displays at the top of the page after a successful activation.
Note: Record the integrations designated from the Import Integrations. Each integration provides a connection icon that
you can hover over to get connection name.
To configure the Oracle CPQ and OSS Usage Rating connections in OIC, perform the following steps:
5. Click OK.
6. Click Configure Security to specify the login credentials to access the application.
7. Provide the user credentials.
8. Click OK.
9. Click Test from the top right corner.
10. Click Save when the connection is complete.
Tip: Oracle recommends that the Enable Tracing and Include Payload checkboxes are selected when activating an
integration. Doing so will capture valuable troubleshooting information that may be useful in troubleshooting a failed
activation.
12. Click Activate. A message displays at the top of the page after a successful activation.
Note: Starting from Oracle CPQ 21D map quantity field of OSS to CPQ’s Usage Value (oRCL_pRC_usageValue) for
products of type Usage.
14. Click Register Third Party Applications for Subscription in the popup window. The Register Third Party
Applications for Subscription task is highlighted in the Task list.
15. Click on the link for Register Third Party Applications for Subscription. The Register Third Party Applications for
Subscription page displays.
For example:
https://<OSS_hostname>.integration.ocp.oraclecloud.com:443/ic/api/integration/v1/flows/
rest/SUBSCRIPTIONUSAGERATING19A/1.0/price
CPQ-PriceType OSS-PriceType
Recurring ORA_RECURRING
Usage ORA_RECURRING_USAGE
CPQ-OSS-PricePeriodicityDVM
CPQ-PricePeriodicity OSS-PricePeriodicity
CPQ-OSS-AdjustmentTypeDVM
CPQ-AdjustmentType OSS-AdjustmentType
SUBSCRIPTION
VARCHAR2(120
CHAR)
VARCHAR2(120
CHAR)
VARCHAR2(120
CHAR)
VARCHAR2(120
CHAR)
Price
Account Fields
The account information provided during subscription creation is used for subscription billing purposes. With the Subscription
Management solution, a sales user can obtain the account information for a customer by entering a customer company name
and clicking Customer Details. The fields listed below are populated and are mapped to the associated OSS fields. These field
mappings support the creation of a new subscription in OSS based on the information provided in the CPQ Oracle
Transaction. The fields should be added to the Customer Details tab of the Transaction layout.
Bill To Site Use ID: Associated with the BillToSiteNumber field in OSS.
Customer ID: Associated with the _customer_id attribute in CPQ for ABO use.
Note: The conversion rate multiplied by the BaseUOMCode provides the UserUOMCode, which is populated in the
Billing Frequency menu.
Subscription Type
To help identify charge line and product, set up “_part_custom_field9” as a Product Type configured as shown below. The
field is empty for model lines. For subscription product types, enter the value as "subscription".
Note: Use _part_custom_field9 to identify a product. Administrators must mark any subscription products as
'subscription' in _part_custom_field9. Subscription products will have value "subscription" for this field.
Subscription Id
Subscription Status
Subscription Profile Id
RenewDraftSubscriptionNumber
Submit Order
Note: The attributes and actions defined as Account Fields must be added to the Transaction Level – Customer Detail.
The following attributes need to be added to the Line Item Grid in the Layout:
fulfillment status
ActionCode
InstanceId
RootAssetKey
Change Reason
Change Code
Amend Replacement
Tier Type
Tiered
Periodicity
Quantity (requestedQuantity_l)
Contract Periods
Discount (customDiscountValue_l)
Net Price
Net Amount
Contract Discount
Amend Replacement
Tier Array
Block Size
Block Allowance
BOM Data datatable_ItemDef.zip The BOM data used for Data Tables.
datatable_ItemMap.zip
datatable_AttrMap.zip
datatable_AttrDef.zip
o Sirius XM Radio
o WiFi Service
Note: The packages shown in the above table are optional packages. Administrators must install the packages to make
the Vision Vehicles SUV demo product visible in Oracle CPQ.
1. Download the BOM Data Table packages (i.e. datatable_ItemDef.zip, datatable_ItemMap.zip, datatable_AttrMap.zip)
from My Oracle Support (Doc ID 2508999.1).
10. Click Menu and select Status Log to check the status of the uploaded files.
11. Check the log corresponding to the uploaded files for errors.
12. Double-click on each data table (Oracle_BomItemDef, Oracle_BomItemMap, and Oracle_BomAttrMap) from the
Navigation and click Schema tab.
1. Download the Parts package (i.e. Part1.zip) from My Oracle Support (Doc ID 2508999.1).
2. Open the Admin Home page.
3. Select Upload under Utilities. The Upload Files List page opens.
4. Click Browse.
5. Select the downloaded zip file.
6. Click Add.
7. Click Upload.
8. Click Refresh to check the status of the uploaded file.
9. Check the log corresponding to the uploaded file for errors.
1. Download the package (i.e. Demo_Product_Vision_Vehicles_1.zip) from My Oracle Support (Doc ID 2508999.1).
2. Open the Admin Home page.
3. Select Migration under Utilities.
4. Select Import Package from the Select A Mode drop-down. The Upload Package dialog opens.
5. Click Browse and navigate to the demo package.
6. Click Upload.
7. Click Migrate. When the migration completes, check the migration logs for errors.
8. Navigate to the Admin Home page.
9. Select Catalog Definition under Products. The Supported Products page opens.
10. Click List. The Supported Product Families page opens.
11. Click Add.
12. Select Vision Vehicles.
13. Click Save.
14. Open the Admin Home page.
15. Select Catalog Definition under Products. The Supported Products page opens.
16. Click List. The Supported Product Families page opens.
17. Click List next to Vision Vehicles. The Product Line Administration List page opens.
18. Select Models from the Navigation drop-down next to Consumer Vehicles.
19. Click List. The Model Administration List page opens.
20. Select BOM Mapping from the Navigation drop-down next to SUV.
21. Click List. The BOM Mapping: Rules List page opens.
22. Verify that the Default BOM Rule exists.
4. Click Deployment Center from the Home Page Setup page. The Deployment Center opens.
5. Click Deploy.
6. Click Refresh to verify the successful deployment of the Home page.
Note: Be sure to register the demo BOM in the ABO table (oracle_abopart2Model) with the following:
Partnumber: VEHICLE
ProductLine: consumerVehicles
Segment: visionVehicles
Model: sUV
Commerce Attributes
Commerce Actions
Library Functions
Validation Rules
Hiding Rules
Timer Configuration
Commerce Attributes
The installation of the Oracle CPQ Subscription Management package adds several attributes to the Commerce process and
modifies several existing attributes included with the Oracle CPQ Release 18B or later Ref App. For a complete list of the
Commerce attributes used by the Subscription Management solution, refer to Appendix F: Commerce Attributes.
Commerce Actions
The installation of the Oracle CPQ Subscription Management package adds or updates the following actions to the Commerce
process:
Submit Order
Customer Details
Transaction - Save
Note: The Oracle Quote to Order Commerce process is included with the Oracle CPQ Ref App. If customers have chosen
to overwrite the Oracle Quote to Order Commerce process with an alternate Commerce process, the Oracle CPQ package
adds the actions to the alternate process.
SUBMIT ORDER
The Submit Order action is associated with the Submit Order button on the Transaction page. The action is used to create a
subscription in OSS.
Administrators must create an Integration Cloud Service type integration that invokes OIC to initiate the Create Subscription
workflow.
An image of the Configuration for the Create Subscription integration is provided below:
Once the Create Subscription integration is created, the integration is added to the Submit Order action’s integration tab.
An image of the BML Configuration for the Update Asset Timer is provided below.
The BML associated with the Customer Details action is included for reference in Appendix H: Customer Details BML. The
BML is associated with the Define Advanced Modify - After Formulas function.
The Open Transaction Line action is used to display the details for a specific Transaction Line such as product, charge
information, and charge tiers.
The BML for the Open Transaction Line action is associated with the Define Advanced Modify - Before Formulas function. The
BML is included for reference in Appendix I: Open Transaction Line BML.
Save BML
The BML for the Save action is associated with the Define Advanced Modify – Before Formulas and Define Advanced Modify -
After Formulas functions. The BML is included for reference in Appendix J: Save BML.
An image of the BML Configuration for Define Advanced Modify – Before Formulas is provided below.
The Save action saves the current state of the Transaction Line.
Save BML
The BML for the Save action is associated with the Define Advanced Modify – Before Formulas and Define Advanced Modify -
After Formulas functions. The BML is included for reference in Appendix J: Save BML.
An image of the BML Configuration for Define Advanced Modify – After Formulas is provided below.
String PostDefaultOnLineItemSM
PostDefaultOnLineItemSM is used for querying and populating charges and discount fields during the creation of a
Transaction Line. PostDefaultOnLineItemSM is called from Advanced Default - After Formulas. The Return Type, input
information, and attributes used by this library function are shown below.
Validation Rules
Validation Rules are used to validate attribute or field values. They are linked to an action and only run when a specific action
is clicked by the user. When the Oracle CPQ Subscription Management package is installed, the Validation Rules in the below
table are added to the Commerce process.
Empty Billing Frequency Transaction Validates that the Billing Frequency field is not empty.
Hiding Rules
Hiding Rules tell Oracle CPQ to hide select attributes when a pre-defined condition is satisfied. They are made up of a
condition and an action. The values of the attributes selected as the condition attributes determine the result of the condition,
which when True trigger the hiding of the action attributes.
This section identifies the Hiding Rules included in the Oracle CPQ Subscription Management package. The Hiding Rules
apply to the Transaction Line level.
If one or more of the following conditions are satisfied, Amend Replacement is hidden:
Condition Summary
Condition Summary
Price Type Not Equals "" OR "Usage [Usage]"
Subscription Created: A new workflow step added to the Oracle CPQ Ref App by the Oracle CPQ Subscription
Management package. A Timer for creating an asset is configured within this step.
SubmitOrderToSubscriptionCreated: The action variable name of a new step transition displayed in the Approved
step used to transition the sales user to the Subscription Created step.
When using the Subscription Management solution, the Subscription Created workflow step triggers an Update Asset Timer
when the Max Request Date is the current date. The Timer creates an asset in the asset database one minute after the
Subscription Created step is reached.
The below image shows the Configuration of the Timer. For additional information, refer to Appendix G: Update Asset Timer
BML.
Timer Configuration
Account Integration is not required for customer setup where CPQ is integrated to a CRM system and account information is
imported on a transaction as part of the quote/transaction creation from the CRM.
Note: For more details about Account Integration with Oracle Customer Data Management (CDM), refer to CPQ-CDM
Integration Whitepaper on My Oracle Support under CPQ to Fusion Financials Integration (Doc ID 2012010.1).
Library Functions
The library functions within this section support the CDM integration by retrieving account details.
Queries the template location from the INT_SYSTEM_TEMPLATES Data Table based on the system and operation. This is a
Commerce library function.
The Return Type, input information, and attributes used by this library function are shown below.
This is a Commerce library function that queries the user name and password from the INT_SYSTEM_DETAILS Data Table and
adds it to the payload.
The Return Type, input information, and attributes used by this library function are shown below.
This is a Commerce library function that invokes Web Services and returns the response. The Return Type, input information,
and attributes used by this library function are shown below.
INT_SYSTEM_DETAILS
TCA-AccService <Enter the username here to call <Enter the web service endpoint to TCA customer Account
the web service endpoint> call the service related to TCA> details
Schema
As shown below, administrators must manually make System a primary key by selecting the Key check box.
Schema
As shown below, administrators must manually make System and Operation primary keys by selecting the associated Key
check boxes.
To add the template dependencies to File Manager, perform the following steps:
1. Download the payload template files (i.e. findOrganizationPayload.txt and customerAccountPayload.txt) from My
Oracle Support (Doc ID 2508999.1).
To enable the Accounts Lookup Library function for Integrations with CRMs, complete the following steps:
4. Click Apply.
Note: The Accounts Lookup Library Function drop-down is only available for sites that are integrated with a CRM. Refer
to the Oracle CPQ Administration Online Help for information about the Integration Center.
Administrators need to develop an Account Lookup BML script in order for the lookup feature to know what data to search. A
sample BML script is included within the Subscription Management Installation package. The following examples provide the
input and output BML format for the accounts lookup script.
{
"fields": ["firstName", "companyName", "customerId"],
"q": {
"$and": [{
"customerId": {
"$like": "account2%"
}
}, {
"id": {
"$gte": "21"
}
{
items: [{
"firstName": "Fname_OSC_account138",
"lastName": "Lname_OSC_account138",
"phone": "Phoneno_account138",
"companyName": "Company_account138",
"customerId": "account138",
"id": 4162404,
"fax": "Fax_account138",
"email": "first.last@yourcompany.com",
"_crm_custom_msm": "value1~value2~value3",
"_crm_custom_ssm": "value1",
"customerRep": "CR_account138"]
}, {
"firstName": "Fname_OSC_account139",
"lastName": "Lname_OSC_account139",
"phone": "Phoneno_account139",
"companyName": "Company_account139",
"customerId": "account139",
"id": 4162408,
"fax": "Fax_account139",
"email": "first.last@yourcompany.com",
"_crm_custom_msm": "value2~value3",
KEY VALUES
fields customerId, firstName, companyName
totalResults true
q {"$and";[{"customerId":{"$like":"account296"}},{"id":{"id:{"$gte
":"21"}},{"c…
Offset 0
Limit 10
Orderby firstName:DESC,companyName
Get Account
Get Accounts
You may need custom account attributes. By default, all customer account deployed custom account attribute types are
available in the account object except for the following:
All custom account attributes are given the accounts object prefix _crm_custom. In the case of native accounts, where CPQ
is the source master, Single Select Menu and Multi-select Menu attributes are not searchable and custom attribute filters are
required.
Get Account
https://site.oracle.com/rest/v13/accounts/100
{
"firstName": "Jones Pizza",
"phone": "2135555555",
"companyName": "Jones Pizza",
"customerId": "100",
"email": "ljones@jonespizza.net",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts/100"
}
]
}
Get Accounts
https://sitename.oracle.com/rest/v13/accounts
{{
"hasMore": false,
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts"
}
],
"items": [{
"firstName": "Jones Pizza",
"phone": "2135555555",
"companyName": " Jones Pizza",
"customerId": "100",
"email": "ljones@jonespizza.net",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts/100"
}
]
}, {
"firstName": "Smith Trucking",
"phone": "8475555555",
"companyName": "Smith Trucking Incorporated",
"customerId": "102",
"email": "jsmith@smithtruck.com",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts/102"
}
]
}, {
"firstName": "Jackson Rentals",
"phone": "1235555555",
"companyName": "Jackson Rentals",
"customerId": "103",
"email": "mwjackson@jacksonrental.com",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts/103"
}
]
}, {
"firstName": "Morris Foods",
"phone": "3215555555",
"companyName": "Morris Foods",
"customerId": "104",
"email": "jmorris@morrisfoods.net",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v13/accounts/104"
}]}]}
CPQ Account Attribute to OSC Account Attribute Mapping - This is captured in a data table named
'Account_attribute'.
Understand the Search Request – To understanding the search that was requested by the user (i.e., browser, API
client) review a set of BMLs.
Transform the User Requested Search to the External Search Syntax to Query the External System - CPQ Search
Operator to OSC Search Operator mapping is in a data table named 'Account_Operator'.
Convert the OSC Accounts Response using an XSL File - This is stored in the file manager under TCA folder
findOrganizationResultTransformation.XSL.
For additional information, refer to Oracle CPQ to Oracle CX Sales Integration Guide, Doc ID 2015009.1 on My Oracle Support.
_crm_custom_mainContactAddress
No No external_attribute Attribute name of account String This can be the attribute name of the top-level
object in external system (root) entity for simple mapping, or can be an
(integrated partner) attribute of the child entity (first level).
For example:
PartyUsageAssignment.AssignmentC
ode where PartyUsageAssignement is
the child entity and AssignmentCode is the
attribute of the child entity.
Note: If there are two or more records for the
child, they are delimited by a tilda.
You must ensure that there is only one record
in case the cpq_attribute is mapped to is a
not a Multi Select Menu.
No No queryable Flag to indicate whether String Values can be Y for Yes and N for No.
the attribute is queryable Note: If the external_attribute is
(search or sortable)
referring to the child-entity's attribute name,
then queryable must be N because you
cannot search and sort on the child entity
No No textual Flag to indicate whether String Values can be Y for Yes and N for No.
the attribute is a type For OSC Accounts, the PartyID is numeric,
string
hence the value is set as N.
Notes:
Only simple search syntax is supported for Accounts data. As such, only one level of query parameters are
supported. Nested query parameters are not supported.
Search on Multi Select, Single Select menu attributes is not supported. Therefore, the query column in the Data
Table must be set to No.
The maximum number of items that can be searched in one time is 500. If more than 500 items are requested for
searching, you will not receive an error message but the results will only be returned for the first 500 items.
The hasMore property is not strictly honored in the Response payload. For example, a response of True is always
returned if the number of rows is the same as the limit specified in the search.
To view the Subscription Workbench, a user-defined link must be set up. If the user-defined link is not set up, the Subscription
Workbench is only viewable from the Transaction.
3. Click List Links for Commerce. The Navigation Items List – Commerce page displays.
4. Select the User Defined tab.
11. Click Customize Menus within the User Defined tab. The Customize Links for Commerce page displays.
12. Select Subscription Workbench from the Hidden Links list and then click Add. The Subscription Workbench link is
moved to under the Top Navigation Tab.
14. Click Update to get back to Navigation Items List – Commerce page.
15. Click Back to get to the Navigation Menus page.
16. Click Deploy to deploy the Subscription Workbench to the User-Defined Navigation Menu UI.
1. Log in to CPQ, click Subscription Workbench. The Subscription Workbench page displays
Subscription Workbench
3. Click Next. The Subscription Workbench showing the list of assets/subscriptions for that account displays.
7. Click Update.
Charges
The following three charges are supported by the Subscription Management solution:
Notes:
Pricing for One Time charges and Recurring changes is calculated as unit price x quantity.
User BOM rules to model the charge structure for products in the Subscription Management solution.
For the Subscription Management solution to work, product items must be added as parts under the Model.
Two kinds of pricing are supported for Recurring Usage Fee charges: Non Tier Pricing and Tier Pricing.
Discounts
Sales users can apply auto discounts and can override discounts on One Time, Recurring, and Usage Fee charges.
Discounts are queried from the data table and populated in Transaction Line.
ORCL_PRC_BASE_CHGS
This data table stores the charge-related information. The price definition of each products needs to be added to this table.
Periodicity: Periodicity determines the frequency at which billing invoice is available for each product.
TierType: If the Recurring Usage Charge is designated as Tiered, it can be set as ORA_ALL_TIERS or
ORA_HIGHEST_TIER. By default ORA_ALL_TIERS is supported for the pricing profile. The default can be modified to
ORA_HIGHEST_TIER pricing profile.
ORCL_PRC_BASE_TIERS
This data table stores the tier information for the parts which have tiered price set in the price definition. Tier information is
only used when Recurring Usage Charge is set as Tiered in the pricing profile.
ORCL_PRC_DISCOUNTS
This data table stores the discount data for each part. Discounts that are defined as part of the price definition are added to
this data table.
Discount_Type: Type of the adjustment. Supported values are: Percent Off, Amount Off, and Price Override
Start_Date: Discount is applicable to product if contract start date is same or after date mentioned in this column
End_Date: Discount is applicable to product if contract start date is same or before date mentioned in this column
Note: This table can be used if lookups for any other type has to be introduced. For demo setup this table is configured
with periodicity and charge type.
Below simple condition is used to filter out parts for pricing engine:
Prices of all the parts, whose value for “Product Type” field is set to “subscription”, will be decided by pricing engine.
Profile BML: Profile Action is associated to Advanced BML. This BML is associated to the profile action and contains the logic
for price calculation. Administrators can customize the BML logic to change the pricing logic.
Profile BML invokes the oRCL_pRC_oraclePricingSubscriptionBaseProfile utility BML. This returns JSON calculation
information that provides all the charge information.
oRCL_pRC_oraclePricingSubscriptionBaseProfile BML
This utility is associated to the pricing profile and internally calls the following utility BMLs:
Get Lookups: Provides OSS lookups for periodicity and charge types.
There are two utility BMLs which populate calculated pricing information for arrays. These BMLs are invoked from the
Transaction Line Advanced Default - After Formulas.
Notes:
When the Subscription Management package is installed, a Subscription Status field and a Subscription Id field are
added. Administrators can add these fields to the layout.
OSS requires the generation of a billing schedule as part of subscription creation. If billing or charge-related fields
are missing or incorrect in the Create subscription payload, the billing schedule is typically not generated.
Administrators can resolve this discrepancy by attempting to activate the subscription in OSS.
4. Click Submit Order. Once the subscription is created, the Subscription Id is updated.
a. If subscription activation is successful, the Subscription Status field updates to "Success".
b. If the billing schedule is not generated, a new Subscription id is created, but the Subscription Status field updates
to "Failure".
Notes:
The Update Asset Timer is configured in the Subscription Created step and monitors the Max Request Date field.
The Max Request Date field, which is part of the Subscription Management Installation Package, defaults to the
Default Request Date during the creation of a Transaction.
The Update Asset Timer create assets only when the Contract Start Date is less than or equal to the Max Request
Date. After the Update Asset Timer is executed, the Max Request Date field is updated to the next Contract Start
Date. The Update Asset Timer will then execute on this date. CPQ Commerce Timer functionality is leveraged to
activate the asset as specified on the request date. For details about Timer functionality, refer to the Oracle CPQ
Administration Online Help.
Customer Assets
10. Select the date the amended subscription is to take effect from the Default Request Date field.
11. Select a Change Reason. Select the appropriate Change Reason based on your business need from the following:
Non-Compliant, Breach, Quantity Change, Downgrade, Term Change, and Upgrade.
If the Change Reason is Upgrade or Downgrade, the Amend Replacement field must be the instance Id of the deleted
product.
Note: The amendment process requires CPQ to send fields like Change Reason, Change Code, Amendment
Replacement, Instance ID, etc. to OSS. Administrators can write Commerce rules to set the values for these fields as part
of the amendment flow call to OSS.
12. Select a Change Code. Select the appropriate Change Code based on your business need from one of the following
options: Full, Prorate without Credit, and Prorate with Credit.
13. Use the UpdateOldSubscription menu to determine whether to apply the subscription amendments to a new
subscription or to the existing subscription. In the following example, the amendments to the subscriptions are
applied to a new subscription.
When the UpdateOldSubscription menu is set to False, the amended product lines are added to a new
subscription in OSS.
When the UpdateOldSubscription menu is set to True, the amended product lines are added the existing
subscription in OSS.
Notes:
Administrators can also automate the process by setting the "Update" flag through the BOM configuration
approach.
The Populate OSS Charge action allows users to call OSS to get the update the charges for the pre-existing
subscription lines from the original subscription contract that are getting amended in the current Transaction.
Note: If administrators define email notifications for renewals, the subscription owner receives an email notification
informing of the subscription renewal.
To renew an active subscription directly from Oracle CPQ, perform the following steps:
1. In Oracle CPQ, create a new Transaction with the customer information updated.
2. Navigate to the Customer Assets page.
3. Select the asset that corresponds to the subscription to renew.
1. In Oracle CPQ, create a new Transaction with the customer information updated.
2. Navigate to the Customer Assets page.
3. Select the asset that corresponds to the subscription to terminate.
Transaction SubscriptionEndDate subscriptionEndDate_t Date This field is added to capture the subscription End date.
The subscription Start date is mapped to the Subscription
Ordering defaultRequestDate field.
Transaction maxRequestDate maxRequestDate_t Text A Timer is configured based on this field, which initially
copies the content of defaultRequestDate field and is
updated based on the Contract.
Transaction Status status_t Menu This is an existing menu used to store the state of a
Transaction. A new menu item, Subscription Created
(SUBSCIPTION_CRATED) is added.
Transaction Transaction Number transactionID_t Text This is an existing field that is mapped to an OSS
subscription number. The subscription number must be
unique. The transaction number is appended with
transaction Id.
Transaction SubscriptionId subscriptionId_t Text This field is added for debugging purposes. When
subscriptions are successfully created, the field is updated
with the new subscription ID.
Transaction RenewDraftSubscriptionNumb renewDraftSubscriptionNumber_t Text This field is added for the Renew flow. In the last step of
er the Renew flow, the temporary subscription created by
the OSS Renew event is deleted. The subscription number
of the temporary subscription is stored in this variable, so
the REST API call from OIC can delete the temporary
subscription.
Transaction SubscriptionProfileId subscriptionProfileId_t Holds the OSS subscription Profile Id used when a
subscription is created by CPQ Cloud. The value is
obtained from OSS.
Transaction BuId businessUnitId_t Text Fusion applications identify each customer using a BuId.
The value is obtained from OSS.
Transaction OSS Price Info ossPriceInfo_t Text Holds the pricing charges coming from OSS for all the
subscription items.
Transaction- Billing Frequency oRCL_billingFrequency_t Menu Determines the billing frequency for a subscription. The
>Customer billing frequency option can be obtained using the
Detail following REST API call: https://fuscdrmsmc225-fa-
ext.us.oracle.com/crmRestApi/resources/late
st/timeCodeUnits. Conversion rate multiplied by
BaseUOMCode provides UserUOMCode.
Transaction- Customer Company Name CustomerCompanyName_t Text When the Customer Company Name field is populated,
>Customer Customer Details, partyId, accountId, and BillToSiteUseId
Detail are populated for the entered company.
Transaction- Account Number accountNumber_t Text When the Customer Detail button on the Customer Detail
>Customer tab is clicked, the customer account number is retrieved
Detail based on the entered customer company name.
Transaction- Bill To Site Use Id billToSiteUseId_t Text When the Customer Detail button on the Customer Detail
>Customer tab is clicked, the Bill To Site Use Id is retrieved based on
Detail the entered customer company name.
Transaction Party Id partyId_t Text The CDM integration provides the value for this field
Line Attribute based on the Customer Company Name
Transaction Contract Start Date contractStartdate_l Date This is an existing Line Item Grid attribute in the Ref App,
Line Attribute modified to have a default current date.
Transaction Quantity requestedQuantity_l Integer This is an existing field modified to make the field read-
Line Attribute only for parts and marking lines (Product and Charge) as
mandatory in the BOM definition
Transaction Change Reason changeReason_l Menu A single select menu to handle all the possible reasons for
Line Attribute closing a subscription. Possible values (variable names in
parentheses):
Breach (ORA_BREACH)
Non Compliant (ORA_NON_COMPLIANCE)
Quantity Change (ORA_CHANGE_QUANTITY)
Downgrade (ORA_DOWNGRADE)
Term Change (ORA_TERM_CHANGE)
Upgrade (ORA_UPGRADE)
Transaction Change Code changeCode_l Menu A single select menu to handle all the possible codes to
Line Attribute close a subscription. Possible values (variable names in
parentheses):
Full (ORA_FULL)
Prorate Without Credit
(ORA_PRORATE_WITHOUT_CREDIT)
Prorate With Credit (ORA_PRORATE_WITH_CREDIT)
Transaction Amend Replacement amendReplacement_l Text This field is used to capture the instance Id for the
Line Attribute product getting replaced. This value is used for
constructing a relationship in OIC.
Transaction Tier Sequence oRCL_pRC_tierInfo.oRCL_pRC_tierSeque Integer Used to capture the sequence of the tier with up to a
Line Attribute nce maximum of three tiers. When the tier is single, this holds
the single tier.
Transaction Tier List Price oRCL_pRC_tierInfo.oRCL_pRC_tierListPri Currency The list price for the tier.
Line Attribute ce
Transaction Tier Price Format oRCL_pRC_tierInfo.oRCL_pRC_tierPriceF Menu The menu for selecting the price format for the tier. Value
Line Attribute ormat sets include:
Per Unit(ORA_PER_UNIT)
Per Block(ORA_PER_BLOCK)
Transaction Tier Block Size 1 oRCL_pRC_tierInfo.oRCL_pRC_tierBlockS Integer The block size for tier 1.
Line Attribute ize
Transaction Amended Replacement amendReplacementProduct HTML Displays the list of products that are getting replaced as
Line Attribute Product part of an upgrade or downgrade.
Transaction Contract End Date contractEndDate_l Date The date the customer stops receiving the service.
Line Attribute
Transaction Discount Effectivity Type discountEffectivityType_l Menu This field holds information about when to apply the
Line Attribute adjustment.
Transaction Usage Value usageValue_l Float This attribute acts as a quantity for parts of type Usage.
Line Attribute
Transaction Usage Value UoM usageValueUOM_l Text Unit of measure for Usage Value.
Line Attribute
continue;
} contractStartDatFmt=strtojavadate(line.contractStartDate_l,"MM/dd/yyyy");
if (comparedates(contractStartDatFmt,currentDateFmt)==1) { continue;
} lineJson = json();
jsonput(lineJson, DOCUMENT_NUMBER, line._document_number);
//for transaction date we will use db format within abo script, // also for empty date
we treat as today as of processing time transactionDate = line.requestDate_l;
if(transactionDate == "" OR isnull(transactionDate)){ transactionDate =
datetostr(getDate(false), "yyyy-MM-dd HH:mm:ss");
}else{ tranDate = strtojavadate(transactionDate, "MM/dd/yyyy HH:mm:ss");
transactionDate = datetostr(tranDate, "yyyy-MM-dd HH:mm:ss");
//also prepare the return string to update root lines when the updateAsset is successful
if (successString<> ""){ successString = successString + "|";
} successString = successString + line._document_number +
"~fulfillmentStatus_l~"+FULFILLED; }
//now inovke utility to load line detail,transfer to bom, and aggregate open order, and
generate delta action and invoke asset syc
//if updateAsset fail, expect the abo_updateAsset to throwerror from inside response =
util._ORCL_ABO.abo_updateAsset(txn_json, lineJsonArray); if (successString<> ""){
successString = successString + "|";
}
return successString;
//MainDoc UpdateAsset Action Script
//
//Purpose: Helper to create asset for all or selected lines in the transaction or specified
external lines
//System Variables : _system_buyside_id
//Main doc fields: _transaction_customer_id(_transaction prefix is from maindco varname) //
(process specific): currency_t, paymentTerms_t
//Line fields:_document_number, requestDate_l, itemInstanceId_l, //oRCL_ABO_ActionCode_l,
_line_bom_parent_id, fulfillmentStatus_l
//also prepare the return string to update root lines when the updateAsset is successful
if (successString<> ""){ successString = successString + "|";
} successString = successString + line._document_number +
"~fulfillmentStatus_l~"+FULFILLED; }
//now inovke utility to load line detail,transfer to bom, and aggregate open order, and
generate delta action and invoke asset sync
//if updateAsset fail, expect the abo_updateAsset to throwerror from inside response =
util._ORCL_ABO.abo_updateAsset(txn_json, lineJsonArray); if (successString<> ""){
successString = successString + "|";
}
return successString;
} xpathCustomerAccountSiteUse = string[1];
// get the XML Element called Customer AccountSiteUse where primary is true and use is BILL
TO xpathCustomerAccountSiteUse[0] =
"//ns2:Value/ns2:CustomerAccountSite/ns2:CustomerAccountSiteUse[ns2:SiteUseCode='BILL_TO'
and ns2:PrimaryFlag='true']";
outputCustomerAccountSiteUse = readxmlsingle(customerAccountsoapResponse,
xpathCustomerAccountSiteUse); returnSiteId =""; if
(containsKey(outputCustomerAccountSiteUse,xpathCustomerAccountSiteUse[0])) {
CustomerAccountSiteUseXmlFragment =
get(outputCustomerAccountSiteUse,xpathCustomerAccountSiteUse[0]); xpath1 = string[1];
xpath1[0] = "//ns2:CustomerAccountSiteId"; output1 =
outputCustomerAccountSite = readxmlsingle(customerAccountsoapResponse,
xpathCustomerAccountSite);
if (containsKey(outputCustomerAccountSite,xpathCustomerAccountSite[0]))
{
CustomerAccountSiteXmlFragment =
get(outputCustomerAccountSite,xpathCustomerAccountSite[0]);
xpath2 = string[1]; xpath2[0] = "//ns2:PartySiteId"; output2 =
readxmlsingle(CustomerAccountSiteXmlFragment,xpath2); if
(containsKey(output2,xpath2[0]))
{ partySiteId = get(output2,xpath2[0]);
} if (partySiteId == "") { partySiteId = errorString;
}
} partySiteNumber = ""; xpathPartySiteNumber = string[1];
// get the XML Element called Customer AccountSite where ID = returnSiteId
xpathPartySiteNumber[0] = "//ns2:Value/ns2:PartySite[ns1:PartySiteId=" + partySiteId + "]";
outputPartySiteNumber = readxmlsingle(organizationSoapResponse, xpathPartySiteNumber);
if (containsKey(outputPartySiteNumber,xpathPartySiteNumber[0])) {
PartySiteNumberXmlFragment = get(outputPartySiteNumber,xpathPartySiteNumber[0]);
xpath3 = string[1]; xpath3[0] = "//ns1:PartySiteNumber"; output3 =
readxmlsingle(PartySiteNumberXmlFragment,xpath3); if (containsKey(output3,xpath3[0]))
{ partySiteNumber = get(output3,xpath3[0]);
}
} return
"1~partyId_t~"+returnPartyId+"|"+"1~accountNumber_t~"+returnAccountNumber+"|"+"1~billToSite
UseId_t~"
+returnBillToSiteUseId +"|"+"1~customerID_t~"+returnPartyId
+"|"+"1~_customer_id~"+returnPartyId+"|";
outputCustomerAccountSite = readxmlsingle(customerAccountsoapResponse,
xpathCustomerAccountSite);
if (containsKey(outputCustomerAccountSite,xpathCustomerAccountSite[0]))
{
CustomerAccountSiteXmlFragment =
get(outputCustomerAccountSite,xpathCustomerAccountSite[0]);
xpath2 = string[1]; xpath2[0] = "//ns2:PartySiteId"; output2 =
readxmlsingle(CustomerAccountSiteXmlFragment,xpath2); if
(containsKey(output2,xpath2[0]))
{ partySiteId = get(output2,xpath2[0]);
} if (partySiteId == "") { partySiteId = errorString;
}
} partySiteNumber = ""; xpathPartySiteNumber = string[1];
// get the XML Element called Customer AccountSite where ID = returnSiteId
xpathPartySiteNumber[0] = "//ns2:Value/ns2:PartySite[ns1:PartySiteId=" + partySiteId + "]";
outputPartySiteNumber = readxmlsingle(organizationSoapResponse, xpathPartySiteNumber);
if (containsKey(outputPartySiteNumber,xpathPartySiteNumber[0])) {
PartySiteNumberXmlFragment = get(outputPartySiteNumber,xpathPartySiteNumber[0]);
xpath3 = string[1]; xpath3[0] = "//ns1:PartySiteNumber"; output3 =
readxmlsingle(PartySiteNumberXmlFragment,xpath3); if (containsKey(output3,xpath3[0]))
{ partySiteNumber = get(output3,xpath3[0]);
}
return
"1~partyId_t~"+returnPartyId+"|"+"1~accountNumber_t~"+returnAccountNumber+"|"+"1~billToSite
UseId_t~" +returnBillToSiteUseId +"|" ;
returnVal = "";
lineHierInfo = commerce.oRCL_abo_BuildLineItemHierarchy();
returnVal = returnVal + commerce.oRCL_abo_PostDefaultsOnLineItems(lineHierInfo);
returnVal = returnVal+ commerce.oRCL_sm_postDefaultOnLineItem(lineHierInfo);
return returnVal;
The BML for the Save action is used to save the current state of a Transaction.
contractPeriodsStr = stringbuilder();
for line in transactionLine {
sbappend(contractPeriodsStr, line._document_number, "~contractedPeriods_l~",
string(commerce.oRCL_sm_calculateContractPeriods(line.contractStartDate_l,
line.contractEndDate_l, line.priceType_l, line.pricePeriod_l)), "|");
}
return sbtostring(contractPeriodsStr);
return commerce.calculateRollupRevenues();
The BML for the Save action is used to save the current state of a Transaction Line.
returnString = "";
for line in transactionLine {
if(line._document_number == _system_current_document_number){
if(line.oRCL_pRC_tierd_l == "N" AND line._price_calculation_info <> "") {
calcInfo = jsonarrayget(jsonarray(line._price_calculation_info),0,"json");
charges = jsonget(calcInfo,"charges", "jsonArray");
returnString = returnString + util._SM.oRCL_pRC_populateCharges(charges,
line._document_number);
}
}
}
return returnString;
findOrganizationPayload.txt
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body
xmlns:ns1="http://xmlns.oracle.com/apps/cdm/foundation/parties/organizationService/applicat
ionModule/types/">
<ns1:findOrganization>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:attribute>PartyName</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>{{customerCompanyName_t}}</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
</ns1:findCriteria>
<ns1:findControl xmlns:ns3="http://xmlns.oracle.com/adf/svc/types/">
<ns3:retrieveAllTranslations></ns3:retrieveAllTranslations>
</ns1:findControl>
</ns1:findOrganization>
</soap:Body>
</soap:Envelope>
customerAccountPayload.txt
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/appli
cationModule/types/" xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<soapenv:Body>
<ns1:findCustomerAccount>
<ns1:findCriteria>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:attribute>PartyId</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>{{returnPartyId}}</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
</ns1:findCriteria>
<ns1:findControl>
<ns2:retrieveAllTranslations>false</ns2:retrieveAllTranslations>
</ns1:findControl>
</ns1:findCustomerAccount>
</soapenv:Body>
</soapenv:Envelope>
The code for this library function is provided below for reference.
temp=split(templateUrl,"image");
return temp[1];
The code for this library function is provided below for reference.
//Name: getUserAttributes
//Variable Name: getUserAttributes
//Description: Queries UserName,Password from DataTable INT_SYSTEM_DETAILS and adds it in
the payload.
//Input: Main Doc Attr: orderId
//System Attr: _system_user_first_name
//Return Type: String Dictionary
//Dependency : getPassword
//bmql query
resultSet = bmql("Select Username from INT_SYSTEM_DETAILS where System = $system");
payload = dict("string");
//loop through the records
for record in resultSet {
userName = get(record,"Username");
password = "Welcome1";
put(payload, "USERNAME", userName);
put(payload, "PASSWORD", password);
The code for this library function is provided below for reference.
The code for this library function is provided below for reference.
discStDtEndDtFormat = "yyyy-MM-dd";
contractStartDate = strtodate(contractStartDateStr, "yyyy-MM-dd");
returnStrBuilder = stringbuilder("");
adjustmentList = bmql("select Start_Date, End_Date, Discount_Name, Discount_Value,
Discount_Type, Discount_Reason, Discount_Type, Discount_Effectivity, Effectivity_Periods
from ORCL_PRC_DISCOUNTS where Product=$partNumber ORDER BY Start_Date, End_Date");
for adjustment in adjustmentList {
discFound = false;
discStDtStr = get(adjustment,"Start_Date");
discEndDtStr = get(adjustment,"End_Date");
if(discFound) {
sbappend(returnStrBuilder, "|", lineDocNumber,
"~customDiscountType_l~",get(adjustment,"Discount_Type"));
sbappend(returnStrBuilder, "|", lineDocNumber,
"~customDiscountValue_l~",get(adjustment,"Discount_Value"));
sbappend(returnStrBuilder, "|", lineDocNumber,
"~discountEffectivityType_l~",get(adjustment,"Discount_Effectivity"));
break;
}
}
return sbtostring(returnStrBuilder);
The code for this library function is provided below for reference.
jsonput(tierJson,"SequenceNumber",jsonget(oneTier,"SequenceNumber","integer") );
jsonarrayappend(tiers,tierJson);
} jsonput(chargeJson,"tierList", tiers);
} jsonarrayappend(ossArray,chargeJson);
} charge = json(); jsonput(charge,"charges",ossArray);
ossChargeArray = jsonarray(); jsonarrayappend(ossChargeArray,charge);
ossStr = jsonarraytostr(ossChargeArray); if(len(ret)>0){
ret = ret+"|";
} ret = ret + line._document_number+"~oSSCharge~"+ossStr;
}
}
} return ret;
This is a Commerce library function that calculates number of periods for given contract start date and end date based on
price type and periodicity. The code for this library function is provided below for reference.
Get Lookups
The BML for the Calculate List Price action is used to calculate the list price for a product.
listPrice = 0;
if(quantity > allowance){
finalQuantity = quantity - allowance;
}else{
finalQuantity = 0;
}
The BML for the Prepare Tier Info JSON action is used to prepare tier pricing information for a product.
tierInfoJson = json();
return tierInfoJson;
The BML for the Populate Charges action is used to populate the charge information for a charge array. This BML is invoked
from Transaction Line Advanced Default – After Formulas.
returnString = "";
chargesSize = jsonarraysize(charges);
itr = string[chargesSize];
chargecount=0;
for i in itr {
charge = jsonArrayget(charges, chargecount, "json");
chargecount = chargecount + 1;
chargeType = jsonget(charge,"chargeType","string");
periodicity = jsonget(charge,"periodicity","string");
// Get CPQ codes for charge type and periodicity.
lookups = util.oRCL_pRC_getLookups(periodicity, chargeType, false);
if(isnull(periodicity) == false ){
returnString = returnString + "|" + documentNumber + "~pricePeriod_l~" + get(lookups,
"Periodicity");
}
if(jsonpathcheck(charge,"$.Allowance")){
returnString = returnString + "|" + documentNumber + "~oRCL_pRC_blockAllowance~" +
string(jsonget(charge,"Allowance","integer"));
}
if(jsonpathcheck(charge,"$.BlockSize")){
returnString = returnString + "|" + documentNumber + "~oRCL_pRC_blockSize~" +
string(jsonget(charge,"BlockSize","integer"));
}
tiered = "N";
if(NOT(isnull(jsonget(charge ,"tiered")))){
tiered = jsonget(charge ,"tiered", "string");
}
returnString = returnString + "|" + documentNumber + "~oRCL_pRC_tierd_l~" + tiered + "|";
if(tiered == "Y") {
//jsonput(chargeJson,"oRCL_pRC_tiertype_l",jsonget(charge,"tierType"));
returnString = returnString + "|" + documentNumber + "~oRCL_pRC_tiertype_l~" +
jsonget(charge,"tierType","string") + "|";
tierList = jsonget(charge, "tierList", "jsonArray");
if(isnull(tierList) == false){
returnString = returnString + "|" + util.oRCL_pRC_populateTiers(tierList,
documentNumber);
}
}
}
return returnString;
The BML for the Populate Tiers action is used to populate tier information for a tier array. This BML is invoked from
Transaction Line Advanced Default – After Formulas.
The BML for Oracle Pricing Subscription Base Profile action is used to calculate the price based on the pricing model.
// This utility BML will calculate the price based on pricing model(Single or Tiered).
// Name: Oracle Pricing Subscription Base Profile
// Variable Name: oRCL_pRC_oraclePricingSubscriptionBaseProfile
// Input:
// partNumber(String) - This is used to look up rows from the ORCL_PRC_BASE_CHGS table
// quantity(Integer) - Used for calculating the price.
// chargeName(String)
// lockedAllowance(Integer)
// lockedBlockSize(Integer)
// lockedListPrice(Float)
// tierFrom(Integer[])
// tierTo (Integer[])
// tierListPrice(Float[])
// tierBlockSize(Integer[])
// lockUsage(Boolean)
// Output:
// JSON - Includes UnitPrice and other JSON elements for Subscription Service.
// Dependency : Calculate List Price, Prepare Tier Info Json
//
// Note : Input parameter chargeName is no more used in calculation but keeping here so
that OSS doesn't have to modify their // payload.
lang = dict("string");
fields = dict("string");
where = "";
tierList = jsonarray();
// Reading the each charge details
tiered = get(charge, "Tiered");
chargeId = getint(charge, "Charge_Id");
chargeType = get(charge, "Charge_Type");
quantityForCalc = 0.0;
if(chargeType == "Usage") {
quantityForCalc = usageValue;
} else {
quantityForCalc = quantity;
}
}else{
if(tierType == "ORA_ALL_TIERS"){
prevMax = 0;
tierSeq = 1;
// Checking charge is of type lockable, if yes and locked then calculating the
price based on locked values
if(chargeType == "Usage" AND lockUsage) {
tierSize= sizeofarray(tierFrom);
tierLoopArr = range(tierSize);
for tierNum in tierLoopArr{
tierMin = tierFrom[tierNum];
tierMax = tierTo[tierNum];
listPrice = listPrice +
util.oRCL_pRC_calculateListPrice(iterationquantityForCalc, allowance, blockSize,
tierPrice);
prevMax = tierMax; // Set the previous max for the if statement above on
the next loop.
tierSeq = tierSeq + 1; // Increment the tier sequence number for the next
iteration of the loop.
if(tierMax <= 0){ // stop processing tiers if <= 0 since that is used as a
max identifier
break;
}
}
}else{
// If tiered pricing then querying ORCL_PRC_BASE_TIERS data table to get the
tier info.
tiers = bmql("select Tier_Min, Tier_Max, Block_Size, Price from
ORCL_PRC_BASE_TIERS where Charge_Id = $chargeId ORDER BY Tier_Min ASC");
listPrice = listPrice +
util.oRCL_pRC_calculateListPrice(iterationquantityForCalc , allowance, blockSize ,
tierPrice);
prevMax = tierMax; // Set the previous max for the if statement above on
the next loop.
tierSeq = tierSeq + 1; // Increment the tier sequence number for the next
iteration of the loop.
if(tierMax <= 0){ // stop processing tiers if <= 0 since that is used as a
max identifier
break;
}
}
}
}
if(tierType == "ORA_HIGHEST_TIER"){
tierSeq = 1;
// Checking charge is of type lockable, if yes and locked then calculating the
price based on locked values
if(chargeType == "Usage" AND lockUsage) {
tierSize= sizeofarray(tierFrom);
tierLoopArr = range(tierSize);
for tierNum in tierLoopArr{
tierMin = tierFrom[tierNum];
tierMax = tierTo[tierNum];
blockSize = tierBlockSize[tierNum];
tierPrice = tierListPrice[tierNum];
tierSeq = tierSeq + 1; // Increment the tier sequence number for the next
iteration of the loop.
calculationInfoPayload = json();
This BML is used to find out matching OSS or CPQ code for periodicity and charge type.
lookupDict = dict("string");
if(cpqCode) {
ossLookups = bmql("select Type, OSS_Code from ORCL_PRC_LOOKUP where CPQ_Code =
$chargeTypeCode or CPQ_Code = $periodicityCode");
for ossLookup in ossLookups {
lookupType = get(ossLookup, "Type");
if(lookupType == "Periodicity") {
put(lookupDict, "Periodicity", get(ossLookup, "OSS_Code"));
} elif (lookupType == "ChargeType") {
put(lookupDict, "ChargeType", get(ossLookup, "OSS_Code"));
}
}
} else {
cpqLookups = bmql("select Type, CPQ_Code from ORCL_PRC_LOOKUP where OSS_Code =
$chargeTypeCode or OSS_Code = $periodicityCode");
for cpqLookup in cpqLookups {
lookupType = get(cpqLookup, "Type");
if(lookupType == "Periodicity") {
put(lookupDict, "Periodicity", get(cpqLookup, "CPQ_Code"));
} elif (lookupType == "ChargeType") {
put(lookupDict, "ChargeType", get(cpqLookup, "CPQ_Code"));
}
}
}
return lookupDict;
Commerce Attributes
Make below changes to Transaction Line attributes:
discStDtEndDtFormat = "yyyy-MM-dd";
contractStartDate = strtodate(contractStartDateStr, contractStartDateFormat);
returnStrBuilder = stringbuilder("");
adjustmentList = bmql("select Start_Date, End_Date, Discount_Name, Discount_Value,
Discount_Type, Discount_Reason, Discount_Type, Discount_Effectivity, Effectivity_Periods
from ORCL_PRC_DISCOUNTS where Product=$partNumber ORDER BY Start_Date, End_Date");
for adjustment in adjustmentList {
discFound = false;
discStDtStr = get(adjustment,"Start_Date");
discEndDtStr = get(adjustment,"End_Date");
if(discFound) {
if(validDiscEntry) {
sbappend(returnStrBuilder, "|", lineDocNumber,
"~customDiscountType_l~",get(adjustment,"Discount_Type"));
sbappend(returnStrBuilder, "|", lineDocNumber,
"~customDiscountValue_l~",get(adjustment,"Discount_Value"));
sbappend(returnStrBuilder, "|", lineDocNumber,
"~discountEffectivityType_l~",discEffectivityType);
}
break;
}
}
return sbtostring(returnStrBuilder);
returnStrBuilder = stringbuilder("");
totalContractDiscVal = 0.0;
totalContractListVal = 0.0;
totalContractValue = 0.0;
o Call this function from the Save action Advanced Modify – Before Formulas > Define Advanced Modify –
Before Formulas.
url: https://<hostname>.com/rest/v13/pricing/actions/calculatePrice
customerId string
Customer ID of the customer (account).
headerAttributeValues object
Values of pricing attributes at the header level.
oRCL_pRC_allowance integer
Allowance
oRCL_pRC_tierBlockSize array
Array of integer providing block sizes.
oRCL_pRC_externalParentKey string
External parent key
oRCL_pRC_productType string
Product Type
oRCL_pRC_listPrice number
Product list price.
oRCL_pRC_contractStartDate string
Contract start date
{
"customerId": "ATT",
"currencyCode": "USD",
"priceBookVarName": "_default_price_book",
"headerAttributeValues": {
"oRCL_pRC_priceAsOfDate": "2018-04-23"
},
"items": [
{
"itemIdentifier": "1",
"partNumber": "SUV Charging Station use",
"itemAttributeValues": {
"chargeName": "Consumption Fee",
"oRCL_pRC_contractStartDate": "2018-04-23",
"oRCL_pRC_useUsageLock": true,
"oRCL_pRC_usageValue": 10,
"oRCL_pRC_tierBlockSize": [
25,
1
],
"oRCL_pRC_tierFrom": [
0,
50
],
"oRCL_pRC_tierTo": [
51,
0
],
"oRCL_pRC_tierListPrice": [
20,
16
]
}
}
]
}
To manually add BOM parts to Oracle CPQ, perform the following steps:
6. Click Add.
7. Repeat the above steps for all of the missing parts that display in red on the BOM Item Tree Administration page.
To resolve issues with the Create Subscription action, perform the following steps:
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are
protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use,
copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or
by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors,
please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S.
Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the
hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the
applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure,
modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the
hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights
are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or
intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use
this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are
trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third
parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to
third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle
Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party
content, products, or services, except as set forth in an applicable agreement between you and Oracle.