設定自訂動作 configure-a-custom-action

在此頁面上:​設定自訂動作的端點、驗證、安全性及裝載引數,讓歷程可以呼叫該服務,以便將協力廠商REST API連線至您的歷程。

如果您使用第三方系統來傳送訊息,或想要歷程傳送 API 呼叫至協力廠商系統,請使用自訂動作來設定系統至您歷程的連線。 例如,您可使用自訂動作連線至下列系統:Epsilon、Slack、Adobe Developer、Firebase 等等。

自訂動作是技術使用者定義的其他動作,可供行銷人員使用。 設定之後,它們會顯示在您歷程的左側浮動視窗,位於​ 動作 ​類別中。 請在此頁面了解更多。

設定步驟 configuration-steps

以下是設定自訂動作所需的主要步驟:

  1. 在「管理」功能表區段中,選取​組態。 在​ 動作 ​區段中,按一下​管理。 按一下​ 建立動作 ​以建立新動作。 動作設定窗格會在畫面右側開啟。

  2. 輸入動作的名稱。

    note
    NOTE
    只允許使用英數字元和底線。 長度上限為30個字元。
  3. 新增說明至您的動作。 此步驟為選填。

  4. 使用此動作的歷程次數會顯示在​ 用於 ​欄位中。 您可以按一下​ 檢視歷程 ​按鈕,以顯示使用此動作的歷程清單。

  5. 定義不同的​ URL組態 ​引數。 請參閱此頁面

  6. 設定​ 驗證 ​區段。 此設定與資料來源的設定相同。 請參閱本節

    note
    NOTE
    如果您的端點同時傳回access_tokenid_token,請使用tokenInResponse欄位來指定Journey Optimizer應該使用哪一個權杖做為驗證認證:
    • "tokenInResponse": "json://access_token" — 使用存取權杖(OAuth 2.0的預設值)
    • "tokenInResponse": "json://id_token" — 使用ID權杖(在OpenID Connect流程中很常見)
    進一步瞭解自訂驗證
  7. 定義​動作引數。 請參閱此頁面

  8. 按一下​儲存

    自訂動作現已設定完畢,且可供您在歷程中使用。 請參閱此頁面

    note
    NOTE
    當歷程中使用自訂動作時,大部分引數均為唯讀。 您只能修改​名稱描述URL​欄位和​ 驗證 ​區段。

限制 custom-actions-limitations

自訂動作在此頁面上列出一些限制。

在自訂動作引數中,您可以傳遞簡單集合以及物件集合。 深入瞭解此頁面上的集合限制。

另請注意,自訂動作引數採用預期格式(例如:字串、小數等)。 您必須注意遵守這些預期的格式。 在此使用案例中瞭解更多。

自訂動作只有在使用要求回應承載時才支援JSON格式。

NOTE
當端點的回應時間超過0.75秒時,其自訂動作呼叫會透過專用的慢速自訂動作服務而不是預設服務進行路由。

最佳做法 custom-action-enhancements-best-practices

使用自訂動作選擇要作為目標的端點時,請確定:

  • 此端點可使用來自節流 API設定 API 上限的設定來支援歷程的輸送量,藉此加以限制。 請留意,節流設定不可低於 200 TPS。 任何目標端點至少需要支援200個TPS。 在本節中深入了解歷程處理速率。
  • 此端點的回應時間必須儘可能縮短。 根據預期輸送量,高回應時間可能會影響實際輸送量。

所有自訂動作皆已定義1分鐘上300,000次呼叫的上限。 此外,預設上限會針對每個主機和每個沙箱執行。 例如,在沙箱上,如果您有兩個具有相同主機的端點(例如,https://www.adobe.com/endpoint1https://www.adobe.com/endpoint2),上限將套用至adobe.com主機下的所有端點。 「endpoint1」和「endpoint2」會共用相同的上限設定,而且讓一個端點達到限制會影響到另一個端點。

NOTE
每分鐘300,000次呼叫的上限被強製為每個沙箱的​滑動視窗,以及回應時間少於0.75秒的端點的每個端點。 滑動視窗可在任何毫秒開始,這表示即使速率在對齊時鐘分鐘時低於300k/分鐘,也可能發生上限錯誤。 對於回應時間超過 0.75 秒的端點,適用另外的每 30 秒 150,000 次呼叫的限制 (也是滑動視窗)。 在此頁面上進一步瞭解慢速端點。

預設每分鐘300,000次呼叫限制會套用至網域層級(即example.com)。 如果您需要更高的限制,請向Adobe支援查詢使用證據,並確認您端點的輸送量。 若要請求提高上限,請提供您預期呼叫數量和端點容量的詳細資料。 如果容量測試顯示端點可以處理更高的輸送量,Adobe可能會自訂上限。 如需最佳實務,請考慮重新調整歷程或實作等待活動,以錯開傳出呼叫並避免錯誤上限。

此限制是根據客戶使用情況設定的,以保護自訂動作所定位的外部端點。 如有需要,您可以透過上限/節流 API 定義較高的上限或節流限制來覆寫此設定。 請參閱此頁面

基於以下各種原因,您不應使用自訂動作來鎖定公用端點:

  • 如果沒有適當的上限或節流,可能會傳送過多呼叫至可能不支援此磁碟區的公用端點。
  • 設定檔資料可透過自訂動作傳送,因此定位公用端點可能會導致無意間在外部共用個人資訊。
  • 您無法控制公用端點傳回的資料。 如果端點變更其API或開始傳送不正確的資訊,這些資訊將可在傳送的通訊中使用,並可能產生負面影響。

同意與資料控管 privacy

在Journey Optimizer中,您可以將資料控管和同意原則套用至自訂動作,以防止特定欄位匯出至協力廠商系統,或排除尚未同意接收電子郵件、推播或簡訊通訊的客戶。 如需詳細資訊,請參閱下列頁面:

端點設定 url-configuration

設定自訂動作時,您必須定義下列​ 端點設定 ​引數:

{width="70%"}

  1. 在​ URL ​欄位中,指定外部服務的URL:

    • 如果URL是靜態的,請在此欄位中輸入URL。

    • 如果URL包含動態路徑,請只輸入URL的靜態部分,也就是配置、主機、連線埠,以及(選擇性)路徑的靜態部分。

      範例: https://xxx.yyy.com/somethingstatic/

      將自訂動作新增至歷程時,您將指定URL的動態路徑。 了解更多

    note
    NOTE
    基於安全考量,我們強烈建議您針對URL使用HTTPS配置。 我們不允許使用非公開的Adobe位址和IP位址。
    定義自訂動作時只允許預設連線埠:80用於http,443用於https。
  2. 選取呼叫​方法:它可以是​POSTGET​或​PUT

    note
    NOTE
    不支援​ DELETE ​方法。 如果您需要更新現有的資源,請選取​ PUT ​方法。
  3. 處理可能的重新導向(302個回應)。 自訂動作​會根據每個請求自動遵循HTTP 302重新導向。

  4. 定義標頭和查詢引數:

    • 在​ 標頭 ​區段中,按一下​ 新增標頭欄位 ​以定義要傳送給外部服務的要求訊息的HTTP標頭。 預設會設定​ Content-Type ​和​ Charset ​標頭欄位。 您無法刪除這些欄位。 只有​ Content-Type ​標頭可以修改。 其值應符合JSON格式。 以下是預設值:

    • 在​ 查詢引數 ​區段中,按一下​ 新增查詢引數欄位 ​以定義您要新增到URL中的引數。

  5. 輸入欄位的標籤或名稱。

  6. 選取型別: 常數​或​變數。 如果您已選取​常數,請在​ ​欄位中輸入常數值。 如果您已選取​變數,則您將在新增自訂動作至歷程時指定此變數。 了解更多

    note
    NOTE
    將自訂動作新增至歷程後,如果歷程處於草稿狀態,您仍可新增標題或查詢引數欄位至歷程。 如果您不希望歷程受設定變更影響,請複製自訂動作,並將欄位新增到新的自訂動作。
    標頭會根據欄位剖析規則進行驗證。 深入瞭解此檔案

傳輸安全性層 tls

TLS通訊協定支援 tls-protocol-support

Adobe Journey Optimizer預設對自訂動作支援TLS 1.3。 如果使用者端也支援TLS 1.3,則會透過TLS 1.3進行通訊。 否則,TLS交涉程式可能會回復到TLS 1.2。

mTLS通訊協定支援 mtls-protocol-support

您可以使用相互傳輸層安全性(mTLS)來確保對Adobe Journey Optimizer自訂動作的輸出連線具有增強的安全性。 mTLS是一種用於相互驗證的端對端安全性方法,可確保共用資訊的雙方在共用資料之前,都是聲稱的身分。 mTLS包括相較於TLS的額外步驟,其中伺服器也會要求使用者端的憑證並在其末端驗證它。

自訂動作支援雙向TLS (mTLS)驗證。 自訂動作或歷程中不需要額外設定即可啟用 mTLS;當偵測到啟用 mTLS 的端點時,它會自動發生。 了解更多

IMPORTANT
Adobe會定期旋轉用於自訂動作連線的mTLS使用者端憑證。 發行新憑證時,必須更新端點的信任存放區以接受憑證 — 否則,從Journey Optimizer到您服務的輸出連線將失敗,並出現憑證不符錯誤。 為避免中斷:
  • 請定期檢查Adobe公開憑證API,以取得與您的服務相關的更新憑證。
  • 設定您的端點以接受​重疊憑證 (同時使用舊憑證和新憑證),因此在輪換期間沒有連線間隙。
  • 當憑證輪換時,Adobe目前不會傳送主動通知。 您有責任監控憑證更新,並保持信任存放區為最新狀態。
  • 信任驗證應該根據憑證鏈結到根CA (DigiCert),而不是釘選到特定的分葉憑證指紋。

憑證式自訂驗證 certificate-based-auth

對於強制憑證式身分驗證的企業API (例如Microsoft Entra ID),自訂動作支援​憑證式自訂驗證。 若要啟用它,請在​ 驗證 ​區段中設定的自訂授權裝載中設定"subType": "certificateCredential"

Journey Optimizer使用Adobe的Managed憑證來簽署JWT使用者端宣告,並自動將其交換為存取權杖。 不需要使用者端密碼。

如需完整的裝載結構、欄位說明和設定護欄,請參閱憑證式自訂驗證

定義裝載引數 define-the-message-parameters

您可以定義裝載引數,如下所示:

  1. 在​ Request ​區段中,貼上要傳送至外部服務的JSON裝載範例。 此欄位是選用欄位,僅適用於POST和PUT呼叫方法。

    啟用​ 允許NULL值 ​選項,以便在外部呼叫中保留Null值。 請注意,系統不完全支援傳送含有Null值的int、字串等陣列。 例如,即使已核取此選項,下列整數陣列[1, null, 2, 3]也會以[1, 2, 3]傳送。 除此之外,如果這類陣列為Null,則會以空白陣列傳送。

    {width="70%"}

  2. 在​ 回應 ​區段中,貼上呼叫成功時傳回之裝載的範例。 此欄位是選用欄位,可用於所有呼叫方法。 如需如何在自訂動作中運用API呼叫回應的詳細資訊,請參閱此頁面

    {width="70%"}

  3. (選擇性)選取​ 定義失敗回應承載 ​以啟用錯誤回應承載欄位。 啟用後,請使用​ 錯誤回應 ​區段貼上呼叫失敗時傳回之裝載的範例。 與回應裝載(欄位型別和格式)的需求相同。 在此處瞭解如何在歷程中運用失敗回應裝載。

    {width="70%"}

NOTE
承載中的欄位名稱不能包含點.字元,也不能以$字元開頭。

在這些欄位設定中,您必須:

  • 選取引數型別,例如:字串、整數等。

  • 定義常數或變數引數:

    • 常數​表示引數值是由技術角色在動作設定窗格中定義。 值在歷程中一律相同。 這不會改變,且行銷人員在歷程中使用自訂動作時看不到。 例如,它可能是協力廠商系統期望的ID。 在這種情況下,常數值會設定為切換常數/變數右側的欄位。

    • 變數​表示引數的值可以不同。 在歷程中使用此自訂動作的行銷人員可自由傳遞所需值,或指定從何處擷取此引數的值(例如從事件、Adobe Experience Platform等)。 在這種情況下,切換常數/變數右側的欄位是行銷人員將在歷程中看到的標籤,以命名此引數。

    若為選用引數,請啟用行尾的​ 是選用的 ​選項。 核取此選項後,您就會將引數標示為非強制引數,並讓歷程參與者在歷程中編寫該自訂動作時,選擇是否填入引數。

NOTE
如果您在允許Null值時設定選用引數,則歷程從業人員未填入的引數會傳送為Null。

其他資源

瀏覽以下章節,進一步瞭解設定、使用及疑難排解自訂動作的相關資訊:

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 configure a custom action that connects a third-party REST API to your journeys by defining its endpoint, authentication, transport security, and payload parameters.

Intents:

  • Create and name a custom action from the Configurations Actions area
  • Define the endpoint URL, method, headers, and query parameters
  • Configure authentication, including certificate-based custom authentication and mutual TLS
  • Define request, response, and failure response payload parameters as constants or variables
  • Understand the capping, throughput, and endpoint constraints that apply to custom actions

Glossary:

  • Custom action: An additional action defined by technical users and made available to marketers that calls a third-party service through a REST API with a JSON-formatted payload (product-specific)
  • Endpoint Configuration: The section where you define the external service URL, method, headers, and query parameters (product-specific)
  • Constant parameter: A parameter whose value is set in the action configuration by a technical persona and is always the same across journeys; the marketer cannot see it (product-specific)
  • Variable parameter: A parameter whose value can vary and that marketers fill or map when using the custom action in a journey (product-specific)
  • Allow NULL values: An option that keeps Null values in the external call (product-specific)
  • Certificate-Based Custom Authentication: An authentication type enabled by setting “subType”: “certificateCredential” in the custom authorization payload, where Journey Optimizer signs a JWT client assertion with Adobe’s managed certificate and exchanges it for an access token (product-specific)
  • Slow custom action service: A dedicated service through which calls are routed when an endpoint has a response time greater than 0.75 seconds (product-specific)

Guardrails:

  • The action name allows only alphanumeric characters and underscores, with a maximum length of 30 characters (hard limit).
  • Custom actions support JSON format only when using request or response payloads.
  • Custom actions cannot use the DELETE method; only POST, GET, or PUT are supported. To update an existing resource, use PUT.
  • Only the default ports are allowed: 80 for http and 443 for https. Adobe addresses that are not public and IP addresses are not allowed.
  • A capping limit of 300,000 calls over one minute is defined for all custom actions (a default that can be raised via the Capping or Throttling APIs); the default capping is performed per host and per sandbox and applies at the domain level.
  • The 300,000 calls per minute cap is enforced as a sliding window per sandbox and per endpoint for endpoints with response times less than 0.75 seconds; for endpoints with response times greater than 0.75 seconds, a separate limit of 150,000 calls per 30 seconds (also a sliding window) applies.
  • A throttling configuration cannot go below 200 TPS, so any targeted endpoint must support at least 200 TPS.
  • When an endpoint has a response time greater than 0.75 seconds, its custom action calls are routed through a dedicated slow custom action service instead of the default service.
  • Field names in the payload cannot contain a dot character, nor start with a dollar character.
  • When a custom action is used in a journey, most parameters are read-only; only the Name, Description, URL fields and the Authentication section can be modified.
  • You should not target public endpoints with custom actions.

Terminology:

  • Canonical name: Custom action — Acronym: n/a — variants: custom actions, action configuration
  • Synonyms: “URL Configuration” = “Endpoint Configuration”
  • Do not confuse: “Constant” (value fixed in the action configuration, hidden from the marketer) ≠ “Variable” (value that marketers pass or map in the journey)
  • Do not confuse: “TLS” (transport layer security, with fallback from TLS 1.3 to TLS 1.2) ≠ “mTLS” (mutual TLS, which also verifies the client certificate)

FAQ:

  • Q: Why can the action name not be saved? — The name allows only alphanumeric characters and underscores and cannot exceed 30 characters.
  • Q: Which methods are supported for a custom action? — POST, GET, and PUT are supported; DELETE is not supported, and PUT should be used to update an existing resource.
  • Q: What is the capping limit for custom actions? — 300,000 calls over one minute per host and per sandbox at the domain level; endpoints slower than 0.75 seconds instead use a limit of 150,000 calls per 30 seconds.
  • Q: How is mutual TLS activated? — No additional configuration is required in the custom action or journey; mTLS occurs automatically when an mTLS-enabled endpoint is detected.
  • Q: Why is a custom action call routed to a different service? — When an endpoint has a response time greater than 0.75 seconds, its calls are routed through a dedicated slow custom action service instead of the default service.
recommendation-more-help
journey-optimizer-help