在此页面上:在Journey Optimizer中构建一个API触发的营销活动,以便您可以远程启动、更新和结束单个用户或受众的直播活动。
配置移动配置并实施Adobe Experience Platform移动SDK后,您可以在Journey Optimizer中开始创建实时活动:
-
访问 营销活动 菜单,然后单击创建营销活动。
-
选择 API触发 营销活动类型。
-
对于基于受众的营销活动,请选择 API 触发的营销
-
为各个营销活动选择API触发的事务型。
note important IMPORTANT 请注意,对于API触发的事务性,不应启用 高吞吐量 选项。
-
-
从 属性 部分,编辑营销活动的 标题 和描述。
-
在 操作 部分中,选择实时活动,然后选择或创建新配置。
在此页面上了解有关实时活动配置的更多信息。
-
单击 创建试验 开始配置内容试验并创建处理以测量其性能并为目标受众确定最佳选项。 了解详情
-
从 受众 选项卡中,选择您的 标识类型 了解更多。
note NOTE 对于 API触发的营销 营销活动,您可以在从API有效负载检查APNs channelID订阅之前,选择充当第一个分段的现有受众。 -
营销活动旨在按特定日期或循环频率执行。 在本节中了解如何配置促销活动的计划。
-
配置完毕后,单击查看以激活,然后单击激活。
-
激活营销活动后,使用提供的 cURL请求 作为模板来触发实时活动开始、更新或结束事件。 在执行之前,使用特定数据更新示例有效负载。
请确保您还复制要包含在有效负载中的 促销活动ID 标识符。
➡️请参阅API触发的营销活动文档以了解身份验证要求,包括OAuth令牌和API密钥。
accordion 单一用例的有效负载示例(API触发的事务型营销活动) 此有效负载示例适用于使用 API触发的事务性 营销活动类型的单个营销活动。 请注意,以下有效负载示例中的大多数字段是必填字段,只有
requestId、dismissal-date和alert是可选的。code language-json { "requestId": "your-request-id", "campaignId": "your-campaign-id", "recipients": [ { "type": "aep", "userId": "testemail@gmail.com", "namespace": "email", "context": { "requestPayload": { "aps": { "content-available": 1, "timestamp": 1756984054, // current epoch time "dismissal-date": 1756984084, // optional – auto remove when event="end" "event": "update", // start | update | end // Fields from FoodDeliveryLiveActivityAttributes "content-state": { "orderStatus": "Delivered" }, "attributes-type": "FoodDeliveryLiveActivityAttributes", "attributes": { "restaurantName": "Pizza", "liveActivityData": { "liveActivityID": "orderId1" // customer reference ID } }, "alert": { "title": "Order Delivered!", "body": "Your pizza has arrived." } } } } } ] }accordion 广播用例的有效负载示例(API触发的营销活动) 此有效负载示例适用于使用 API触发的营销 营销类型的基于受众的营销活动。
code language-json { "requestId": "123400000", "campaignId": "d32e6f6c-56df-4a98-a2c0-6db6008f8f32", "audience": { "id": "508f9416-52d0-4898-ba47-08baaa22e9c7" }, "context": { "requestPayload": { "aps": { "input-push-channel": "V+8UslywEfAAAOq9SbTrLg==", //apns-channel-id "content-available": 1, "timestamp": 1770808339, "event": "update", // start | update | end // Fields from GameScoreLiveActivityAttributes "content-state": { "homeTeamScore": 33, "awayTeamScore": 49, "statusText": "Wingdom keeps scoring!" }, "attributes-type": "GameScoreLiveActivityAttributes", "attributes": { "liveActivityData": { "channelID": "V+8UslywEfAAAOq9SbTrLg==" //apns-channel-id, must match the "input-push-channel" value } }, "alert": { "title": "This is the title for game", "body": "This is the body for body" } } } } }
设计实时活动后,您可以使用内置报告跟踪衡量实时活动的影响。
添加具有执行元数据的自定义数据 metadata
executionMetadata仅可用于 API触发的事务性 营销活动。使用可选的executionMetadata字段将您自己的 自定义数据 附加到配置文件,如订单ID、忠诚度级别或区域代码。 Journey Optimizer将此数据与执行一起存储,以便您以后可以从 实时活动反馈数据集 中检索它,并将交付结果与您自己的业务记录进行匹配。
要通过API发送此数据,请参阅executionMetadata字段🔗的消息传送API引用。 要重新读取设备上的值,请参阅关于从API触发器接收执行元数据的Mobile SDK指南。
要添加包含执行元数据的自定义数据,请执行以下操作:
-
将
executionMetadata添加到配置文件中userId和namespace旁边。 仅接受字符串键和字符串值,在发送之前将任何非字符串值转换为字符串。 -
这些值将完全按照发送时进行记录。
executionMetadata不支持个性化表达式,因此任何{{...}}表达式都会被视为文本而非已解析。 您应始终发送最终文本值。 -
每个配置文件最多可携带50个键/值对,所有键和值的组合大小限制为2 KB。 超过此限制的元数据将被丢弃,但仍会交付实时活动。 将有效负载限制为报告所需的信息。
在此示例中,orderId、tier、restaurant和region是您自己的值。 触发实时活动后,您可以从反馈数据集中读取这些信息,以将投放链接到您的订单记录。
| code language-json |
|---|
|
操作方法视频
了解如何使用 Adobe Journey Optimizer 配置 iOS 实时活动,以便在 iPhone 锁屏界面和灵动岛上提供丰富的实时更新。
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 build an API-triggered campaign in Journey Optimizer to remotely start, update, and end Live activities for individual users or audiences, and how to attach custom data to a profile using the optional
executionMetadatafield.
Intents:
- Create an API-triggered campaign for Live activities, selecting API-triggered Marketing for audience-based campaigns or API-triggered Transactional for individual campaigns
- Choose Live activity in the Actions section and select or create a configuration
- Create a content experiment with treatments to measure performance
- Activate the campaign and use the provided cURL request to trigger start, update, or end events
- Attach custom data to a profile using the optional
executionMetadatafield for later retrieval from the Live activity feedback dataset
Glossary:
- API-triggered Marketing: The campaign type used for audience-based campaigns (product-specific)
- API-triggered Transactional: The campaign type used for individual campaigns (product-specific)
- High Throughput: An option that should not be enabled for API-triggered Transactional Live activity campaigns (product-specific)
- Live activity: The action chosen in the Actions section, tied to a selected or newly created configuration (product-specific)
- executionMetadata: An optional field that attaches custom data to a profile, stored alongside the execution and retrievable from the Live activity feedback dataset (product-specific)
- Live activity feedback dataset: The dataset from which stored
executionMetadatavalues can be retrieved to match delivery results to your own records (product-specific) - event: The payload field whose values are
start,update, orend
Guardrails:
- For API-triggered Transactional campaigns, the High Throughput option should not be enabled.
executionMetadatais only available for API-triggered Transactional campaigns.executionMetadataaccepts only string keys and string values; convert any non-string value to a string before sending.executionMetadatadoes not support personalization expressions, so any{{...}}expression is treated as literal text rather than resolved.- Each profile can carry up to 50 key/value pairs in
executionMetadata(hard limit), with a combined size limit of 2 KB for all keys and values (hard limit). Metadata exceeding this limit is discarded, but the Live activity is still delivered. - In the unitary payload example, most fields are mandatory; only
requestId,dismissal-date, andalertare optional.
Terminology:
- Canonical name: Live activity — Acronym: n/a — variants: Live activities
- Synonyms: “Unitary use cases” = “individual campaigns (API-triggered Transactional)”
- Synonyms: “Broadcast use cases” = “audience-based campaigns (API-triggered Marketing)”
- Do not confuse: “API-triggered Marketing” (audience-based campaigns) ≠ “API-triggered Transactional” (individual campaigns)
- Do not confuse: “start” ≠ “update” ≠ “end” (the values of the
eventfield) - Do not confuse: “dismissal-date” (optional; auto-removes the activity when
eventisend) ≠ “timestamp” (current epoch time)
FAQ:
- Q: Which campaign type do I use for Live activities? — API-triggered Marketing for audience-based campaigns; API-triggered Transactional for individual campaigns.
- Q: Should High Throughput be enabled for API-triggered Transactional? — No; for API-triggered Transactional, the High Throughput option should not be enabled.
- Q: How do I trigger start, update, or end events after activation? — Use the provided cURL request as a template, update the sample payload with your specific data, and copy the Campaign ID into your payload.
- Q: What is
executionMetadatafor? — Attaching your own custom data, such as an order ID, loyalty tier, or region code, to a profile; it is stored alongside the execution and retrievable from the Live activity feedback dataset. It is only available for API-triggered Transactional campaigns. - Q: What are the
executionMetadatalimits? — Up to 50 key/value pairs per profile with a combined 2 KB size limit; only string keys and values are accepted, and personalization expressions are not resolved. Metadata exceeding the limit is discarded, but the Live activity is still delivered.