Use account-specific pricing for configured items

Account-specific prices configured on Oracle Configure, Price, Quote can be displayed in Commerce.

Account-based shoppers can obtain account-specific prices configured on Oracle Configure, Price, Quote and display these prices in Commerce. This topic explains the concepts behind this feature.

Formerly, the Oracle Configure, Price, Quote iFrame would open in an item configuration as part of anonymous session. All details in the Oracle Configure, Price, Quote page, then, were independent of the logged in shopper/contact/account. Account-based shoppers can now obtain account-specific prices configured on Oracle Configure, Price, Quote and display these prices in Commerce. This is possible because the iFrame displayed on Commerce obtains the context of the related account as well the contacts associated with it so that the correct account-based pricing information is returned to Commerce.

For example, consider that an account-based shopper logs in and selects to purchase a configurable computer package. The prices that Oracle Configure, Price, Quote returns to the shopper are specific and unique to that shopper's account. The pricing that is specific for one shopper is not visible to another shopper. The shopper then changes the configuration of the computer package as needed, enters the quantities needed, and finally submits the order. In the case of an Agent configuring the package, the agent also sees the account-specific details when configuring a price.

With the Commerce/Oracle Configure, Price, Quote configuration integration enabled, Commerce sends different criteria to determine and obtain the account-based price of the configuration maintained on Oracle Configure, Price, Quote.

Understand a user case as well as the workflow used to obtain correct account-based pricing

An example of a user case where a shopper (or agent) would want to obtain account-based pricing could go something like this:

  • The shopper selects a commerce site and browses through the items in the catalog.
  • The shopper selects a configurable item and clicks on the Customize button, which opens an iFrame allowing them to customize/reconfigure the item.
  • The shopper configures the item and expects to see the prices for the items which only that customer would be allowed to see for that account.
  • The shopper places the order with the customer-specific pricing. The shopper, after submitting the order and within the designated remorse period, is able to update the configurations of the items as well as receive the customer specific pricing for those items.
  • The shopper can cancel this order containing customer specific priced items (within the remorse period).
  • The shopper can carry out returns and refunds.
  • The shopper can exchange within the same configured item(s).

Some variations to this use case could include:

  • The shopper gets the account specific pricing but when shopper account details change, the adjusted price specific to that account would appear.
  • An agent placing an order for an account based shopper gets the account specific pricing specific to that shopper.

The workflow used to obtain the correct account-specific pricing is the following:

  • The store sends the Account ID(Customer ID, Customer Name) through the Configure Product iFrame. The shopper's accountId has been encrypted using the SSE and the encrypted details are what is sent to the Oracle Configure, Price, Quote iFrame. Other properties like model, product line, locale, currency are not encrypted.
  • The calls made to Oracle Configure, Price, Quote at this point internally call the Oracle Configure, Price, Quote Price API.
  • The iFrame shows the account specific pricing for the account based on the accountId.
  • The Price API looks for any customer pricing rules defined in Oracle Configure, Price, Quote and returns the correct account-specific pricing for that customer based on the accountId. If there are no prices configured specifically for the customer, then they are presented with the default prices.
  • A sample widget can be customized by implementers to encrypt and pass additional properties along with the accountId. The re-configuration flow works as it already exists.

The main purpose of this workflow is to pass the customer account/organization details to the Oracle Configure, Price, Quote system and calculate the customer-specific price (if any pricing rules are defined).

The existing integration components should retain their existing functionality (i.e. the customer/system implementer should be able to switch as to whether they are using anonymous or customer specific pricing).

With this workflow, it is assumed that there is data synchronization of Customers (Commerce account-based customer accounts) across Oracle Configure, Price, Quote and Commerce. Oracle Configure, Price, Quote is the mechanism that has the ability to set up rule-based pricing which can be customer specific. The customer specific pricing rule(s) should be the source for the account-based pricing of the item. Finally, there is a check done that is part of the integration which makes sure that the logged-in user is validated.

Note: A customer can use Oracle CDM (Oracle Customer Data Management) to maintain that the accounts (organizations) are synchronized between Commerce and Oracle Configure, Price, Quote or they can just use the Commerce accounts. The accountId that is passed in the integration flow varies based on the implementation model.

Understand how Commerce and Oracle Configure, Price, Quote support account-specific pricing

To be able to obtain account-specific prices configured on Oracle Configure, Price, Quote and display it on Commerce via the returned iFrame, you need the iFrame to be extended to handle various attributes as part of getting the price from Oracle Configure, Price, Quote. By extending these attributes, you can then display the account specific pricing given by the Oracle Configure, Price, Quote system.

The cpq-config-validation-app SSE now validates the additional accountID from the getConfiguration call made to Oracle Configure, Price, Quote to find the profile associated with the order before calling the Submit Order endpoint. An appropriate error message is returned if the accountId does not match the values of the orgId of the profile in order.json. By passing these parameters from Commerce to Oracle Configure, Price, Quote during the Configuration Page launch, the Pricing logic in Oracle Configure, Price, Quote can be triggered within the Configuration user interface. Commerce provides the initial ability to pass the Account ID, but an implementer can extend this to pass any other parameters from Commerce that Oracle Configure, Price, Quote can understand.

The integration takes an Access Token Based security approach to ensure that prices meant for users of one account are not visible to users of a different account. The key features of using this approach are the following:

  • The authentication into Oracle Configure, Price, Quote continues to be an anonymous/ guest user method as it is today.
  • There is no need for user mapping between the Commerce user and Oracle Configure, Price, Quote user as well as no need for additional user maintenance between Commerce and Oracle Configure, Price, Quote.
  • The approach follows an established approach based on Assets Modify Punch-In.

SSE flow for Store and Agent

The following describes the SSE flow for Store and Agent

  • When an account-based customer clicks on Customize for a product, the SSE endpoint gets triggered.
  • The accountId of the account-based user and other configurable details like model, product_line, product_family, etc. get passed to the SSE.
  • The validation of the accountId takes place first whether the logged in customer is associated with the accountId being passed or not.
  • If the validation is successful, accessTokenData is generated containing the accountId and the expiration time which is then encrypted and signed with the private key to form the accessToken.
  • A query string is formed using accessToken and another configurable list of parameters. This is then appended to the base URL and the Oracle Configure, Price, Quote iFrame that is launched with the account-based prices.
  • The accountId is decrypted by Oracle Configure, Price, Quote using the Public key. The true accountId is then determined and prices are shown as per the pricing rule setup for this accountId.

The following illustrates a sample request:

{
  "accountId" : "or-100001",
  "configurableSkuDetails" : {
    "currency" : "USD",
    "locale" : "en",
    "model" : "sku50001",
    "product_line" : "laptopConfiguration",
    "product_family" : "Laptop"
  }
}

The following illustrates a sample response to that request:

{ "queryString": "_bm_session_currency=USD&_bm_session_locale=en&model=sku50001&product_line=laptopConfiguration&product_family=Laptop&segment=laptop&_from_partner=true&accessTokenData=%7B%22expiryTime%22%3A%222019-11-06T15%3A40%3A49%2B05%3A30%22%2C+%22configAttrPunchinValues%22%3A%7B%22accountId%22%3A%22or-100001%22%7D%7D&publicKeyVarName=shagul_rsa_public&accessToken=xboKIL0YMl1R1IERTBKzzfFbyVAWq5bZgkWX%2Bf71YOJYlBu1GZ5aZay%2B5FS338joCIs8C7B9RrJlRXXkmd1U4zgqfPD2NJnfbYzxCelhFpbwdau6n88qVH6WI%2BPCLzUJKrwJdNxuTd9O78ZL4pKW8g9mFhpnZcNec%2FRxpHMrV%2BYm4S2iS5IZt7apTkt%2Bd%2BDDvm3Y0cmyEyfwcbhTjxKho904dJId0pf%2BU3VKcNIhMRMtoeFFCskhQNiqA8gyjUqamyB1y%2BgZQ9WKqo84rYsPnjCHvOF5z%2BAjMF5FysbGQxLJAFPAczACuLhn1XrmDjjYMD6T26ey2d%2BQbKlzGgMIsg%3D%3D" }

SSE flow for validating the account ID

The cpq-config-validation-lib SSE has the functionality to validate the accountId (part of External Data) from the getConfiguration call to Oracle Configure, Price, Quote with the organization ID of the account-based profile associated with the order before calling the Submit Order endpoint.

Understand best practices for using account-specific pricing

Although the integration allows for account-specific pricing, it does not, however, allow for re-pricing of configured items, when any of the following conditions occur:

  • The price list group (currency) is changed by the shopper
  • An anonymous user logs in which results in a change of price list group (for example, an anonymous shopper logs in as an account-based shopper)
  • The account based shopper changes the current account in context

Simple (i.e., non-configured) items are re-priced but configured items are not. A shopper cannot even re-configure the item to get the updated price. This is because Oracle Configure, Price, Quote does not accept secure punch-in attributes during the process of re-configuring an item. Unfortunately, the only available option is to delete the configured item and add it again as a fresh configuration.

To avoid inconvenience to the shopper, it is recommended that you add an information message to your custom widgets. The message should be seen when an anonymous shopper tries to add a configured item to cart, (for example, when they click the Customize button or when they are on the Product Details page. The message should suggest that the shopper first login and then do the configuration.

Set up and configure Commerce and Oracle Configure, Price, Quote for account-specific pricing

Use the following procedures to set up and configure Commerce and Oracle Configure, Price, Quote for the account-specific pricing feature:

Configure Oracle Integration for account-specific pricing

Use the following steps to configure Oracle Integration for account-specific pricing while using the Commerce/Oracle Configure, Price, Quote integration:

  • Download the Oracle Integration packages found in the OCCS-CPQ_CONFIGURATION_INTEGRATION_4.0.par package file from Oracle Marketplace or My Oracle Support.
  • Import the package into the OIC Environment
  • Configure the Oracle Configure, Price, Quote Connection in OIC.
  • getConfigurations (4.0) is used to validate configuration and pricing from Oracle Configure, Price, Quote.

For more information on using Oracle Integration, refer to the product Help Library.

The next steps you need to complete are downloading and configuring the required Server Side Extensions (SSEs) used for account-specific pricing. There are three SSEs used by the integration to support this. These are the following:

  • cpq-config-validation-app.zip
  • cpq-config-punchin-store.zip
  • cpq-config-punchin-agent.zip

The information that follows describes how to download and configure these SSEs.

Download and configure cpq-config-validation-app.zip

Use the following steps to download and configure the cpq-config-validation-app.zip Server Side Extension for account-specific pricing while using the Commerce/Oracle Configure, Price, Quote integration:

  • Login as Administrator to Commerce
  • From the Admin interface, download the Server Side Extension (SSE) cpq-config-validation-app.zip by clicking Design - Developer - Server-Side Extensions. This SSE triggers the Configuration integration just setup on Oracle Integration.
  • Unzip the file.
  • Update the config.json file with the Oracle Integration Hostname and Port information.
  • Also, a the dd extension environment variables for OIC_USERNAME and OIC_PASSWORD using the Admin endpoint
  • Run the Node Package Manager to install in the .ZIP contents in the root folder
  • Zip the contents in the root folder.
  • Upload to the Extension Server using the serverExtension endpoint

Download and configure cpq-config-punchin-store.zip and cpq-config-punchin-agent.zip

Use the following steps to download and configure the cpq-config-punchin-store.zip and cpq-config-punchin-agent.zip Server Side Extensions for account-specific pricing while using the Commerce/Oracle CPQ integration:

  • From the Commerce Admin interface, download the cpq-config-punchin-store.zip and cpq-config-punchin-agent.zip Server Side Extensions by clicking Design - Developer - Server-Side Extensions. These use the CPQ Punchin Lib to generate a query string with an encrypted accountID that is passed to the CPQ iFrame. This enables CPQ to show account specific prices.
  • Unzip the files.
  • Generate a public and private key using the OpenSSL utility.
  • Place the private key file in the Keystore folders.
  • Specify the public key in the config.json files.
  • The public key is also added to the CPQ Integration Center under Authentication Certificate.
  • Run NMP to install the .ZIP files contents in the root folder
  • Zip the contents in the root folder
  • Upload to the Extension Server.

Configure Commerce for account-specific pricing with Oracle Configure, Price, Quote

Use the following steps configure Commerce for account-specific pricing while using the Commerce/Oracle Configure, Price, Quote integration:

  • Set up the external pricing validation webhook in Commerce: /ccstorex/custom/v1/validateCPQConfigurations

    Do this by going to Settings - Web APIS - Webhook in the Admin user interface. Choose the External Price Validation function API and enter the requested information.

  • Enable and configure the Commerce/Oracle Configure, Price, Quote Configuration Integration by going to Settings - Oracle Integrations in the Admin user interface. Select the Oracle Configure, Price, Quote integration from the list.
  • Modify widgets in the following layouts:
    • Store layout: Product Details page
    • Agent layout: B2B Checkout Layout - Accordion element: Search and Add Items to Cart popup stack

    These take the accountIDs of the user and display the appropriate prices for that account.

You also need to have synchronized product catalogs between Oracle Configure, Price, Quote and Commerce. The models available in Oracle Configure, Price, Quote need to have a corresponding externally configurable SKU in Commerce. Also, make sure you have set up the accounts and desired users in Commerce and have set up the proper pricing rules in Oracle Configure, Price, Quote (since it is the provider of the prices to sent to Commerce).

Finally, double check that you have setup pricing rules on Oracle Configure, Price, Quote based on a parameter (for example, Account Id) and have also added the public key to the Integration Center - Authentication Certificate in Oracle Configure, Price, Quote.