inAudience 函数 inAudience
inAudience函数是一个Adobe Experience Platform函数,可用于检查旅程中的个人是否属于特定受众。 借助这项强大的功能,您可以根据受众成员资格创建个性化的历程路径,从而在客户体验中实现复杂的分段和定位。
当您需要以下操作时,请使用inAudience函数:
- 基于受众成员资格的分支旅程路径。 了解详情
- 应用取决于配置文件是否属于特定区段的条件逻辑
- 使用个性化体验定位特定的客户组
- 评估历程条件中的实时受众参与
- 合并多个受众检查以创建复杂的定位规则
此函数实时评估受众成员资格并返回一个布尔值,使其非常适用于决策节点和条件表达式。 在Adobe Experience Platform中定义和管理受众(了解有关Journey Optimizer中使用受众的详细信息),表达式编辑器提供自动完成建议以帮助您准确引用受众。
受众状态:
受众可以有两种参与状态:
- 已实现:该个人符合受众定义的条件,并且是活动成员
- 已退出:个人已离开受众,不再符合条件
只有状态为 已实现 的个人才会被视为活动受众成员。 当函数返回true时,它确认个人已实现状态;当函数返回false时,它指示退出状态。 有关受众评估的详细信息,请参阅分段服务文档。
inAudience(<parameter>)| table 0-row-3 1-row-3 | ||
|---|---|---|
| 参数 | 说明 | 类型 |
| 受众 | 受众名称 | <string> |
重要约束:
- 受众名称必须为字符串常量
- 不能是字段引用或表达式
- 在一个历程中最多可检索100个受众
inAudience(<string>)
返回布尔值:
-
true:个人是受众的成员(已实现状态) -
false:个人不是受众的成员(退出状态)
inAudience("men over 50")
如果历程实例中的个人是名为“50岁以上的男性”的Adobe Experience Platform受众的一部分,则返回true,否则返回false。
实际用例:
| code language-none |
|---|
|
护栏和限制 guardrails
在您的历程中使用inAudience函数时,请注意以下护栏和限制:
受众检索限制:
- 在一个历程中最多可检索100个受众
- 表达式编辑器提供自动完成的可用受众列表,以帮助您正确引用它们
参数约束:
- 受众名称必须为字符串常量
- 不支持将字段引用和表达式作为参数
受众名称更改:
- 更改Adobe Experience Platform中现有受众的名称不会自动更新历程表达式中对该受众的任何引用
- 如果条件节点使用
inAudience('oldAudienceName'),则必须手动编辑表达式以使用新名称 - 未能更新受众名称将导致历程条件中断,并可能导致错误的历程行为
合并策略注意事项:
- 通过
inAudience函数使用多个受众时,与合并策略不一致可能会导致错误或警报 - 有关合并历程行为的详细信息,请参阅策略属性
传播计时:
在条件节点中使用inAudience()时,区段成员资格评估时间因条件在历程中的出现位置而异:
- 在读取受众历程中,等待活动开始之前: Journey Optimizer从用户档案的批量投影中读取。此投影中的数据在摄取后 2小时 内刷新。 依赖于基于天或基于时间的条件的受众可能会遇到额外的延迟。 在历程开始时添加短的等待活动,或允许缓冲时间以确保反映最新的区段成员资格。
- 在单一事件历程中或等待活动后:从流式传输(单一)投影读取区段成员资格。 数据通常在 15分钟 内可用。 有关更多详细信息,请参阅Adobe Experience Platform流式摄取文档。
相关主题
了解有关在Adobe Journey Optimizer中使用受众的更多信息:
- 关于受众 — 了解受众在Adobe Experience Platform和Journey Optimizer中的工作方式,包括如何创建和管理受众
- 读取受众活动 — 使用受众触发历程条目并使所有受众成员进入历程
- 受众资格事件 — 侦听受众的个人资料入口和出口,以实时触发历程操作
- 在条件中使用受众 — 使用优化活动,根据受众成员资格创建条件历程路径
- 历程属性 — 合并策略 — 了解在inAudience函数中使用多个受众时,合并策略的工作方式
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 documents the
inAudiencefunction, which checks in real-time whether a journey profile belongs to a named Adobe Experience Platform audience and returns a boolean used in journey conditions.
Intents:
- Branch a journey path based on whether a profile is a member of a specific audience using
inAudience - Combine multiple
inAudiencechecks with AND/OR logic to create complex targeting conditions - Verify that a profile has not entered a specific audience using a negation check (
inAudience("...") == false) - Understand the propagation timing differences between Read Audience journeys and unitary event journeys
- Identify and fix broken audience references caused by audience renames in Adobe Experience Platform
Glossary:
- Realized: Audience participation status indicating the individual currently qualifies for the audience definition and is an active member (product-specific)
- Exited: Audience participation status indicating the individual has left the audience and no longer qualifies (product-specific)
- Merge policy: A rule in Adobe Experience Platform that determines how profile data from multiple datasets is combined when evaluating audience membership (product-specific)
- Batch projection: The profile data store refreshed on a schedule (within 2 hours after ingestion) used by Read Audience journeys (product-specific)
- Streaming projection: The real-time profile data store (typically available within 15 minutes) used in unitary event journeys and after Wait activities (product-specific)
Guardrails:
- A single journey can retrieve up to 100 audiences
- The audience name parameter must be a string constant; field references and dynamic expressions are not supported
- Renaming an audience in Adobe Experience Platform does not automatically update
inAudiencereferences in journey expressions — manual updates are required - Inconsistent merge policies across multiple audiences used in the same journey can cause errors or alerts
Terminology:
- Canonical name: inAudience — Acronym: none — variants: inSegment (legacy name)
- Synonyms: “inAudience” = “audience membership check function”
- Do not confuse: “Realized” (active member) ≠ “Exited” (no longer a member)
- Do not confuse: “inAudience” (current function) ≠ “inSegment” (deprecated legacy function)
FAQ:
- Q: What does
inAudiencereturn when a profile has exited the audience? — It returnsfalse; only profiles with “Realized” status are considered active members and returntrue. - Q: How many audiences can I check in a single journey? — Up to 100 audiences can be retrieved within a single journey.
- Q: What happens if I rename an audience in Adobe Experience Platform after using it in a journey? — The journey expression is not updated automatically; you must manually edit the
inAudiencecall to use the new audience name, otherwise the condition will break. - Q: How quickly is audience membership available after a profile update in a Read Audience journey? — In a Read Audience journey before a Wait activity, data is read from the batch projection refreshed within 2 hours after ingestion.
- Q: Can I pass a profile attribute as the audience name parameter? — No, the audience name must be a string constant; field references and expressions are not supported.