Skip to main content
Added JSP code
Source Link
Aman
  • 237
  • 1
  • 7

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.

I want my component presentation to be personalized depending on a customer characteristic (userType). We show different component presentations depending different userType accessing to the page. User Type will come from java backend logic. 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? What I am able to find is CD API com.tridion.personalization can anybody help me further.

I want my component presentation to be personalized depending on a customer characteristic (customerType). We show different component presentations depending different customerType accessing to the page. customerType 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.

What I am able to find is CD API com.tridion.personalization 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.

Added Full code wrapped in <tridion:TargetGroup> tag
Source Link
Aman
  • 237
  • 1
  • 7

I want my component presentation to be personalized depending on a customer characteristic (userType). We show different component presentations depending different userType accessing to the page. User Type will come from java backend logic. I am done with following steps:- Create Target Group.
Add Target group with a component presentation on the page.

condition will be used by Tridion CD APIs. Published page has my Component Presentation wrapped with tridion:TargetGroup tag below :-

        <div>
<tridion:TargetGroup itemURI="tcm:100-1000000-64">
    <tridion:Conditions negate="false" operator="AND">
    <tridion:Conditions negate="false" operator="OR">
    <tridion:Conditions negate="false" operator="AND">
    <tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="1"/>
    <tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="0"/>
    </tridion:Conditions>
    </tridion:Conditions>
    </tridion:Conditions>
    <form:form action="****" method="post" commandName="**"  id="location">
    <input type="submit" value="AppLoc" id="AppLoc" style="display:none;" />
    <div class="" role="main">
      <table>
        <tr>
             <td >Branch</td>
             <td ><div>abc</div></td>
          </tr
      </table>
     </div>
    </form:form>
    </tridion:TargetGroup>
</div>

Can any body please help me with the steps to be preformed further or provide me the documentation path? What I am able to find is CD API com.tridion.personalization can anybody help me further.

I want my component presentation to be personalized depending on a customer characteristic (userType). We show different component presentations depending different userType accessing to the page. User Type will come from java backend logic. I am done with following steps:- Create Target Group.
Add Target group with a component presentation on the page.

condition will be used by Tridion CD APIs. Published page has below :-

<tridion:Conditions negate="false" operator="AND">
<tridion:Conditions negate="false" operator="OR">
<tridion:Conditions negate="false" operator="AND">
<tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="1"/>
<tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="0"/>
</tridion:Conditions>
</tridion:Conditions>
</tridion:Conditions>

Can any body please help me with the steps to be preformed further or provide me the documentation path? What I am able to find is CD API com.tridion.personalization can anybody help me further.

I want my component presentation to be personalized depending on a customer characteristic (userType). We show different component presentations depending different userType accessing to the page. User Type will come from java backend logic. I am done with following steps:- Create Target Group.
Add Target group with a component presentation on the page.

condition will be used by Tridion CD APIs. Published page has my Component Presentation wrapped with tridion:TargetGroup tag below :-

        <div>
<tridion:TargetGroup itemURI="tcm:100-1000000-64">
    <tridion:Conditions negate="false" operator="AND">
    <tridion:Conditions negate="false" operator="OR">
    <tridion:Conditions negate="false" operator="AND">
    <tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="1"/>
    <tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="0"/>
    </tridion:Conditions>
    </tridion:Conditions>
    </tridion:Conditions>
    <form:form action="****" method="post" commandName="**"  id="location">
    <input type="submit" value="AppLoc" id="AppLoc" style="display:none;" />
    <div class="" role="main">
      <table>
        <tr>
             <td >Branch</td>
             <td ><div>abc</div></td>
          </tr
      </table>
     </div>
    </form:form>
    </tridion:TargetGroup>
</div>

Can any body please help me with the steps to be preformed further or provide me the documentation path? What I am able to find is CD API com.tridion.personalization can anybody help me further.

Source Link
Aman
  • 237
  • 1
  • 7

Personalization with Target Groups - Customer Characteristic

I want my component presentation to be personalized depending on a customer characteristic (userType). We show different component presentations depending different userType accessing to the page. User Type will come from java backend logic. I am done with following steps:- Create Target Group.
Add Target group with a component presentation on the page.

condition will be used by Tridion CD APIs. Published page has below :-

<tridion:Conditions negate="false" operator="AND">
<tridion:Conditions negate="false" operator="OR">
<tridion:Conditions negate="false" operator="AND">
<tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="1"/>
<tridion:Condition type="CustomerCharacteristic" operator="=" negate="false" name="customerType" value="0"/>
</tridion:Conditions>
</tridion:Conditions>
</tridion:Conditions>

Can any body please help me with the steps to be preformed further or provide me the documentation path? What I am able to find is CD API com.tridion.personalization can anybody help me further.