Table of Contents

Advanced Personalization - Key Concepts and Features

The following section refers to the btg* extensions. These extensions will be replaced by the new Personalization extensions based on SmartEdit and are deprecated since SAP Hybris 6.7.

It triggers actions or shows CMS content to different groups of customers based on their behavior, interests, wishlists and historical data. Using targeted personalization the behavior of the customers can be measured and rewarded. You can show them special promotions, suggest them products, send them personalized emails or adapt the content and products of the web site to their interests.

Key Concepts

Key Features

Evaluation of rules

Technical Details

For the BTG extension to work correctly, in each request the rules of the segment must be evaluated. Each rule contains conditions and they must also be evaluated. Doing this evaluation blindly may lead to serious performance problems.

To prevent this and to provide data for the reports, each result of the evaluation of a segment, rule or condition is saved to the database. If the result was successful (the condition was fulfilled), the saved result is used in subsequent evaluations. This means that each segment, rule or condition is going to be evaluated until it is fulfilled. Afterwards the saved result is going to be used.

We can manually invalidate some successful results, if we want to evaluate again a condition. Please read above how the BTGSegmentFilter works.

Result Scope

How long the result is valid is defined by the result scope. If is a session result scope, the result is valid as long as the jalo/http session is valid. If the evaluation scope is permanent, the result is always valid.

The results of the anonymous user are only valid during the session.

Evaluation Method

If the full evaluation mode is used, the results of all the rules and conditions are fetched from the database if the last time they were successful or they are calculated. If the optimized evaluation mode is used, BTG stops checking the rules and conditions when one was unsuccessful. The result is always saved into the database because they are used by the reports.

The full evaluation method is useful for testing your rules or for generating a complete report of what rules where fulfilled by the visitors of the site.

Condition Evaluation Scope

It indicates the conditions and their operands if there is a session available. In such a case, the condition evaluation scope would be online, otherwise offline.

I haven't found any operand which uses this flag. But I believe that the offline value is set when the page is viewed using the Live Edit mode in the CMS Cockpit.

Runtime Configuration

The scopes and the evaluation method may be set on runtime. This overwrites the values of the segment. This is used by the BTG cockpit to test the segments and rules.

Execution of the output action

The out actions associated to a customer segment are triggered once when all the rules are fulfilled. If the session result scope is used, the actions are performed in every session where the customer fulfills all the rules. If the permanent result scope is used, the actions are performed only once in the lifetime of the eShop.

If you are in the BTG cockpit, the actions are triggered every time the customer fulfills the rules.

Integration in a frontend

The storetemplate is an example of integrating advanced personalization in a frontend application. The filter BTGSegmentFilter does the evaluation of the rules in every request. This page explains how the filter works.

Warning: The BTGSegmentFilter invalidates all the results at the beginning of a request. In a real-world website, only some rules like “Cart is empty” must be evaluated again in every request.

Further Reading

Data model of the BTG extension

–Based on Hybris version 5.3