Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

11 Hybris Personalization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Explain Personalization = The behavior or characteristics of a customer in an online shop can be used to

classify him/her into different groups or segments. This segmentation can be used for further marketing
actions. Use segmentation for personalizing the content.

Customer Behavior = Various actions which can be performed on a website.


Customer Characteristics = Various types of data which is saved with a customer.
Marketing Actions = Various Hybris commerce actions which can be triggered.

Q: What are the required extensions = (1) btg & (2) btgcockpit

Let’s say – you just arrived at Amazon. Website don’t know what you are. So, it displays all products.

Assume that, website knows what you are (Male / Female), then it can display items / products related to you.
That means, website takes you to finalize the product fast (With less steps). So, we can customize the website
based on customers.

For 1 customer, we can show 1 set of products & for another customer we can show another set of products.
Example: - Assume you were in Amazon & bought Electronic items last 5 times. Now when you go to Amazon
6th time, it will show most of electronic items.

Q: In Amazon, sometimes, you may see like: - “1 product / 1 customer” (or) 5 product / 1 customer”.

Write logic to implement above scenario: -


In Product – Add field / column called “maxQuantity”
if(product.maxQuantity >= cart.product.quantity + previousOrders.ProductID.Qty) → Allow purchase
Else → Don’t allow the purchase.
Note: - Above is not suggestable (bcoz change is required for 1 / 2 products, but we are adding this field /
column for entire table).
Q: What is the alternate for above solution? = (1) We can use transient variables (or) (2) We can use some
local configurable properties / …
Instead of all above, we can simply go for Hybris Personalization. Today – 5 product / 1 customer.
Tomorrow – 2 product / 1 customer. Hence, we need to have Configurable Content.

We have 4 Rules (Called Personalization / Customer Segment Rules (or) BTG (Bridge To Gap) Rules): -
1 – Cart Rule = It gives information of the current shopping cart in the session.
2 – Order Rule = It gives information about previous orders details / history.
Note: - This rule always returns false for anonymous users.
3 – Customer Rule = It gives customer information in the current session (1st name, last name, DOB…)
Note: - This rule always returns false for anonymous users.
4 – Website Rule = It gives analytics (How much time you are in site, what products you visited…)
This way we will come to know what are your favorite & can display those related promotions.
To do this we also have something called “Customer Segments”.
Contact Us = ChennaReddyTraining@RRRS.CO.IN
Note: - In any eCommerce site, we see products & also some other non-products (like banners /…).
If we click on banner, it will target another set of products.
Anything which is not specific to your product is called “Content” (Banner/…).
So, in eCommerce site, both product & content are important.

When we click on Product image, it will take us to product page.


We can configure Product image in hMC Products – Multimedia.
When we click on content (banner), it will take us to another set of products.

Q: What are the Customer Segment Attributes?

✓ id = Unique Identifier –created automatically


✓ name = Name of the customer segment
✓ catalog version = Catalog version the segment is valid for (content catalog version)
✓ default result scope = Session scope or permanent scope
✓ default evaluation method = Optimized (lazy) or full (eager)
✓ sites = List of CMS websites for the segment
✓ active from, active until = Specifies the period the segment is active
✓ is active = Flag to determine if segment is active

Q: How to create content which is not specific product? = Content Catalog.

Step 1 = -- hMC – Catalogs – Content Catalogs – ID = EleContentCatalog – Create

Create Catalog Versions = Staged & Online (Make it Active).


Create Sync Rule = Double click on “Catalog Versions (Staged)” – Catalog versions
RMB on “Dependent Catalog Versions” -- Create New – Sync
Specify Sync Source = EleContentCatalog – Staged & Target= *-Online
Add Sync language = RMB on Sync Lang area – Add Language → en
-- Save – Save – Save

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step 2 = -- mcc – WCMS (Web Content Management System) Cockpit with Advanced Personalization (User =
cmsmanager & pwd = 1234) – Websites

WCMS has 4 perspectives = WCMS Page View, Live Edit, Navigation & Customer Segments.
Q: We don’t see our EleContentCatalog in WCMS why? = Access missing (Personalization).
→ hMC → User → Emps, Search for cmsmanager – Personalization
Writeable catalog versions = Add EleContentCatalog (Both Online & Staged)
Readable catalog versions = Add EleContentCatalog (Both Online & Staged) → Save

Note: - Even after doing above steps, we don’t see expected results, because without website we can’t see
the content catalogs. For now, follow Step 3.

Step 3 = -- hMC – WCMS – Websites (RMB) – Create Website, ID = EleFry & Name = EleFry
Note: - For every website, there should be “Product Catalog & Content Catalog”.
Default Catalog = ElectronicsProductCatalog
So add “Content Catalogs” (RMB – Add Content Catalog), Select “EleContentCatalog”.

Note: - Now go to WCMS & You can see your website Called “EleFry”.

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Q: Just you arrived into Flipkart. Will you have Cart? If yes, what will be there in cart. If you won’t have
cart, explain why?
1st Point = You will not have any cart when you arrived (Anonymous user / customer) into flipkart. When
you add 1st item to cart that time cart will be created.
2nd Point = Cart created when u add 1st time. Assume you deleted item from cart, still cart will be there
with empty.
Example: - Go to default site = http://localhost:9001/yacceleratorstorefront/?site=apparel-uk Now you are
anonymous user / customer in this site. – hMC – User – Customer, Search for anonymous customer –
Orders (We will not see any cart created for this anonymous customer). (4 Default Sites are there).
Now → default site & add one item. Come back the anonymous customer orders, you will see created cart.

Q: Explain “Customer Segments” in WCMS?

All customer specific personalization rules can be created here.


In latest versions of Hybris, if you don’t see “Customer Segments” then you need to go & add the related
entries (btg & btgcockpit) in “localextensions.xml” like below (Then do ant clean all & perform Update).

Note: - If you having Hybris 6.XXX version, then you also need to add below: -
<extension name="b2cbtgaddon" /> <extension name="addonsupport" />
<extension name="acceleratorstorefrontcommons" />

-- WCMS → Customer Segments → Create a new customer segment (+), Name = EleCusSeg
Is Active = Yes, Catalog Version = Electronic Content Catalog / Staged → Next
Now select the Website = EleFry → Next, Result Scope = Session Scope → N
Evolution Method = Optimized Processing → Done.

Q: What are the Customer Segment Result Scope? = Session Scope / Persistent Scope.

Session Scope Persistent Scope


Let’s say we have 4 rules created, then all 4 Let’s say we have 4 rules created, then 2 rules can
rules must be fulfilled in single browser be fulfilled today & another 2 rules can be fulfilled
session. tomorrow. Once all rules TRUE then Output action
Contact Us = ChennaReddyTraining@RRRS.CO.IN
will be triggered.
Rules results won’t store in system. Rules results will be stored in system.
For Anonymous users / customers must use As rules results stored in system, so authenticated
this. users / customers can have this.
Q: What are Customer Segment Evaluation Method? = Optimized Processing / Full Processing.

Optimized Processing Full Processing


Let’s say we have “Rule1 & Rule2 & Rule3 & Let’s say we have “Rule1 and Rule2 and Rule3 and
Rule4” – If Rule 1 is failed, then Rule2&3&4, Rule4” – All rules will be executed. Even though
can’t be executed. Rule 2 fails, it will execute Rule 3 & Rule 4.
It gives good performance. Less performance.
Challenge – If you want to see report like – Advantage – We can find easily “which rule fails &
“How many are failed & How many are which rule is pass” from the reports.
passed”, It’s not possible. Bcoz it returns falseLet’s say – you want to know out of 5 rules which
for all the rules (even some are passed). rule is more failed. Based on that you can take some
decision & do something else.
Now search for the created customer segment (EleCusSeg) & open it.
Customer Segment Rules → (+), Select Customer Rule
Note: - Every rule will have 3 parts: - (1) Left Operand (2) Operator (3) Right Operand
Gender of User Equals Gender (Male) → Next → Done
Customer Segment Rules → (+), Select Cart Rule
Quantify of a product in cart (Product=XFX GeForce…) less than or equals Number (5)

Note: - Generally, we won’t create New Rules, but we will add options in drop down.

Output Actions = Specify what is required when customer segment rule is true. Example: - If Customer
Segment rule finds gender = M then in output actions display men related banner.

Output Actions (+) → Show/How WCMS Item → WCMS Page, now select required one.
(OR) Create User Group (→User→UserGroups→Create→UserGroup), Name = menPrevGroup
Output Actions (+) → Add user to Group, User Group = menPrevGroup → N → Done.

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Note: - What is advantage of adding menPrevGroup in Output Actions. Example: - We will write one
“Cron Job”, which sends promotional e-mail for all user in menPrevGroup on every Sunday @ 8AM IST.

Q: What are the different Output Actions? =

✓ Add to User Group


✓ Show/Hide a WCMS Item
✓ Assign user group to a Root Business Unit (In latest versions this is not available).

Personalization & Cart Rules Exercise Input & Output Results Screens: -

Requirement 1 = Go to the sample website http://localhost:9001/yacceleratorstorefront/?site=apparel-uk

Register Here (Customer Created say = abcd).


Create User Group called "menPrevilageGroup".
Add this group to created Customer (abcd).

Create "Customer Segments" Rules: -

Member of Usergroups is in menPrevilageGroup

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Output Action =

✓ Show / Hide WCMS Component for Site Logo Component

Results = When you go back to site, you won’t see Logo. Also check the Reports. Note: - Make sure you clear
the cache.

Step 1 = Go to Sample Site & Create Customer / User called "abcd".

http://localhost:9001/yacceleratorstorefront/?site=apparel-uk → Login / → Register

Enter Details ... Enter Name = abcd, Surname = abcd, Email = abcd@abcd.com, PWD = abcd1234 --> click on
Register

Step 2 = Create a User Group called "menPrevilageGroup".

-- hMC -- User -- User Groups -- Create -- User Group (ID = menPrevilageGroup) – Create

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step 3 = Assign the created group to created customer (abcd).

--hMC -- User -- Customers -- Search for customer (abcd) & open it. In Group add menPrevilageGroup – Save

Step 4 = Create "Customer Segments" & Add Rules: -

-- WCMS -- Customer Segments -- Create new Customer Segment (+)

Note: - As we don’t have Website ready, so let's have already available one = apparel site.
Contact Us = ChennaReddyTraining@RRRS.CO.IN
Name = hideLogo
Catalog Version = Apparel UK Content Catalog / Online --> Next
Website = Apparel Site UK --> Next → Session Scope --> Next
Optimized Processing --> Next --> Done

Step 5 = Double click on the hideLogo segment (created in the above screen shot step6) & add the rules
(Member of Usergroups is in menPrevilageGroup).

Customer Segment Rule (+) --> Customer Rule

Member of Usergroups is in Usergroups menPrevilageGroup --> Next --> Done

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Create output actions

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step 6 = Go to Website & Clear Cache & See the results. U will not see the Logo.

http://localhost:9001/yacceleratorstorefront/?site=apparel-uk&clear=true

Note: - To clear the cache, you can use "&clear=true" at the end of the URL.

Requirement 2 = Hide breadcrumb also for the logged in user. Add the output action for breadcrumb
(Customer Rule is same)

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step 7= Go to Website & Clear Cache & See the results. U will not see the logo and breadcrumb

http://localhost:9001/yacceleratorstorefront/?site=apparel-uk&clear=true

Step 8 = Now see the Report (Which explain, how many rule conditions are passed & How many rule
conditions are failed)

-- WCMS -- Customer Segments -- Go to your created segment = hideLogo & --> Reports (ICON)

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Requirement 3 = Lets add Cart rule along with Customer rule. If the cart total >=100 euros then hide the
Search Component.

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Now create output action

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Go to Website, Clear Cache & See the results. U will not see the logo, breadcrumb and search box if the cart
total >=100 euros

http://localhost:9001/yacceleratorstorefront/?site=apparel-uk&clear=true

Output after adding items to the cart and its value >= 100 euros

Requirement 4 = Create Website Rule. If the product “Skull 80 SS youth white XS” (ID = 300738208) is
viewed then hide the footer navigation component.

Step1 = create a segment called “ProductViewSegment” → Select Apparel Site UK → Select Session Scope →
Select Optimized Processing → Done

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step2= Double click on the “ProductViewSegment” and create input criteria “Has view products” contains
“Skull 80 youth white XS” (ID= 300738208) using website rule

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step3 = Create output action “Hide footer component” when the product “Skull 80 youth white XS” has
viewed

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Step4 = Go to Website, Clear Cache & See the results. Result = The footer should not display when the
product “Skull 80 SS youth white XS | ID300738208” has viewed

http://localhost:9001/yacceleratorstorefront/?site=apparel-uk&clear=true

Output before the product viewed ( you can see the footer is not hiddent)

Contact Us = ChennaReddyTraining@RRRS.CO.IN
Output after viewing the product “Skull 80 youth white XS” (The footer is hidden)

Note: - How to find what Components are there inside the Page?

hMC -- WCMS -- Pages


ID "contains" home
catalog version "is equal" apparel-ukContentCatalog - Online --> Search
Open homepage --> Content Slots

Here you can see list of all available components (Content Slots).

SiteLogo is the Content Slot... So you can see about this more as: -

--hMC -- WCMS -- Content Slots ............

Contact Us = ChennaReddyTraining@RRRS.CO.IN

You might also like