ECM SegmentATION MOdule

  0 rating
12/4/2012 6:40:10 AM
4/17/2015 1:39:26 PM
Provider: Sitecore


The Sitecore Email Campaign Manager (ECM) is a full-featured email marketing tool built into the Sitecore Customer Engagement Platform (CEP). The ECM Segmentation Module extends Email Campaign Manager and provides the ability to segment email recipients based on conditions.

The ECM Segmentation Module gives email marketers the capability to specify filtering criteria ― for example, based on custom fields or language ― for a selected Target Audience (role). Using this capability, email marketers can target specific sets of email recipients and increase the effectiveness of the email channel.

The module provides a “Segment” button in the ECM user interface so that the email marketer can easily specify the segmentation criteria as part of the process of building the email. An option to preview the segmented recipients is available, providing a user friendly approach for the email marketer to view recipients that match the specified segmentation criteria.

Because the dialog window and conditions that are presented to the email marketer can be finely customized, this tool is user friendy and makes it quick and easy for the email marketer to create or reuse segmentation criteria.

The module is tested on:


  • E-mail Campaign Manager version 1.3.0 rev.110707
  • E-mail Campaign Manager version 1.3.1 rev.111202
  • E-mail Campaign Manager version 1.3.2 rev.120307
  • E-mail Campaign Manager version 1.3.2 rev.120424
  • E-mail Campaign Manager version 1.3.3 rev.121017


Note that because the number of email recipients can vary widely from one Sitecore installation to another, the best practice is to test the performance of the ECM Segmentation Module for your actual conditions and number of recipients prior to use in production.


  • Documentation > Installation

    !!!Backup before installation!!!


    The module is tested with Sitecore CMS 6.5 or 6.6 with Email Campaign Manager 1.3.*. running Microsoft .NET framework 3.5 sp1 or 4.0.



    Install Sitecore EmailCampaign Segment Module with Sitecore Installation Wizard.

     - Override files
     - Merge/clear items.




  • Documentation > How to use the module
    How to use the module

    Once installed you will notice that Target Audience's and Newsletter's data templates has been extended with a Rules-field.


    If you select an existing Target Audience and click the content tab, you will find the Rules-field. If you click edit on the field you will get a set of conditions that can be used with this module. If there are any conditions added on Target Audience level, then these conditions will be used against all newsletter in the selected Target Audience. This way you can have one role used by all Target Audiences and segment on each individual Target Audience. For example have one Target Audience for males, and another for females.



    If you select a newsletter item, you will find a Rules-field on the content tab, exactly as Target Audience. If you switch to "Message Preview" tab you will find a "Segment" button and a "Enable segmentation in preview" checkbox.

    The "Segment" button will allow you to specify conditions on newsletter level. If there are any conditions on Target Audience level then these conditions will be merge with conditions specified on the newsletter. For example we could have a conditions on Target Audience that segment males, and on the newsletter we could have a condition that segment recipients over the age of 50. When this newsletter is dispatched both conditions will be merge and evaluated against all recipients in the Target Audience Role, so only males over 50 will receive the newsletter.


    The "Enable segmentation in preview" checkbox will dictate if conditions shall be evaluated in preview mode. This is by default unchecked for performance reasons. If it's checked you can see how many recipients that conforms to the specified conditions, and therefor how many recipients the newsletter will be send to when dispatched.


    The checkbox doesn't control if the conditions is used when the newsletter is dispatched - they will.



    Module settings

    The package also installs a "E-mail Campaign Manager Segment" settings item. On this item you can control if you want to have "Enable segmentation in preview" checkbox checked by default, and if you want to enable some additional logging. Logging will tell you how much time the module takes to evaluate the specified conditions in the log-files.

    The settings item can be found here : Master : /sitecore/system/Modules/E-mail Campaign Manager Segment



    The module ships with some conditions that are specific for this module. They can be found here : master : /sitecore/system/Settings/Rules/Email Campaign Manager/Conditions


    Conditions can of course be custom built and added to fit business requirements. All custom conditions has to be created underneath this path : master : /sitecore/system/Settings/Rules/Email Campaign Manager/Conditions

    The module will added each recipient as a contact when the condition is evaluated. So you will have to fetch the contact to evaluate against.




    public class UserFieldIntCondition<T> : IntegerComparisonCondition<T> where T : RuleContext


        public string Fieldname { get; set; }

        protected override bool Execute(T ruleContext)


            Contact contact = (Contact)ruleContext.Parameters["contact"];

            if (contact == null)

                return false;


            int number;

            string profileFieldValue = contact.Profile.GetCustomProperty(Fieldname);

            if (int.TryParse(profileFieldValue, out number))


                return base.Compare(number);


            return false;




Release notes
Added 4. dec 2012
Read more Back
Code examples

Solution screenshots(0)


Reviews (0)

Sort by: Date Most votes
  • Profile Avatar

    Level: 0

    x0 x0 x0




    Was this helpful?


Comments (0)

Sort by: Date  Most votes

Leave a Comment

Comment must be field in
Post comment

Write a review

Title can't be empty
Review can't be empty
Post review


Title Description Download Action

Add File