问:是否有一种“开箱即用”的技巧可以根据特定 Sitecore 角色的成员为Email Experience Manager创建新的收件人列表?
我做了一些研究,EXM (ECM) 中的 ListManager 只允许导入 CSV 文件,而不与 Sitecore UserManager 模块集成。
基于这篇文章:http ://blog.boro2g.co.uk/sitecore-export-users-role/一个选项是实现从“角色成员”导出到 CSV 并将其导入 EXM 的 xDB。
问:是否有一种“开箱即用”的技巧可以根据特定 Sitecore 角色的成员为Email Experience Manager创建新的收件人列表?
我做了一些研究,EXM (ECM) 中的 ListManager 只允许导入 CSV 文件,而不与 Sitecore UserManager 模块集成。
基于这篇文章:http ://blog.boro2g.co.uk/sitecore-export-users-role/一个选项是实现从“角色成员”导出到 CSV 并将其导入 EXM 的 xDB。
首先,您需要将 User Role 字段添加到sitecore_analytics_index中的联系人。为此,您应该在(我假设您使用<fields hint="raw:AddComputedIndexField">的是 Lucene)部分添加一个新的计算字段。这是示例:Sitecore.ContentSearch.Lucene.Index.Analytics.config
<field fieldName="Contact.ProfileProperties.UserRole" emptyString="_EMPTY_" nullValue="_NULL_" storageType="YES" indexType="UNTOKENIZED">Your.Type.Name, Your.Assembly</field>
您的类型应该通过 id 获取索引用户的角色。
之后,向/sitecore/system/Settings/Rules/Definitions/Elements/Segment Builder添加一个名为“UserRole”的新条件,其中“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);
}
}
现在,您可以在分段列表中使用新的用户角色条件。
可以通过扩展 List Manager 的条件来完成:假设您将 Analytics DB 从 DMS 转换为 8 成功,并且您之前有与您的访问者用户相对应的联系人用户。您可以创建与某些角色相对应的联系人的“分段列表”。对于分段表,您应该创建新的自定义条件来过滤您的联系人。(逻辑可能很简单:您知道联系电子邮件,然后通过此电子邮件找到用户并检查他的角色)。