Wednesday, 30 August 2017

SRM UI5 Boosting and Ranking

SRM UI5 boosting and ranking functionality is released with SRM 7.0 EhP4 on the HANA database.  Available with Implementation note 2383392(SRMNXP01 150).

1. Activate Boosting and Ranking Functionality for Users


After collecting the approval or rejection from end users, administrator has to first set the user settings by running the report ESH_ENG_PS_MAIN_SWITCH as shown in Figure 1.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 1. User setting report for Boosting and Ranking framework

Description for the radio buttons in Figure 1:

◉ Label 1 – Disable Boosting and Ranking framework for all users
◉ Label 2 – Enable Boosting and Ranking framework for all users
◉ Label 3 – Boosting and Ranking framework is enabled for a specific user after the user is added to the user list in label 5 area
◉ Label 4 – Boosting and Ranking framework is disabled for a specific user after the user is added to the user list in label 5 area.

2. Boosting Configuration for Standard Request Attributes


You can configure the boosting of standard request attributes. For example, you are searching with the term “laptop” to find all laptops from available manufacturers. If you prefer laptops from Apple manufacturer to be displayed on the top of the result list, you can create a ranking factor ‘Z_MANUFACTURER_NAME’ and configure it so that manufacturer Apple weighs more heavily in the calculation of ranking scores. This way, the ranking factor influences the ranking scores and certain group of search results are boosted to the top.

Manual Steps for Boosting Configuration of Standard Request Attributes


You must create your own ranking factors to boost standard attributes which are marked as freestyle search in the search result model. For example, to ensure that laptops from Apple manufacturer are displayed in the top results, configure the manufacturer with value “Apple” as follows:

1. Create a new customer ranking factor

1.1 Run the report ESH_PS_ESPROV_CREATE_DIM, choosing Owing ES-software Component – SRMNXP01. Enter the name of the ranking factor (Ranking Dimension ID), short description, and attributes. These are mandatory inputs, which defines a ranking factor. In Figure 2, ranking factor Z_MANUFACTURER_NAME is created.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 2. Create a ranking factor

1.2 Execute the report to finish the creation.

2. Assign the newly created ranking factor to the search connector

2.1 Go to transaction ESH_COCKPIT to open the connector administration cockpit in SRM application server.

2.2 Select the connector Search Result Model SRMNXP02_CATALOG.

2.3 On the tab Ranking Dimension, click on Add button and Select the customer created ranking factor through F4 search help.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 3. Assign a ranking factor in ESH_COCKPIT

2.4 Assign the standard Request Attribute in the search model to the ranking factor through F4 search help. In our example, the corresponding request attribute MANUFACTNAME is mapped to the ranking factor Z_MANUFACTURER_NAME in Figure 4.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 4. Map the request attribute to the ranking factor

2.5 Click Save to finish the assignment.

3. Create a boost to set significance for the ranking factor

3.1 Run the report ESH_PS_ESPROV_MAINT_SIG to create a boost with significance manually. The boost entry is required to boost a specific manufacturer above others.

3.2 Choose the Dimension ID Z_MANUFACTURER_NAME through F4 search help in Figure 5. The User field is optional for a user-dependent ranking factor. For a user-independent ranking factor, leave this field empty. In our example, ranking factor Z_MANUFACTURER_NAME is created as user-dependent. Therefore, the created boost entry will take effect only for the user whoever is entered in this field. On the other hand, the created boost entry will apply to all users if this field is left empty.

3.3 Execute the report.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 5. Execute the report to create a boost

3.4 In the next screen, click + to create a new boost entry. Enter the value ‘Apple’. This value should be valid in the product items, that is, this value must be found in the report ESH_TEST_SEARCH for example. Choose a significant weight between 0 and 1. This is how you can decide the priority among different manufacturers. Click on Execute button to complete the boost entry.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 6. Maintain significances

3.5 Click Save to save the settings in the system.

To view enterprise search results boosted by the relevance ranking factor, do the following:

◉ Ensure that the end user has been activated for the Boosting and Ranking functionality in the report ESH_ENG_PS_MAIN_SWITCH.
◉ Navigate to the SRM UI Add-On portal and refresh it. Use the same search term ‘laptop’. The order of the search result list is now according to the relevance ranking factor. The product item with manufacturer name ‘Apple’ has been boosted to the top in Figure 7.
◉ To see the actual ranking scores, perform the same search in the report ESH_TEST_SEARCH.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 7. UI search results with the boost applied

3. Ranking Configuration based on the Click Counter


Whenever user clicks ‘Add to Cart’ on a product item and add it to the temparory cart, system catches this event, transfers this click to a boost with a significance weight, and stores the boost in the system automatically. After refreshing the UI, the newly clicked product item will be boosted in the search result list. Product items that are clicked often have higher ranking scores than the ones that are clicked less often.

Manual Steps of Ranking Configuration


SAP provides the standard ranking factor to configure boosting based on the click counter – SRMNXP_ADD_CART_EVENT. To enable the ranking functionality, assign the standard ranking factor to the ESH_COCKPIT and link it to the key request attribute of the search model. Do the following manual steps:

1. Go to transaction ESH_COCKPIT to open the connector administration cockpit in SRM application server.
2. Select the connector Name Search Result Model for SRMNXP02_CATALOG. This connector must be activated.
3. On the tab Ranking Dimension, click Add button and Select the standard ranking factor SRMNXP_ADD_CART_EVENT through F4 search help.
4. Assign the key Request attribute PRODUCTKEY of the search model to the ranking factor through F4 search help.
5. Save.

SAP UI5, SAP Learning, SAP Guides, SAP All Modules, SAP Tutorials and Materials, SAP Certifications, SAP Live Access
Figure 8. Assign standard ranking factor in the ESH_COCKPIT

Now user can test the ranking results based on the click counter. Double check the setting of the user in the personalized search main switch by the report ESH_ENG_PS_MAIN_SWITCH. The user must be activated as a prerequisite.

In SRM UI Add-on search portal, go back to the search result list and add one product item to the temporary cart by clicking on ‘Add to Cart’ button. After refreshing the portal and doing the same search, the order of result items should be different – the clicked item should have been boosted. To see the actual ranking scores, perform the same search in the report ESH_TEST_SEARCH.

BAdI for Ranking Functionality


A Business Add-In (BAdI) is provided to filter a search item for the ranking functionality, which means without translating the click action for this item into a boost in the system. Customer has flexibility to filter certain items for the ranking according to the organization requirements by implementing this BAdI.

Enhancement Spot: /SRMNXP/BD_FILTER_RANKING

BAdI Definition: /SRMNXP/BD_FILTER_RANKING

Interface Method FILTER_ITEM provides access to the tempory cart shopping cart item.
SAP Online Guides, Tutorials, Materials and Certifications.

Related Posts

1 comment:

  1. Hello! I know this is kinda off topic however , I'd figured I'd ask. Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa? My blog discusses a lot of the same subjects as yours and I feel we could greatly benefit from each other. If you are interested feel free to send me an email. I look forward to hearing from you! Awesome blog by the way!
    nsw Trucking company

    ReplyDelete