I want my component presentation to be personalized depending on a customer characteristic (userTypecustomerType). We show different component presentations depending different userTypecustomerType accessing to the page. User TypecustomerType will come from java backend logic(as of now I am bringing from URL request parameters).
I am done with following steps:-
Create Target Group.
Add Target group with a component presentation on the page.
Can any body please help me with the steps to be preformed further or provide me the documentation path? WhatWhat I am able to find is CD API com.tridion.personalization can anybody help me further and below is my code
<%@ page import="com.tridion.web.jsp.JSPPage,
com.tridion.personalization.CustomerCharacteristics,
com.tridion.user.User"%>
<%
JSPPage waiPage = new JSPPage(pageContext, "tcm:1-1-64");
CustomerCharacteristics customerCharacteristics = new CustomerCharacteristics(waiPage.getUser());
String custT = request.getParameter("customerType");
customerCharacteristics.setValue("customerType", custT);
customerCharacteristics.executeUpdate();
%>
<html>
<head></head><body>
<hr color="#000000" /> <center>
<h3><%="- " + customerCharacteristics.getValue("customerType")%> </h3>
<h3><%="---- :" + waiPage.getUser()%> </h3>
<div>
<!-- Below conditions updated ad per the suggestion provided by Bjørn van Dommelen -->
<tridion:TargetGroup itemURI="tcm:159-164141-64">
<tridion:Conditions negate="false" operator="AND">
<tridion:Condition type="CustomerCharacteristic" operator="=" negate="true" name="customerType" value="2"/>
</tridion:Conditions>
<div class="" role="main">
<table>
<tr>
<td >Branch</td>
<td ><div>abc</div></td>
</tr
</table>
</div>
</tridion:TargetGroup>
</div>
</center>
</body>
</html>`
I am getting my entries in CUSTOMER_CHARACTERISTICS and User table in Broker database. I think only think left now is condition.