Customize and reconfigure a product by direct use of the CPQ Configuration API
You can customize and reconfigure a product by directly using of the Oracle CPQ Configuration API.
- Customize a product where the "Customize via direct API" feature has implemented in Commerce
- Reconfigure a product before checking out
Before you can accomplish these tasks, you must first make sure that the Direct API Configuration feature has been implemented (described in a previous topic of this section of the guide). Also, it is assumed that the Commerce and Oracle CPQ Integration is already configured and enabled. In the section that follows, you are provided with details for using the feature to carry out these specific customization tasks as just described.
Apply customizations to a product by directly using the Oracle CPQ Configuration API
The list of tasks that follow describe a situation where a shopper customizes a product where the Direct API Configuration feature has been implemented in Commerce.
In this case, a System Integration Partner has already implemented the feature and the SI user interface design team may have already done some user interface customizations by directly using the Oracle CPQ Configuration API.
For this example, it is assumed that the Commerce and Oracle CPQ Integration is already configured and enabled.
Use the following guidelines to accomplish the specified goals.
- As an example, let us say that the shopper has noticed a lot of web advertising by their cell phone service for their new Phones4All offer which allows them to buy a single deal with phones and plans for up to 6 people at huge savings on handsets, accessories and monthly bills.
- The shopper navigates to their cell phone service and selects the Phones4All
offer. The shopper selects to customize the offer. The UI element
Customize Button for Direct API invokes the
.../v1/configurationsSSE endpoint passing the following parameters:productFamilyproductLinemodellocalecurrencyconfigurationMetadata
- The
.../v1/configurationsSSE endpoint triggers the following Oracle CPQ API endpoints:GET_configUISettingsGET_pageTemplatesPOST_configGET_Layout_ Cache
- The .../v1/configurations SSE collates the data returned from Oracle CPQ, strips out all extraneous information, and returns a "combined configuration data response."
- The shopper is presented with a set of customization options that they can use to tailor the offer to their specific needs.
- The first option the shopper is presented with is the number of lines required.
- The shopper selects 4 lines.
- The shopper selects Next.
- The UI element Customize Button for Direct
API invokes the
.../v1/configurations/{cacheInstanceId}/pageSSE endpoint (wherecacheInstanceIdrepresents the current reconfiguration instance in Oracle CPQ) by passing the following parameters:productFamilyproductLinemodellocalecurrencyop: next
- The
.../v1/configurations/{cacheInstanceId}/pageSSE endpoint triggers the following Oracle CPQ API endpoints:POST_nextGET_Layout_ Cache
- The
.../v1/configurations/{cacheInstanceId}/pageSSE collates the data returned from Oracle CPQ, strips out all extraneous information, and returns a "combined configuration data response." - The shopper is presented with the configuration options for Handset and Plan for
Line 1 including:
- Handset - including Capacity, Color, Tablet, and Watch
- Plan - Silver or Gold
- The shopper selects the "Samsung S10" handset
- The UI element Customize Button for Direct API checks the
isUpdatableproperty for the handset attribute. - The
isUpdatableproperty value is TRUE (this means that when an option is selected for this attribute, the configuration model must be updated as this selection impacts other model attributes). - The UI element Customize Button for Direct
API invokes the
.../v1/configurations/{cacheInstanceId}SSE endpoint (wherecacheInstanceIdrepresents the current reconfiguration instance in Oracle CPQ) passing the following parameters:productFamilyproductLinemodellocale
- The
.../v1/configurations/{cacheInstanceId}SSE endpoint triggers thePOST_updateOracle CPQ API endpoint. - The
.../v1/configurations/{cacheInstanceId}SSE collates the data returned from Oracle CPQ, strips out all extraneous information and returns a "combined configuration data response." - The shopper sees that some of the options that were previously available for capacity, color, table and watch have been updated and that they are now limited to those compatible with their selected Samsung S10 handset.
- The shopper selects the 256GB capacity option for the handset.
- The UI element Customize Button for Direct API checks the
isUpdatableproperty for the handset attribute. TheisUpdatableproperty value is FALSE (this means that when an option is selected for this attribute the configuration model need not be updated as this selection does not impact other model attributes). - The shopper completes the customization for Line 1 and moves on to line 2.
- When the shopper is part way through the customization of Line 2, they decide that they may need to make a change to the handset capacity for Line 1.
- The shopper selects Previous.
- The UI element Customize Button for Direct
API invokes the
.
../v1/configurations/{cacheInstanceId}/pageSSE endpoint (wherecacheInstanceIdrepresents the current reconfiguration instance in Oracle CPQ) passing the following parameters:productFamilyproductLinemodellocalecurrencyop: previous
- The
.../v1/configurations/{cacheInstanceId}/pageSSE endpoint triggers thePOST_previousandGET_Layout_ CacheOracle CPQ API endpoints. - The
.../v1/configurations/{cacheInstanceId}/pageSSE collates the data returned from Oracle CPQ, strips out all extraneous information, and returns a "combined configuration data response." - The shopper is presented with the configuration options that they selected for Line 1.
- The shopper changes the capacity for the Line 1 handset and continues to customize the rest of the lines.
- The shopper completes the customization of their Phones4All offer.
- The shopper selects Add to Cart.
- The UI element Customize Button for Direct API
invokes the
.../v1/configurations/{cacheInstanceId}/add-to-cartSSE endpoint (wherecacheInstanceIdrepresents the current reconfiguration instance in Oracle CPQ) passing the following parameters:productFamilyproductLinemodel
- The
.../v1/configurations/{cacheInstanceId}/add-to-cartSSE endpoint triggers the POST_integration_add_to_cart Oracle CPQ API endpoint. - The
.../v1/configurations/{cacheInstanceId}/add-to-cartSSE transforms the Oracle CPQ response to a Commerce cart item and adds the configured item to the Commerce cart. - The shopper proceeds to checkout.
When all of this has completed, a multi-level configured item is added to Commerce cart.
Reconfigure a customized product before checking out
In this situation, a shopper decides to make a change to a customized product after adding it to the cart but before checking out.
Say, for example, the customer has customized their Phones4All offer and has added it to the cart. Before checking out, however, the shopper reviews their choices and realizes that by including the Apple Watch with Line 4 the offer is more than $200 over their budget. The following details illustrate what occurs if a typical shopper wishes to reconfigure an already customized product before checking out:
- The shopper selects to edit the Phones4All item in her cart.
- The user interface Shopping Cart widget with a Reconfigure Button for Direct API
invokes the
.../v1/configurationsSSE endpoint passing the following parameters:productFamilyproductLinemodellocalecurrencyconfigId(identifies the specific instance of configuration in Oracle CPQ which is to be reconfigured)
- The
.../v1/configurationsSSE endpoint triggers the following Oracle CPQ API endpoints:GET_configUISettingsGET_pageTemplatesPOST_configGET_Layout_ Cache
- The
.../v1/configurationsSSE collates the data returned from Oracle CPQ, strips out all extraneous information, and returns a "combined configuration data response." - The shopper is presented with all of the customization options and selections that they have made.
- The shopper navigates to Line 4 and removes the Apple Watch selection.
- The shopper selects to save and their cart is updated.
The Commerce cart is now updated with the newly reconfigured item.