在此页面上:了解如何使用个性化编辑器添加、自定义和验证来自配置文件属性、受众、优惠决策和上下文属性等源的个性化表达式。
个性化编辑器是Journey Optimizer中个性化的核心。 它可在您需要定义个性化的每个上下文中使用,例如电子邮件、推送和选件。
在个性化编辑器界面中,您可以选择、排列、自定义和验证所有数据,为您的内容创建自定义个性化。
可在何处添加个性化 where
您可以使用
在电子邮件Designer中编辑电子邮件内容时,您可以使用上下文工具栏中的图标在大多数文本元素中添加个性化设置。
Journey Optimizer还允许您个性化邮件中的URL。 个性化 URL 可将收件人引导至网站的特定页面,或引导至个性化的微型网站,具体取决于轮廓属性。 了解详情
| note |
|---|
| NOTE |
| URL个性化可用于以下类型的链接: 外部链接、退订链接和选择退出。 |
Personalization源 sources
导航窗格允许您选择个性化的源。 可用源包括:
- 配置文件属性 :列出与Adobe Experience Platform数据模型(XDM)文档中描述的配置文件架构关联的所有引用。
- Target属性 :此文件夹特定于编排的营销活动。 它包含直接在营销活动画布中计算的属性。 了解如何在编排的营销活动中添加个性化
- 受众 :列出在Adobe Experience Platform分段服务中创建的所有受众。 请参阅Adobe Experience Platform分段文档以了解详情。
- 优惠决策 :列出与特定投放位置关联的所有优惠。 选择投放位置,然后在您的内容中插入选件。 有关如何管理优惠的完整文档,请参阅此部分。
- 上下文属性 :在历程或营销活动中使用渠道操作活动(电子邮件、推送、短信)时,与事件和属性相关的上下文属性可用于个性化。 本节中介绍了利用上下文属性的个性化示例。 此外,可以使用自定义操作响应进行个性化。 了解如何在本机渠道中使用自定义操作响应。
添加个性化 add
中央工作区是您构建个性化语法的位置。 若要使用属性来个性化您的消息,请将其定位到左侧导航窗格中,然后单击+按钮以将其添加到表达式中。
+图标旁边的省略号菜单允许您获取每个属性的更多详细信息,并将最常用的属性添加到收藏夹。 添加到收藏夹的属性可从导航窗格中的 收藏夹 菜单访问。
此外,您可以定义在字符串类型配置文件属性为空时显示的默认回退文本。 为此,请单击属性旁边的省略号按钮,然后选择插入后备文本。 写入配置文件属性值为空时默认显示的文本,然后单击添加。
在以下示例中,个性化编辑器允许您选择今天生日的用户档案,然后插入对应于今天的特定选件以完成自定义。
表达式编辑选项 options
中央工作区提供了各种工具来帮助您编写个性化表达式。
可用选项包括:
-
查找 / 查找并替换:搜索表达式并自动替换部分代码。
-
撤消 / 重做:撤消/重做上一个操作。
-
自动完成:在您键入时自动建议并完成代码。 此功能仅适用于 HTML 和文本格式,并支持轮廓和上下文属性。 如果通过切换禁用,编辑器将提供原生 HTML 代码自动完成。
{align="center" width="70%" modal="regular"}
-
HTML / JSON / 文本:标识代码格式。 这使系统能够根据所选语言调整验证和自动完成功能。
-
验证:检查表达式的语法。 有关详细信息,请参阅此部分。
-
另存为片段:将表达式另存为表达式片段。 在本节中了解详情
-
字体大小:调整编辑器内内容的字体大小,以提高可读性。
-
自动换行:启用或禁用自动换行,从而允许在编辑器中单行显示或自动换行的长表达式。 选项包括:
- 关(默认) — 无自动换行。 长线延伸到编辑器视图之外,需要水平滚动。
- On — 以编辑器的宽度换行。
- 自动换行列 — 当行字符达到80个字符时换行。
- 绑定 — 以编辑器宽度或80个字符(以较小者为准)换行。
-
Picks:将属性显示为紧凑的“Picks”,通过隐藏长属性路径来提高可读性。 单击属性以显示其完整路径。
note NOTE 此选项仅适用于配置文件属性、上下文属性和Dynamic Media。
在导航窗格中,提供其他功能以帮助您构建个性化表达式。
-
辅助函数 — 辅助函数允许您对数据执行操作,例如计算、数据格式或转换、条件,并在个性化上下文中处理这些操作。 了解有关可用辅助函数的更多信息
-
收藏夹 — 已添加到收藏夹的属性将显示在此列表中。 这允许您快速访问最常使用的项目。 若要向收藏夹添加属性,请单击省略号菜单,然后选择添加到收藏夹。
-
条件 — 利用在库中创建的条件规则将动态内容添加到消息中。 这允许您根据条件创建消息的多个变体。 了解如何创建动态内容
-
片段 — 利用已创建或已保存到当前沙盒的表达式片段。 片段是可重复使用的组件,可以在Journey Optimizer营销活动和历程中引用。 此功能允许预先构建多个自定义内容块,营销用户可以使用这些内容块在改进的设计过程中快速组合内容。 了解如何使用表达式片段进行个性化
在个性化表达式准备就绪后,需要由个性化编辑器验证该表达式。 有关详细信息,请参阅此部分。
验证机制 validation-mechanisms
单击 添加 按钮关闭编辑器窗口时,将自动执行表达式验证。 您还可以使用 验证 按钮检查个性化语法。
展开以下部分可查看验证个性化设置时可能发生的常见错误。
- 找不到“XYZ”路径
尝试引用架构中未定义的字段时。
在这种情况下,firstName1未定义为配置文件架构中的特性:
| code language-none |
|---|
|
- 变量“XYZ”的类型不匹配。 应为数组。 找到字符串。
当尝试对字符串而不是数组进行迭代时。
在这种情况下,product不是数组:
| code language-none |
|---|
|
- 无效的Handlebars语法。 找到
'[XYZ}}'
当使用了无效的Handlebars语法时。
Handlebars表达式用 {{expression}} 括起来
| code language-none |
|---|
|
- 区段定义无效
| code language-none |
|---|
|
对于选件,可能会发生特定错误。 有关更多详细信息,请展开以下部分:
与电子邮件或推送消息中的优惠集成相关的错误具有以下模式:
| code language-none |
|---|
|
验证是在验证个性化编辑器中的个性化内容期间执行的。
| table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 | |
|---|---|
| 错误标题 | 验证/解析 |
| 未找到id placementID和类型OfferPlacement的资源 未找到id为activityID且类型为OfferActivity的资源 |
检查ActivityID和/或PlacementID是否可用 |
| 无法验证资源。 | 投放位置中的componentType应与offerType选件匹配 |
| offerId中不存在公共URL。 | 图像选件(所有与决策和投放对关联的个性化和回退)应填充公共URL(deliveryURL不应为空)。 |
| 决策包含非配置文件属性。 | 选件模型用法应仅包含配置文件属性。 |
| 获取决策用法时出错。 | 当API尝试获取选件模型时,可能会发生此错误。 |
| 选件属性offer-attribute无效。 | 检查选件drp中引用的选件属性是否有效。 以下是有效的属性: 图像:deliveryURL、linkURL 文本:内容 HTML:内容 |
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: This page explains how to use the Journey Optimizer personalization editor to select, build, customize, and validate personalization expressions from sources including profile attributes, audiences, offer decisions, and contextual attributes.
Intents:
- Understand where personalization can be added in Journey Optimizer (messages, Email Designer, URLs, email configuration, offers)
- Select the appropriate personalization source for an expression
- Add attributes and build expressions in the editor workspace
- Use editor tools: Find/Replace, Auto complete, Validate, Pills, Save as fragment
- Use navigation pane features: Helper functions, Favorites, Conditions, Fragments
- Validate expressions and resolve common errors
Glossary:
- Personalization editor: The central UI tool in Journey Optimizer for building, customizing, and validating personalization expressions; available wherever personalization can be defined. (product-specific)
- Personalization sources: The data categories available for building expressions — Profile attributes, Target attributes, Audiences, Offer decisions, and Contextual attributes.
- Contextual attributes: Journey- or campaign-specific data (events, properties, custom action responses) available for personalization only when a channel action is used in a journey or campaign. (product-specific)
- Pills: A personalization editor display mode that renders long attribute paths as compact, clickable tokens for improved readability. Available only for profile attributes, contextual attributes, and dynamic media. (product-specific)
- Auto complete: An editor feature that automatically suggests and completes code as you type; available only for HTML and Text formats, supporting Profile and Context attributes only. (product-specific)
- Expression fragment: A reusable personalization expression component that can be referenced across campaigns and journeys. (product-specific)
- Fallback text: A default string displayed when a string-type profile attribute is empty for a given profile; configured per attribute via “Insert with fallback text”.
Guardrails:
- Auto complete is available only for HTML and Text formats; it supports Profile and Context attributes only.
- Pills display mode is available only for profile attributes, contextual attributes, and dynamic media.
- URL personalization is available for External link, Unsubscription link, and Opt-Out link types only.
- By default, the attributes pane shows only populated attributes; toggle off “Show only populated attributes” to display all schema attributes.
- Offers model usage must contain only profile attributes; non-profile attributes in a decision cause a validation error.
Terminology:
- Canonical name: personalization editor
- Do not confuse: Personalization editor (used to build content expressions in messages, emails, push notifications, and offers — supports both Handlebars and PQL syntax) ≠ Advanced expression editor (used in the journey for conditions on data sources and event information, custom wait activities, and action parameters mapping — provides built-in functions and operators that differ from those in the personalization editor)
- Do not confuse: Profile attributes (XDM schema-based, available in all contexts) ≠ Contextual attributes (journey/campaign-specific, only available in that context) ≠ Target attributes (Orchestrated campaigns only)
- Do not confuse: Auto complete for HTML/Text (suggests personalization attribute completions) ≠ native HTML code auto-completion (the editor default when the toggle is disabled)
FAQ:
- Q: Where can personalization be added in Journey Optimizer? — In any field with the add personalization icon — including the email subject line, push notification fields (Title, Body, Custom sound, Badges, Custom data), Email Designer text elements, URLs (External link, Unsubscription link, Opt-Out), email configuration subdomains/headers/URL tracking parameters, and offer text-type representations.
- Q: What are the available personalization sources? — Profile attributes, Target attributes (Orchestrated campaigns only), Audiences, Offer decisions, and Contextual attributes (journey/campaign events and custom action responses).
- Q: How is an expression validated? — Validation runs automatically when you click Add to close the editor. You can also trigger it manually with the Validate button. Common errors include: path not found (field not in schema), type mismatch (iterating a string as array), invalid Handlebars syntax, and invalid segment definition.
- Q: What does the Pills option do? — It renders long attribute paths as compact, clickable tokens for better readability in the editor. Available only for profile attributes, contextual attributes, and dynamic media.
- Q: Why do I see only some attributes in the attributes pane? — By default, the pane shows only populated attributes. Select the settings icon above the search field and toggle off “Show only populated attributes” to display all schema attributes.