Content

I have been developing and delivering Sitefinity Solutions to large international companies for over 8 years, some of the previous projects I delivered was for Kapersky, Symantec, Alvarion, HP, Nuance, Cisco and other large companies. In fact the product I developed and delivered those previous projects on was last year recognized by Forrester.

I have also been creating and architecting software solutions for over 15 years, in the Travel Industry and Marketing Industry.

For the last 8 years I have been developing PRM Applications ( Partner Relationship Management ) and MOM Applications( Marketing Operations Management ) Platforms.

For those 2 applications I used my combined skills of Sitefinity and Konfigure platforms.

Some of my core professional specialities at the moment are ( Sitefinity - www.sitefinity.com , Sitecore - www.sitecore.net and Konfigure - www.konfigure.com )

Tuesday 24 June 2014

Sitefinity 7 - Personalization

Recently I was looking at Sitefinity 7 and the use of Personalization and how you can extend it using Custom Characteristics as per this article.

Never used this part of Sitefinity before so at first I was a bit unsure, how things would fit together.  I will now try to share my experiences.  Including areas that I feel could be improved upon.

To Setup Sitefinity Personalization

Follow this steps.
  1. Create a User Segment     - Its just a group for the rules.
    1. Add Characteristic  - You can add one or multiple rules.
  2. Assign a User Segment To a Page

Sitefinity Personalization In a Nutshell

In basic terms when you assign a new user segment to a page, Sitefinity will create new Page Instance that will be shown based on the relevant Segment you have chosen.  At this point you can customise the Sitefinity page to your needs.

The diagram below demonstrates if you add 2 User Segments to a Homepage ( Europe and USA), and each segment contains different languages, how the structure may look like and what needs to be maintained.


Very quickly you can see how complicated this could become on a large Global site.  This is currently one of the downsides of maintaining the pages Personalization on Sitefinity, its not very easy to see what segments does a page have, unless you click further on the Personalization link.  This is a powerful bit of functionality, but could become very messy very quickly.

At the moment when you apply a Personalized Segment its difficult to know which Segments been applied.


 I personally think that the Segments for the page should be shown in a similar fashion to Translations, you can see at a glance what is translated or not. 

Content Personalization Using Custom Criteria

I was looking at this blog [Content Personalization Using Custom Criteria ] that explains how to add Custom Characteristics.  So I'm going to assume at this point you have added the code to the project and you have compiled successfully.  For my demo scenario, lets say you got a Global site and you may want to have different User Segments which are region based for the [ Home Page ].

When you have assigned a User Segment or Multiple Segments to a page, the way Sitefinity works with the custom code is as follow.

When the page loads, depending on how many segments you have applied to the page the following code will get called as many times as needed, so if you apply 2 User Segments and you are in debug mode you will see the code being hit twice.


   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using Telerik.Sitefinity.Personalization;
   6:   
   7:  namespace SitefinityWebApp.SalesForce.Personalization
   8:  {
   9:      public class SalesForceRatingEvaluator : ICriterionEvaluator
  10:      {
  11:          public bool IsMatch(string settings, IPersonalizationTestContext testContext)
  12:          {
  13:              string rating = "hot";
  14:   
  15:              //Get the current user
  16:              //rating = Request the rating of the user from SalesForce
  17:              if(rating.Equals(settings)){
  18:                return true;
  19:              }else{
  20:                return false;
  21:              }
  22:          }
  23:      }
  24:  }

At first I was rather confused to how this works, but once I understood what was happening, all you got to do, is to get the value of [ string settings ], and then you compare it to a Session or any other Value you may have for example Session["Region"], once you got a match you Return True, Sitefinity will then display the right Version of the page.

Please note that the value that comes from  [ string settings ]  will be a value that you have selected in the Personalization  >> Your Segment >> Your Characteristics, in my case my RegionID.


HTTP Error 500.19 - Internal Server Error - Sitefinity 7.0

When you do a fresh install, on a server sometimes you might come across the error [ HTTP Error 500.19 - Internal Server Error ].

This issue is quite easily resolved, all you have to do its to install the UrlRewrite.

http://www.microsoft.com/web/gallery/install.aspx?appid=urlrewrite2

This does the job most of the times.

Joaquim Ferreira - Sitefinity 7 Developer

Joaquim Ferreira - Sitefinity 7 Developer
Joaquim Ferreira - Sitefinity 7 Developer

Joaquim Ferreira - Sitecore 8 Developer

Joaquim Ferreira - Sitecore 8 Developer
Joaquim Ferreira - Sitecore 8 Developer