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 Configure, Price, Quote Configuration API.

You can use the Direct API Configuration feature to customize a product by implementing and using the Oracle Configure, Price, Quote Configuration API. This feature give you the ability to do the following:
  • 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 Configure, Price, Quote 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 Configure, Price, Quote 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 Configure, Price, Quote Configuration API.

For this example, it is assumed that the Commerce and Oracle Configure, Price, Quote 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/configurations SSE endpoint passing the following parameters:
    • productFamily
    • productLine
    • model
    • locale
    • currency
    • configurationMetadata
  • The .../v1/configurations SSE endpoint triggers the following Oracle Configure, Price, Quote API endpoints:
    • GET_configUISettings
    • GET_pageTemplates
    • POST_config
    • GET_Layout_ Cache
  • The .../v1/configurations SSE collates the data returned from Oracle Configure, Price, Quote, 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}/page SSE endpoint (where cacheInstanceId represents the current reconfiguration instance in Oracle Configure, Price, Quote) by passing the following parameters:
    • productFamily
    • productLine
    • model
    • locale
    • currency
    • op: next
  • The .../v1/configurations/{cacheInstanceId}/page SSE endpoint triggers the following Oracle Configure, Price, Quote API endpoints:
    • POST_next
    • GET_Layout_ Cache
  • The .../v1/configurations/{cacheInstanceId}/page SSE collates the data returned from Oracle Configure, Price, Quote, 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 isUpdatable property for the handset attribute.
  • The isUpdatable property 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 (where cacheInstanceId represents the current reconfiguration instance in Oracle Configure, Price, Quote) passing the following parameters:
    • productFamily
    • productLine
    • model
    • locale
  • The .../v1/configurations/{cacheInstanceId} SSE endpoint triggers the POST_update Oracle Configure, Price, Quote API endpoint.
  • The .../v1/configurations/{cacheInstanceId} SSE collates the data returned from Oracle Configure, Price, Quote, 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 isUpdatable property for the handset attribute. The isUpdatable property 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}/page SSE endpoint (where cacheInstanceId represents the current reconfiguration instance in Oracle Configure, Price, Quote) passing the following parameters:
    • productFamily
    • productLine
    • model
    • locale
    • currency
    • op: previous
  • The .../v1/configurations/{cacheInstanceId}/page SSE endpoint triggers the POST_previous and GET_Layout_ Cache Oracle Configure, Price, Quote API endpoints.
  • The .../v1/configurations/{cacheInstanceId}/page SSE collates the data returned from Oracle Configure, Price, Quote, 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-cart SSE endpoint (where cacheInstanceId represents the current reconfiguration instance in Oracle Configure, Price, Quote) passing the following parameters:
    • productFamily
    • productLine
    • model
  • The .../v1/configurations/{cacheInstanceId}/add-to-cart SSE endpoint triggers the POST_integration_add_to_cart Oracle Configure, Price, Quote API endpoint.
  • The .../v1/configurations/{cacheInstanceId}/add-to-cart SSE transforms the Oracle Configure, Price, Quote 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/configurations SSE endpoint passing the following parameters:
    • productFamily
    • productLine
    • model
    • locale
    • currency
    • configId (identifies the specific instance of configuration in Oracle Configure, Price, Quote which is to be reconfigured)
  • The .../v1/configurations SSE endpoint triggers the following Oracle Configure, Price, Quote API endpoints:
    • GET_configUISettings
    • GET_pageTemplates
    • POST_config
    • GET_Layout_ Cache
  • The .../v1/configurations SSE collates the data returned from Oracle Configure, Price, Quote, 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.