ライブアクティビティの作成 create-mobile-live

このページ: Journey Optimizer で API トリガーキャンペーンを作成して、個々のユーザーまたはオーディエンスのライブアクティビティをリモートで開始、更新、終了できるようにします。

モバイル設定を指定し、Adobe Experience Platform Mobile SDK を実装したら、Journey Optimizer でライブアクティビティの作成を開始できます。

  1. キャンペーン​メニューにアクセスし、「キャンペーンを作成」をクリックします。

  2. API トリガー​キャンペーンタイプを選択します。

    • オーディエンスベースのキャンペーンには、「API トリガーマーケティング」を選択します

    • 個々のキャンペーンには、「API トリガートランザクション」を選択します。

    note important
    IMPORTANT
    API トリガートランザクション​には、「高スループット」オプションを有効にしないでください。

  3. プロパティ」セクションで、キャンペーンの「タイトル」と「説明」を編集します。

  4. アクション」セクションで、「ライブアクティビティ」を選択し、新しい設定を選択または作成します。

    ライブアクティビティの設定について詳しくは、このページを参照してください。

  5. 実験を作成」をクリックしてコンテンツ実験の設定を開始し、パフォーマンスを測定してターゲットオーディエンスに最適なオプションを特定するための処理を作成します。 詳細情報

  6. オーディエンス」タブから、ID タイプ​を選択します 詳細情報

    note
    NOTE
    API トリガーマーケティング​キャンペーンの場合、API ペイロードから APNs channelID サブスクリプションを確認する前に、最初のセグメントとして機能する既存のオーディエンスを選択できます。
  7. キャンペーンは、特定の日付に実行するか、繰り返し頻度で実行するように設計されています。 キャンペーンの​ スケジュール ​を設定する方法については、この節を参照してください。

  8. 設定が完了したら、「レビューしてアクティブ化」をクリックし、「アクティブ化」をクリックします。

  9. キャンペーンをアクティブ化したら、指定された cURL リクエスト​をテンプレートとして使用して、ライブアクティビティの開始、更新、終了イベントをトリガーします。 実行前に、特定のデータでサンプルペイロードを更新します。

    また、ペイロードに含める​キャンペーン ID 識別子もコピーします。

    ➡️ OAuth トークンや API キーを含む認証要件について詳しくは、API トリガーキャンペーンドキュメントを参照してください。

    accordion
    単一ユースケース用のペイロードの例(API トリガートランザクションキャンペーン)

    このペイロードの例は、API トリガートランザクション​キャンペーンのタイプを使用する個々のキャンペーン用です。 次のペイロード例のフィールドのほとんどは必須で、requestIddismissal-datealert のみがオプションです。

    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"
                    }
                }
            }
        }
    }
    

ライブアクティビティをデザインしたら、ビルトインのレポートを使用してライブアクティビティの影響の測定を追跡できます。

TIP
ライブアクティビティが期待どおりに表示されないか、更新されない場合、ステップバイステップのデバッグガイダンスについて詳しくは、ライブアクティビティのトラブルシューティングを参照してください。

実行メタデータを使用したカスタムデータの追加 metadata

AVAILABILITY
executionMetadataは、API トリガートランザクション キャンペーンでのみ使用できます。

オプションのexecutionMetadata フィールドを使用して、注文ID、ロイヤルティ層、地域コードなどのプロファイルに独自の​ カスタムデータ ​を添付します。 Journey Optimizerは、このデータを実行と並行して保存するので、ライブアクティビティフィードバックデータセット​から後で取得し、配信結果を独自のビジネスレコードに一致させることができます。

このデータをAPI経由で送信するには、executionMetadata フィールド 🔗のMessaging API リファレンスを参照してください。 値をデバイスで読み返すには、Mobile SDK ガイドで、API トリガーから実行メタデータを受け取ることについて説明しています

実行メタデータを含むカスタムデータを追加するには:

  • executionMetadatauserIdnamespaceの横にあるプロファイルに追加します。 文字列キーと文字列値のみが受け入れられ、文字列以外の値を文字列に変換してから送信します。

  • 値は送信時とまったく同じように記録されます。 executionMetadataはパーソナライゼーション式をサポートしていないため、{{...}}式は解決済みではなくリテラルテキストとして扱われます。 常に最終的なリテラル値を送信する必要があります。

  • 各プロファイルは、最大​ 50個のキーと値のペア ​を持つことができ、すべてのキーと値の合計サイズ制限は​ 2 KB ​です。 この制限を超えるメタデータは破棄されますが、ライブアクティビティは引き続き配信されます。 レポート目的で必要な情報にペイロードを制限します。

JSONの例

この例では、orderIdtierrestaurantおよびregionは独自の値です。 ライブアクティビティがトリガーされたら、フィードバックデータセットから読み取り、配信を注文レコードにリンクできます。

code language-json
{
    "requestId": "your-request-id",
    "campaignId": "your-campaign-id",
    "recipients": [
        {
            "type": "aep",
            "userId": "testemail@gmail.com",
            "namespace": "email",
            "executionMetadata": {
                "orderId": "A-123",
                "tier": "gold",
                "restaurant": "PizzaPlace",
                "region": "EU"
            },
            "context": {
                "requestPayload": {
                    "aps": {
                        "content-available": 1,
                        "timestamp": 1756984054,
                        "dismissal-date": 1756984084,
                        "event": "update",
                        "content-state": {
                            "orderStatus": "Delivered"
                        },
                        "attributes-type": "FoodDeliveryLiveActivityAttributes",
                        "attributes": {
                            "restaurantName": "PizzaPlace",
                            "liveActivityData": {
                                "liveActivityID": "orderId1"
                            }
                        },
                        "alert": {
                            "title": "Order Delivered!",
                            "body": "Your pizza has arrived."
                        }
                    }
                }
            }
        }
    ]
}

チュートリアルビデオ

iOS ライブアクティビティを Adobe Journey Optimizer と連携して設定し、iPhone のロック画面と Dynamic Island でリッチなリアルタイム更新を提供する方法について説明します。

AI Knowledge Reference

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 executionMetadata field.

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 executionMetadata field 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 executionMetadata values can be retrieved to match delivery results to your own records (product-specific)
  • event: The payload field whose values are start, update, or end

Guardrails:

  • For API-triggered Transactional campaigns, the High Throughput option should not be enabled.
  • executionMetadata is only available for API-triggered Transactional campaigns.
  • executionMetadata accepts only string keys and string values; convert any non-string value to a string before sending.
  • executionMetadata does 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, and alert are 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 event field)
  • Do not confuse: “dismissal-date” (optional; auto-removes the activity when event is end) ≠ “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 executionMetadata for? — 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 executionMetadata limits? — 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.
recommendation-more-help
journey-optimizer-help