Configurable Products

With configurable products used in Financial Services Accelerator, your customers participate in the product configuration and customization. That way, they are able to select the right product for them.

The customization is the heart of configurable products. Each configurable product requires the additional information from the customer, so that they could complete the purchase flow. Therefore, a configurable product understood in this sense can be both a physical product and an abstract one. For instance, the custom credit card with the image of a customer's favorite football team or a beloved film hero is an example of the physical configurable product. Allowing customers to get the different quotations for a particular service by varying their inputs, while they are still browsing your Web site, is an illustration of an abstract configurable product. The latter example has been implemented on the banking storefront in Financial Services Accelerator and is discussed in more detail in this document and in Dynamic Pricing.

In both cases, whether you are implementing physical configurable products or abstract ones, there is a value to the customers. These products have the potential to enhance their shopping experience and raise the overall satisfaction with the company and their products and services.

Implementing Configurable Products

SAP Commerce supports various configurable products. The configurable products can be modified by using different types of a configurator. In the current implementation, Financial Services Accelerator uses only yForms as a configuratorType for modifying configurable products (see the UML diagram below). As we have mentioned, we use configurable products on the banking storefront to enable complex price calculation. On the first step of the checkout process (Configure a Product), customers can modify the inputs for price calculation as many time as they want. By clicking the Calculate button, the mini-cart is displayed on the right of the yForm with the summary of inputs by the user and the estimated price of a service.

When the user populates all fields correctly and clicks the Continue button, adding of the product to the cart takes place, and the user is redirected to the next page (Add Options). The information about yForm configuration is stored with CartEntry and will be used from this location throughout the checkout. To see the entered data, go to BackofficeStart of the navigation path Next navigation step Marketing Next navigation step OrdersEnd of the navigation path and open the desired order. Select Common tab, and go to Start of the navigation pathConfigured Items Next navigation step ProductConfigurationEnd of the navigation path section.

The actual implementation can use other configurator types. Also, the yForms configurator can have other uses apart from price calculation.

SAP Commerce also supports a mix of products configurable by different configurators:
  • in the same catalog
  • in the same cart
  • in the same order

UML diagram

A configurator does two things. It has a common functionality that defines the settings that are needed for the configuration and links them to a specific product in the catalog (AbstractConfiguratorSettings). At the same time, when the product is added to the Cart, the product configurations are linked to Carts and Orders (AbstractOrderEntryProductInfo). For more information, see Product Configurator Support.

In case of Financial Services Accelerator, this means that every product we want to have configured through a yForm, we need to associate it with a specific ConfigurationCategory, which has one or more FinancialServicesYFormConfiguratorSettings defined. The FinancialServicesYFormConfiguratorSettings object contains the information about which applicationId and formId is used to create a new instance of YFormData. On the other hand, the YFormData object contains the configuration values that a specific user defined for the product (in their session).

ImpEx Code Example

# Personal loans main products
UPDATE SubscriptionProduct; code[unique = true]; $catalogVersion; $supercategories[mode=append]
; LO_PERSONAL_LOAN; ; configurations_loans_personal_loan
# Sample configurable categories with configurations
INSERT_UPDATE ConfigurationCategory;code[unique=true];$supercategories;configuratorSettings(id, $catalogVersion);allowedPrincipals(uid)[default='customergroup'];$catalogVersion
;configurations_loans_personal_loan;configurations;
INSERT_UPDATE FinancialServicesYFormConfiguratorSettings;id[unique=true];$catalogVersion;configuratorType(code);configurationLabel;configurationApplicationId[default=$applicationId];configurationFormId;configurationCategory(code, $catalogVersion);qualifier
;personal_loan-config;;YFORM;Personal Loan Configuration Label; ;Loans-PersonalLoan-ConfigureProductForm;configurations_loans_personal_loan;personal_loan-config

When a user accesses the configurator page for a specific product, based on the data model information above, Accelerator identifies the product as a configurable product. As a result, it tries to instantiate a new instance of its configurator. In case of the banking storefront, this is actually a YFormData object, which allows us to display the yForm on the user interface and stores the information that the user has provided.

The underlying logic which was introduced includes the specific implementation of several classes:
  • FinancialServicesYFormConfigurationHandler - responsible for the creation and retrieval of configuration values, based on the requested product and the information stored in its configurator settings (FinancialServicesYFormConfiguratorSettings). Based on the information from this configurator settings, the handler creates a FinancialServicesYFormConfiguredProductInfoModel that holds the YFormDataModel object as part of its configurationYForm attribute.
  • FinancialServicesYFormConfigurationsPopulator - responsible for converting the FinancialServicesYFormConfiguredProductInfoModel to a ConfigurationInfoData DTO that is utilized on the front-end (see the figure below).
  • ProductConfigurationController - is an access point for invoking the configurator of a specific product. Through the product facade, it retrieves the list of ConfigurationInfoData objects. For each ConfigurationInfoData objects, the ProductConfigurationController gets an inlineHtml (for rendering the yForm in question) and displays it to the user. In other direction, it is in charge of a user's request for (re-)calculation, and it delegates the call further to the pricing engine for retrieving the prices based on the user's input.

DTO

In short, with the configurator, we now have better handling of yForms, as the data is more readily available. It is important to note that the configurator is not only responsible for saving the yForms data, but also for rendering the forms on pages.