このページ:生成された cURL リクエストを取得し、これを使用して API を通じてライブ API トリガーキャンペーンをトリガーします。その際、トラブルシューティングのガイダンスを使用して、配信の遅延や認証エラーを解決できます。
施策がアクティブ化されたら、生成されたサンプル cURL リクエストを取得し、APIで使用してペイロードを構築し、施策をトリガーする必要があります。
必読 must-read
-
キャンペーンの開始日や終了日 - キャンペーンを作成する際に特定の開始日や終了日を設定している場合、そのキャンペーンはこれらの日付以外では実行されず、API 呼び出しは失敗します。
-
呼び出しタイムアウト - Interactive Message Execution REST API の呼び出しには、60 秒のタイムアウトがあります。 ただし、配信を保証するために、予期しないタイムアウトが発生した場合に備えて内部再試行が行われます。
-
一度に1つのオーディエンス実行 - キャンペーンに対して一度に1つのバッチ実行のみ実行できます。 以前のトリガーが実行中にキャンペーンを実行すると、APIは422 エラーを返します。 キャンペーンを再度トリガーする前に、前の実行のステータスを確認します。
-
Unique x-request-id - ベストプラクティスとして、UUIDなどのAPI呼び出しごとに新しい
x-request-idヘッダー値を生成します。 値を再利用すると、呼び出しが異なるキャンペーンをターゲットにしている場合でも、呼び出しを以前の呼び出しの重複として扱い、スキップできます。
キャンペーンのトリガー trigger
-
キャンペーンを開き、「cURL リクエスト」セクションからペイロードリクエストをコピー&ペーストします。 このペイロードには、メッセージで使用されるすべてのパーソナライゼーション(プロファイルとコンテキスト)変数が含まれます。 キャンペーンがライブになったら使用できます。
note important IMPORTANT cURL セクションのエンドポイントは、標準キャンペーンと高スループットキャンペーン で異なります。 -
APIでこのcURL リクエストを使用して、ペイロードを構築し、キャンペーンをトリガーします。 詳しくは、Interactive Message Execution API ドキュメントを参照してください。このドキュメントには、標準および高スループットキャンペーンのすべてのエンドポイントが一覧表示されます。
API 呼び出しの例について詳しくは、このページも参照してください。
トラブルシューティング troubleshooting
メール配信の遅延 delivery-delays
メール配信の時間が予想を超える場合は、クラウドインフラストラクチャープロバイダーやメールサービスプロバイダーなどの外部サービスの潜在的な停止やパフォーマンスの問題を調査します。 Journey Optimizer ログには、メッセージ送信のタイムスタンプが記録されます。これは、配信パイプラインのダウンストリームで遅延が発生したかどうかを判断するのに役立ちます。
Azure Cosmos DB 認証エラー(500 内部サーバーエラー) cosmosdb-auth-errors
API トリガーキャンペーンをトリガーする際に 500 内部サーバーエラーが発生し、システムログに次のようなメッセージを含む Azure Cosmos DB からの 403 禁止エラーが表示される場合:
「Azure Cosmos DB サービスがアカウントの既定の ID の AAD 認証トークンを取得できないため、アカウントへのアクセスは現在取り消されています」
このエラーは通常、Cosmos DB 認証に必要な Azure サービスプリンシパルが無効、削除または誤って設定されている場合に発生します。
-
Azure サービスプリンシパルを確認 - Azure サービスプリンシパルまたはマネージド ID が有効になっており、Azure Active Directory で無効化または削除されていないことを確認します。
-
権限を確認 - サービスプリンシパルが Azure Key Vault および Cosmos DB リソースへのアクセスに必要な権限を持っていることを確認します。 Azure Cosmos DB で認証するには、サービスプリンシパルに適切な役割が割り当てられている必要があります。
-
Azure Cosmos DB CMK 設定を確認 - カスタマーマネージドキー(CMK)を使用している場合、AAD トークンの取得を復元する手順について詳しくは、Azure Cosmos DB CMK トラブルシューティングガイドを参照してください。
-
再度有効にしてテスト - 設定を修正した後、サービスプリンシパルが無効になっていた場合は再度有効にし、トランザクションキャンペーン API 呼び出しを再テストして、認証が成功し、メッセージが配信されることを確認します。
| note |
|---|
| NOTE |
| この問題は通常、Cosmos DB 認証に必要な Azure サービスプリンシパルの設定ミスや誤った無効化により発生します。 サービスプリンシパルを有効にして適切に設定しておくと、今後このエラーが発生するのを防ぐことができます。 |
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: Once an API triggered campaign has been activated, you retrieve the generated sample cURL request from the campaign and use it with the Interactive Message Execution API to build your payload and trigger the campaign.
Intents:
- Copy the payload request from the cURL request section of a live API triggered campaign.
- Use the cURL request with the Interactive Message Execution API to build the payload and trigger the campaign.
- Find the endpoints for standard and High throughput campaigns in the Interactive Message Execution API documentation.
- Investigate email delivery delays of an API triggered campaign.
- Resolve 500 Internal Server Errors caused by Azure Cosmos DB authentication errors when triggering API-triggered campaigns.
Glossary:
- cURL request section (product-specific): The section of the campaign that holds the generated sample payload request. The payload includes all personalization (profile and context) variables used in the message, and it is available once the campaign is live.
- x-request-id (product-specific): A header of the API call. If you reuse a value, the system can treat the call as a duplicate of an earlier one and skip it, even when the calls target different campaigns.
Guardrails:
- If you have configured a specific start and/or end date when creating the campaign, the campaign is not executed outside these dates, and API calls fail.
- The call to the Interactive Message Execution REST API has a timeout of 60 sec. Internal retries are in place in case of unexpected timeouts to guarantee the delivery.
- Only one batch execution can run at a time for a campaign. If you trigger the campaign while a previous execution is still running, the API returns a 422 error.
Terminology:
- Canonical name: API triggered campaign — variants: API-triggered campaign
- Canonical name: Customer-Managed Keys — Acronym: CMK
- Canonical name: Interactive Message Execution API — variants: Interactive Message Execution REST API
- Do not confuse: standard campaigns ≠ High throughput campaigns: the endpoints in the cURL section differ between standard and High throughput campaigns.
FAQ:
- When is the cURL request available? It is available once the campaign is live.
- What happens if I trigger the campaign while a previous execution is still running? The API returns a 422 error. Check the status of the previous execution before you trigger the campaign again.
- What happens if I trigger the campaign outside its start and end dates? If you have configured a specific start and/or end date when creating the campaign, it is not executed outside these dates, and API calls fail.
- What is the timeout of the Interactive Message Execution REST API call? The call has a timeout of 60 sec. Internal retries are in place in case of unexpected timeouts to guarantee the delivery.
- Where are the endpoints for standard and High throughput campaigns listed? In the Interactive Message Execution API documentation.
Troubleshooting:
- Email delivery delays: If email delivery times exceed expectations, investigate potential outages or performance issues with external services, such as cloud infrastructure providers or email service providers. Journey Optimizer logs record message departure timestamps, which can help determine whether delays occurred downstream in the delivery pipeline.
- 500 Internal Server Errors with a 403 Forbidden error from Azure Cosmos DB: The system logs show a message such as “Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account’s default identity”. This error typically occurs when the Azure service principal required for Cosmos DB authentication has been disabled, deleted, or misconfigured. To resolve it, verify that your Azure service principal or managed identity is enabled and has not been disabled or deleted in your Azure Active Directory, confirm that the service principal has the necessary permissions to access the Azure Key Vault and Cosmos DB resources, consult the Azure Cosmos DB CMK troubleshooting guide if you are using Customer-Managed Keys (CMK), then re-enable the service principal if it was disabled and re-test your transactional campaign API calls.
Best practices:
- As a best practice, generate a new
x-request-idheader value for every API call, for example a UUID. - Keeping the Azure service principal enabled and properly configured will prevent the Azure Cosmos DB authentication error in the future.
Related pages:
- For High throughput campaigns: High throughput campaigns
Personas:
- marketer: Can open the campaign and copy-paste the payload request from the cURL request section, which is available once the campaign is live. Can use this cURL request in the APIs to build the payload and trigger the campaign. The page states that only one batch execution can run at a time for a campaign. Where: “Trigger the campaign”.
Onboarding:
- Level: Intermediate
- First minimal step: Open the campaign, then copy-paste the payload request from the cURL request section.