Untitled Document
Table of contents | Next | Previous
Personalizing your site
WebSphere Portal implements rule-based content delivery through a feature
called personalization . By using personalization, you can customize the
content that a Web site shows automatically for each user. Personalization can
recognize a specific user based on a profile. It can also determine the
characteristics of a user based on previous purchases, products, or pages
viewed and then select content that is appropriate for that profile.
In this article, we discuss the following topics:
In the case of River Bend, a simple personalization rule and example is
implemented to better illustrate the concept. The personalization rule that is
implemented is based on dates. If the dates for accessing the site are within a
range of defined "summer dates", then the home page illustrates a summer-based
image of a refreshing iced coffee drink as shown in the following figure.
If the dates for accessing the site are within a range of defined "winter
dates", then the home page illustrates a winter-based image of a hot coffee
drink.

Overview of the personalization feature
You can find complete information about the rich set of capabilities that the
personalization feature provides in the WebSphere Portal information center at
the following address:
http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/p
zn/pzn_intro.html
A portlet can have a designated spot for rule-based content. For each spot, a
rule is selected. All rules are created based on the resource attribute
definition. These attributes are defined in a resource collection . The
resource collection is a set of Java classes that retrieve content that is
requested by the rule from the defined repository source. This back-end source
might be LDAP or SQL databases, the portal Java Content Repository (JCR),
Virtual Member Manager (VMM), or any other custom collection that is coded for
the personalization API. The JCR resource collection is provided with WebSphere
Portal as well as VMM. Wizards are available in Rational Application Developer
7 that guide developers in creating classes for other LDAP and relational
database resources. A guide of how to create these resources is described fully
in the WebSphere Portal Information Center.
Three types of rules are used to target select content to a certain group of
users:
- A select rule chooses content based on the attributes of the content. For
example, the GoldOffers rule selects products whose retail price is greater
than a certain amount. With IBM Workplace Web Content Management content, you
can also select content with a specific category. For example, a NonManager
rule gets content that is created with the HRNews template that has a category
of non-manager.
- A profiler rule profiles based on user attributes, date, and any other
information. This rule is used to decide which actions to take and which
policies to use. It gives a name to a set of conditions. For example, a user is
profiled as a premium user if the amount of the user's mortgage is over a
certain amount. Another example is if a user's order amount is over a certain
amount, then that user is profiled as a gold user . In addition, an employee
can be profiled as non-management if the employee's isManager attribute is set
to false.
- A binding rule ties the profile and select rules together. Premium users
see PremiumOffers, gold customers see GoldOffers, and non-manager employees see
NonManagement news. You do not have to coordinate the naming of the profile
with the select rule name. However, this convention helps when creating the
binding rule.
Any of these rules can be tied to a content spot. To enable your environment
to construct these rules, you must install and configure personalization in
Lotus Web Content Management.
Prior to Lotus Web Content Management version 6.0, content that existed on a
separate database had to be shadowed in the JCR database in order to work with
the personalization feature in WebSphere Portal. However, starting with Lotus
Web Content Management version 6.0 and later, the content resides on a JCR
database. Therefore, there is no need for shadowing. Moreover, the WCM resource
collection is available in the Personalization UI, after Lotus Web Content
Management is configured, starting from WebSphere Portal 6.0.
Creating a personalization rule
This section of the article discusses how to create a personalization rule
within the context of the River Bend site.
To create a personalization rule, write a select rule that retrieves all the
content from River Bend Site Area that is created using the General authoring
template.
1. Log in to WebSphere Portal.
2. Navigate to the Personalization Workspace.
3. Select New → Rule .
4. Enter a name for the new rule (for example, Get WCM Content).
5. Select 'Web Content' as the Resource Collection.
6. Select River Bend as the Location ( Site Area ).
7. Select the Authoring Template “General” from the Personalization Picker and
the resulting rule is shown in the figure below.

Figure Select Rule to get WCM content based on Authoring
template
8. Select 'Save'
9. To see that content is returned from this rule, select the Preview tab, as
shown in Figure below.

Figure – Results of the Select Rule
This Personalization Rule can now be displayed in a Personalization List
Portlet, referenced in an IBM Lotus Web Content Management component, or
included within a Content Spot on a Portal page.
Configuring the Personalized List portal
The Personalized List Portlet is installed with WebSphere Portal and can be
added to any Portal page. A portal page is configured within the
Personalization page with this list Portlet already on it when WebSphere Portal
is installed. It has many configuration options that enable you to use a rule
to show content quickly.
There are two configuration modes:
- One that configures the Spot information
- One that configures the Display Options
In order for these options to be displayed, on the Personalized List Portlet
Menu, select 'Configure' and the following screen is displayed.
Click the drop down that says '
Nothing Selected' and you are
provided with the following option, as shown in the figure below
Pick the Select content rule that you had created earlier and the following
screen is displayed, as shown in the figure below.
Figure Select Rule is chosen as the resource
To configure the display settings for Personalized List Portlet, do the
following:
- Click Display Options .
- Choose the Fixed Title attribute for the Title Attribute and choose the
Fixed Description attribute for the Detail Attribute.
- Select 'Locations' for the Categorization Attribute. This groups the
content under the site area structure.
- Click OK .

The following result is displayed, as shown in the figure below.

Figure Personalized List content
When you select a title, you get the detail attribute displayed for that title.
Note that this list does not use the site area and presentation template to
render the content. Instead, it uses just the attribute that you defined in the
Portlet configuration.
Only Select rule, Binding rule, content spots and custom JSP that has a content
spot can be verified using Personalized List portlet. Profiler rules cannot be
tested using this portlet.
Creating the Personalization Component
For the River Bend web site example, we will personalize an image in the
homepage. This image will be changed automatically based on the season we are
currently in. There will be two images, a winter image and a summer image. In
the example used, we show the Summer Drink image.
Using personalization rules, the content of the beverage of the current season
will be selected and the image will be displayed.
In order for us to create the Personalization component, we need to do the
following steps:
- Create select action rules
- Create profiler rule
- Create binding rule
- Create Personalization Component
Creating a selection personalization rule
To create a personalization rule, write a select rule that retrieves all the
content that has the category as Summer.
- Navigate to the Personalization Tab next to Web Content Management tab
and then to Business Rules. Refer to the Figure below:

Figure - Personalization tab
- Select New and choose Rule.
- Enter SummerDrinkRule in the Rule name
- Choose Select Action if it wasn't already selected
- Click on content* and change it to be Web Content
- Click on Attribute and change it to be Category
- Choose is exactly instead of is associated with
- Click on value*, choose Select category
- Navigate to the category Summer under SeasonDrink under Beverages under
Products
- Click Ok
The rule should look like the rule in the figure below:

Figure - Summer Selection Action Rule
- Click Save
- Repeat steps 2 through 11 to create the Winter Selection Rule. Its name
would be WinterDrinkRule and Category is
Winter
Creating a profiler personalization rule
Now, we will create the profiler rule that would set the present season
according to the current month.
- Select New and choose Rule .
- Enter SeasonsProfilerRule in the Rule name
- Choose Profiler
- Click on Profile* and type Winter
- Click Submit
- Click on attribute* and change it to be Date à Month
- Click on is and make it is between
- Add January in the first value and March the second value
- Click on add Condition and repeat steps 6-8 with the values October and
December
- Click on add Profile and type Summer
- Repeat steps 6-8 with values April and September
- Click Save
Creating a profiler personalization rule
Now, we will create the binding rule that binds together the action rules
with the profiler rule. The binding rule runs first the profiler rule, and
according to the profile selected, it will fire the action selector rule.
- Select New and choose Rule .
- Enter SeasonsBindingRule in the Rule name
- Choose Binding
- Click on Profiler*
- Click on Select Profiler and choose SeasonsProfilerRule
- Click Ok
- Click on Profile and choose Winter
- Click on DoAction and choose SummerDrinkRule
- Click on Profile and choose Summer
- Click on DoAction and choose WinterDrinkRule
- Click Save
Refer to the Figure below for the Binding Rule

Figure - Binding Rule
If we had already created the content with the matching categories, we can
view the content as shown in the Figure below by clicking on Preview

Figure - Binding Rule Viewer
A no content screen will be shown until we create content with those
categories.
Creating the Personalization Component
To display the result that was filtered based on the season, we create a
personalization component. The personalization component is very similar to the
menu component. We choose the starting point of our rules, in our case it is
the SeasonsBindingRule and we decide upon the display of the result.
For out example, we will be showing the image of the content in the home page.
Follow those steps, to create the personalization component :
- Navigate back to Web Content Management tab
- Click New and choose Component à Personalization .
- In the name field enter Pers-Seasons
- In the Personalization Element section, click on Search
- Choose SeasonsBindingRule
- Click OK
Note: You can create a new rule by clicking on the New*
button if it is just one simple rule.
- Add the following html in the design for each search result :
<a href="<Placeholder tag="href"/>">
<Element context="autoFill" type="content"
key="Image"/></a>
- Click Save and then click Save and Close .
We will be adding a reference to the personalization component from inside
the presentation template of the home page.
The end result
Once complete - the end result looks like this - notice the Personalization
"Summer Drink" image on the home page.
