【问题标题】:EXM 8.1: Easy way to create a recipient list based on members of a certain Sitecore role?EXM 8.1:基于特定 Sitecore 角色的成员创建收件人列表的简单方法?
【发布时间】:2016-04-14 07:38:33
【问题描述】:

问:是否有一种“开箱即用”的技巧可以根据特定 Sitecore 角色的成员为 Email Experience Manager 创建新的收件人列表?

我做了一些研究,EXM (ECM) 中的 ListManager 只允许将联系人导入 CSV 文件,而没有与 Sitecore UserManager 模块集成。

根据这篇文章:http://blog.boro2g.co.uk/sitecore-export-users-role/ 一个选项是实现从“角色成员”导出到 CSV 并将其导入 EXM 的 xDB。

【问题讨论】:

    标签: sitecore sitecore8 sitecore-ecm sitecore-exm


    【解决方案1】:

    首先,您需要将用户角色字段添加到 sitecore_analytics_index 中的联系人。为此,您应该在Sitecore.ContentSearch.Lucene.Index.Analytics.config<fields hint="raw:AddComputedIndexField"> 部分添加一个新的计算字段(我假设您使用的是Lucene)。

    以下是示例:

    <field fieldName="Contact.ProfileProperties.UserRole" emptyString="_EMPTY_" nullValue="_NULL_" storageType="YES" indexType="UNTOKENIZED">Your.Type.Name, Your.Assembly</field>
    

    您的类型应该通过 id 获取索引用户的角色。

    之后,将名为“UserRole”的新条件添加到 /sitecore/system/Settings/Rules/Definitions/Elements/Segment Builder,其中“Text”字段为:

    where the userrole [operatorid,StringOperator,,compares to] [value,,,specific userrole]
    

    并且“类型”指向您的自定义类,如下所示:

    public class UserRoleCondition<T> : TypedQueryableStringOperatorCondition<T, IndexedContact> where T : VisitorRuleContext<IndexedContact>
    {
        protected override Expression<Func<IndexedContact, bool>> GetResultPredicate(T ruleContext)
        {
            var userrole = this.Value ?? string.Empty;
    
            return
                this.GetCompareExpression(
                    c => (string)c[(ObjectIndexerKey)"contact.profileproperties.userrole"], userrole);
    
        }
    }
    

    现在您可以在分段列表中使用新的用户角色条件。

    【讨论】:

    • 感谢您的解决方案 Dylevich,非常有帮助!问候
    【解决方案2】:

    可以通过扩展列表管理器的条件来完成: 假设您将 Analytics DB 从 DMS 转换为 8 是成功的,并且您之前有与您的访问者用户相对应的联系人用户。您可以创建与某些角色相对应的联系人的“分段列表”。对于分段表,您应该创建新的自定义条件来过滤您的联系人。 (逻辑可能很简单:您知道联系电子邮件,然后通过此电子邮件找到用户并检查他的角色)。

    【讨论】:

    • 谢谢安东,你的回答很有用!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-10
    • 1970-01-01
    • 2012-09-14
    • 2014-09-24
    • 2020-12-05
    相关资源
    最近更新 更多