Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • WebSphere Portal Family wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category IBM Redbooks: Building a Sample Website Using IBM Web Content Manager 7.0 IBM Redbooks: Building and Implementing a Social Portal IBM Redbooks: Developing Exceptional Multi-Channel Web Experiences V7: IBM Web Content Manager Product Documentation V7: IBM WebSphere Portal Enable for z/OS Product Documentation V7: IBM WebSphere Portal Express Product Documentation V7: WebSphere Portal Product Documentation V8: IBM Web Content Manager Product Documentation V8: IBM WebSphere Portal Express Product Documentation V8: IBM WebSphere Portal Product Documentation (includes z/OS) Custom Search Scope...
Search
Community Articles > WebSphere Portal > Personalization > Providing personalized content using IBM Web Content Manager 7.0 and the Personalization engine
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

IBM contributorLeslie Gallo
Contribution Summary:
  • Articles authored: 30
  • Articles edited: 14
  • Comments Posted: 0

Recent articles by this author

Collecting performance measurements of your IBM WebSphere - Java Virtual Machine

This article discusses an example of creating a collection of IBM WebSphere Portal performance measurements, using the Administrator Thin Client to running a jython script for collecting the desired data.

Integrating IBM WebSphere Portal 7 with Microsoft SharePoint 2010

This article explains how to integrate the portal frameworks between IBM WebSphere Portal, which is based on the J2EE programming model, and Microsoft SharePoint, which is based on the .NET programming model.

IBM WebSphere Portal 7 customization scenario: Part 1, Customizing a menu portlet

During an IBM WebSphere Portal implementation, customization is typically required in a few areas. This article explains how to build a customized WebSphere Portal menu in a JSR portlet, using WebSphere Portal 7 APISPIs.

Increasing the Search Engine Optimization ranking for IBM Web Content Manager Web sites

Learn how how you can remove both the traditional 301 (0 302) redirect from a Web site root to an IBM Web Content Manager URL and the common path part from the URL, such as wcpwcmconnectlibraryName.

Performance management tools for IBM WebSphere Portal

This document details the tooling that was used during a recent performancerelated customer engagement. It describes the tools and how they were used to evaluate IBM WebSphere Portal 7 performance problem determination issues.

Community articleProviding personalized content using IBM Web Content Manager 7.0 and the Personalization engine

Added by IBM contributor Leslie Gallo | Edited by IBM contributor DeAnna Steiner on July 2, 2012 | Version 5
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
This article provides a hands-on exercise for using IBM® Web Content ManagerTM 7.0 and Personalization rules to provide personalized content functionality for a Web Content Manager-driven portal.
Tags: personalization, personalization rules, pzn-portal, pzn-wcm, 7.0
ShowTable of Contents
HideTable of Contents
  • 1 Introduction
    • 1.1 Personalization overview
  • 2 Example of providing personalized content
    • 2.1 Setting up for the example
    • 2.2 Creating users
  • 3 Creating the content
    • 3.1 Creating Authoring template
    • 3.2 Creating Site Area
    • 3.3 Creating Content items
    • 3.4 Creating Personalization rule
    • 3.5 Testing the Personalization rule
    • 3.6 Creating the WCM personalization component
    • 3.7 Testing the personalized content
  • 4 Conclusion
  • 5 Resources
  • 6 About the author

Introduction


Personalized content is highly demanded in all content-driven portals to better guide you to your area of interest; for example, a corporate portal would display alerts for managers other than those for employees, and an Airlines portal would better display holiday offers for destinations to which you can fly from your current location. Another eCommerce portal would better display commercial advertisements available in your area, etc.

IBM® Web Content ManagerTM (WCM) provides the content and can be combined with Personalization rules based on site visitor profile attributes to decide which content is displayed to which user profiles.

Using a hands-on exercise, this article shows how to use WCM 7.0 and Personalization rules to provide personalized content functionality for a WCM-driven portal. It is intended for content designers who are interested in implementing Personalized sites using WCM 7.0.

To get the most from this article, you should be familiar with WCM components and the personalization engine, and have high-level knowledge of IBM WebSphere® Portal Administration.

Personalization overview


Personalization in WebSphere Portal is used to automatically customize a Web site for individual users and groups. There are three types of Personalization in WebSphere Portal:
  • Simple filtering. In this type, content (pages, portlets, WCM elements, etc.) is displayed based on user access rights; for example, the managers group can view more links and content than the employees group.
  • Rule engine. In this type, content is provided based on business rules that define what content should be displayed when a specific profile visits the site.
  • Collaborative filtering. In this type, users rate content items (for example, products) and visitors receive content based on the ratings of others.
We focus on the second personalization technique (rule engine) in this article.

For more information about Personalization in WebSphere Portal, refer to the Personalization Overview topic in the IBM Web Content Manager 7 product documentation.

Example of providing personalized content


In this example we develop a personalized content component to display a set of customized content for site visitors according to their country of residence. This depends on the user profile attribute countryName.

Though this example is meant to be a simple demonstration of integrating WCM and Personalization rules, in real scenarios the same technique can be extended to make complex business rules based on combinations of user profile attributes that could be customized according to business schema.

Setting up for the example


In this example we need to create a few users with different countries of residence. To do this we use the default registration portlet, even though by default this portlet doesn't display a field to accept the input of countryName attribute.

Figure 1. Default registration portlet



So, we must configure this portlet to display an input field to capture a user's country during the registering or profile editing process. To do this, follow these steps:
  1. Log in to WebSphere Portal as an Admin user and navigate to the Administration tab.
  2. Go to the Portlets section and search for the Profile Management portlet.
  3. Click the wrench button to configure the portlet.
  4. Navigate to second properties page and edit the preference “wps.portlets.displayed_user_attributes”.
  5. Add “,countryName” to the end of the list of displayed attributes in the Value section.
  6. Click OK to save the changes and OK again to close the portlet configuration window.
Now if you log out and return to the Sign Up page, you will see that a new input field, countryName, has been added to registration form (see figure 2).

Figure 2. Registration portlet with countryName field added

Creating users


Let's create three users to represent users from different countries to be used in the example (you can also create one user only and change his countryName attribute via Edit profile, as needed).
  1. Navigate to the Sign Up page.
  2. Fill in the form with proper values and enter “Egypt” in the countryName input field.
  3. Click OK to create the user.
  4. Repeat Steps 1---3 to create two more users with countries “Qatar” and “UAE” in the countryName input fields.

Creating the content


In this step we create a few content items to represent our commercial offers and add to each offer the set of countries in which the offer is valid. This value will be used later to compare to visitors' countryName attribute to display the list of offers available in his country.

Creating Authoring template


The first step toward creating content is to create an authoring template, “Personalized Content”.
  1. Log in to WebSphere Portal as a WCM administrator user.
  2. Select Applications --- Content --- Web Content Management.
  3. Click New --- Authoring Template, and enter the name and description, as shown in figure 3.
Figure 3. Authoring Template window



4. Select More Actions –- Manage Elements, to define the elements within this Authoring template, and add the element types as shown in figure 4.

Figure 4. Element types



5. Click OK, and then save the authoring template.

Creating Site Area


In this step we create a Site Area in which to group the personalized content items.
  1. On the WCM landing page, select New --- Site Area (this Site Area is used to group the personalized content).
  2. Fill in the new Site Area form as shown in figure 5.
Figure 5. Site Area form



3. Edit the Access settings in the Properties tab to make the Site Area accessible for all authenticated users; save and close the Site Area.

Creating Content items


Now we create some content items to represent personalized content items valid in some countries.
  1. While you are on the WCM landing page, select New --- Content.
  2. Select Personalized Content AT in the Authoring Template selection window and click OK.
  3. Fill in the fields of the Content item with valid data, and enter “Egypt” in the ValidityCountry field.
  4. Select Personalized Content site area as the location of the content.
  5. Select Express Workflow in the Workflow section, to directly publish the content
  6. Save and close the Content item.
  7. Follow Steps 1---6 to create a few more content items that are valid in the other countries, Qatar and UAE.
  8. Do the same to create some Content items with the word “any” in the ValidityCountry field,
  9. Do the same to create some content items that are valid in more than one country, for example, Egypt and Qatar, or Qatar and UAE.
Steps 8 and 9 above are performed to test the behavior of the Personalization engine. Also, in real-life scenarios you might have content that is valid for all users or subsets of them, so this simulates this case. Figure 6 shows the five Content items created.

Figure 6. Content items

Creating Personalization rule


In this step we create the business rule that will be used to personalize the content rendering.
  1. Log in to WebSphere Portal as administrator and select Applications --- Content --- Personalization --- Business Rules.
  2. Select News --- Rule, and fill in the details of the new rule name, description, and location.
  3. Select “Select Action” as the Rule type.
  4. Select the “Personalized Content” Site Area as the Location attribute. To do this, click on the word “value”, and click the “Select Location” menu item. This step guides the business rule to search and collect only those Content items under the Personalized Content Site Area, thus improving performance.
To customize the rule we need to confirm that the content parameter “ValidityCountry” contains the logged-in user's country. To do this, follow these steps:
  1. Click on the word “attribute” and select Authoring Template Properties --- Personalized Content AT --- Validity Countries (see figure 7). Click on the word “is” and select “includes” instead of is.
  2. To specify the value, click on the small arrow beside the word “value” and select Portal Users --- countryName.
Figure 7. Business rule customization



3. Add another condition to select content with no specific country as well:
a) Click “Add Condition” and select the “Validity Country” authoring template attributes.
b) Click on the word “value” to display a text field in which to enter the value; type “any” and click Submit to create the condition.
c) Change the “and” operator to “or”, to indicate that the union of the two conditions should be returned.
d) Select “Save” to create the new rule; it should like like figure 8.
Figure 8. View Rule tab of Personalization Editor window

Testing the Personalization rule


After saving the business rule, we can test it from the Preview tab, which displays a list of content items selected by application of this business rule.

1. Select the Preview tab while logged in as an administrator; this displays only the “General Content” record (see figure 9).

Figure 9. Preview tab with General Content record (countryName is empty)


2. Edit the user's profile, adding “Egypt” to the countryName attribute, and again preview the business rule. Three records, Egypt Content 1, Egypt Content 2, and General Content, display (see figure 10).

Figure 10. Preview tab with Egypt records (countryName is Egypt)



3. Edit the profile again, entering Qatar as the countryName, and preview the rule; figure 11 shows the result.

Figure 11. Preview tab with Qatar records (countryName is Qatar)



So this confirms that the business rule is working correctly and is selecting the correct content according to the logged in user's country and the Validity Country attribute of the content. The next step is to integrate this rule with WCM to render the selected content.

Creating the WCM personalization component


To render the personalized content we use the WCM Personalization component. This component is much like the Menu component, except it is based on a Personalization rule and, as is the case with the Menu component, you must enter Header, Body, and Footer for the results:
  1. Navigate to Applications –- Content --- Web Content Management.
  2. Select New --- Component --- Personalization.
  3. Fill in the name and description fields on the new Personalization component.
  4. In the Personalization Element section, click Search, select the PersonalizedContentRule we created in the previous step, and click OK.
  5. In the Header section, enter the markup for the header as follows:
<table cellspacing=5 cellpadding=0 border=1 style="width:500px;font-
family:Tahoma;font-size:small;"> <tr><td colspan=2 style="padding: 10px;text-
align:center;background-color: #BCD2EE;"><b>Personalized Content for your
area<b></td><tr>

6. In the “Design for each menu result” section enter
<tr>
<td style="width: 30%;padding: 10px;text-align:center;background-color:#EBECE4;">
	[Element context="autofill" type="content" key="Image"] </td>
<td style="padding: 10px;">
	<b>[Element context="autofill" type="content" key="Title"]</b>
	<br><br>
	[Element context="autofill" type="content" key="Details"]
</td>
</tr>
7. In the Footer section enter , to close the table.
8. Navigate to the Properties tab and check the Access section, making sure that the component is available for All Authenticated users.
9. Save and close the component.

Next, we render the content on some test page, using Web Content Viewer and following these steps:
  1. Navigate to Portal Administration --- Manage Pages, and create a New page under the Home label.
  2. Fill in the necessary fields to create a new Standard Portal Page.
  3. After creating the page, edit its access rights to make it available for all authenticated users.
  4. Edit the layout of the page by clicking the Edit button (the pencil icon).
  5. Select Add Portlet, select Web Content Viewer (JSR 286), and click OK.
  6. Press Done to confirm deploying the portlet instance to the page.
  7. Edit the page layout again to configure the Content Viewer Portlet to render the Personalization component.
  8. Select Edit Shared Settings from the portlet instance context menu and configure the portlet instance as shown in figure 12.
Figure 12. Web Content Viewer instance configuration


9. Click OK to save the shared settings, and click Done to close page layout editing.

Testing the personalized content


Now it's time to test the personalized content by logging in with the different users we created earlier in this exercise (you can also use one user and modify their countryName attribute from the Edit Profile page). You will see how the personalized component dynamically changes the list of displayed content items according to the logged-in user:
  1. Log in with EgyptUser and navigate to the Personalized Content page. Note that there are three Content items rendered in the menu, two of which are related to Egypt and one is General (for all users), as shown in figure 13.
Figure 13. Personalized content for EgyptUser


2. Now log in with QatarUser and navigate to Personalized Content page (see figure 14).

Figure 14. Personalized content for QatarUser


3. Finally, log in with UAEUser and navigate to Personalized Content page (see figure 15).

Figure 15. Personalized content for UAEUser


Conclusion


The Personalization engine within IBM WebSphere Portal is used to build business rules based on user profile attributes and various other factors. These business rules can be used to personalize the WebSphere Portal site in many ways to better serve business needs.

In this article, we have discussed an example of using business rules to personalize content that is displayed to users based on their country. It's meant to be simple, to demonstrate the use of personalization with WCM 7.0, and you can use the same technique in real-life implementations by adopting a more robust design.

Resources

  • IBM Web Content Manager 7.0 product documentation
  • developerWorks WebSphere Portal zone
  • Portal and Porlet Development forum
  • Participate in the discussion forum

About the author


Mahmoud Matouk currently works as a Senior SOA and WebSphere Portal specialist and as a Subject Matter Expert (Portal & WCM) at GBM Qatar (IBM business partner). He previously worked as a Software Engineer at IBM Egypt in the Cairo Technology Development Center and has more than 7 years of experience in implementing WebSphere Portal and SOA solutions.


  • Edit
  • More Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (5)
collapsed Versions (5)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (5)Jul 2, 2012 5:28:11 PMDeAnna Steiner  IBM contributorChanged category and tags
4Dec 6, 2011 2:15:54 PMLeslie Gallo  IBM contributor
2Dec 6, 2011 2:05:51 PMLeslie Gallo  IBM contributor
1Dec 6, 2011 1:16:40 PMLeslie Gallo  IBM contributor
1Dec 6, 2011 1:52:51 PMLeslie Gallo  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use