在此頁面上:瞭解如何使用自訂動作,透過REST API呼叫搭配JSON裝載將歷程連線至協力廠商系統,同時套用資料控管和同意原則。
使用自訂動作來啟用與協力廠商系統的連線,以傳送訊息或API呼叫。 您可以使用任何提供者提供的任何服務來設定動作,這些服務可經由 REST API,搭配 JSON 格式的承載進行呼叫。
在本節中進一步瞭解自訂動作。
瞭解如何在此頁面上建立和設定自訂動作。
瞭解如何在此頁面上使用自訂動作的API呼叫回應進行個人化。
同意與資料控管 privacy
在Journey Optimizer中,您可以將資料控管和同意原則套用至自訂動作,以防止特定欄位匯出至協力廠商系統,或排除尚未同意接收電子郵件、推播或簡訊通訊的客戶。 如需詳細資訊,請參閱下列頁面:
URL 組態
自訂動作活動的設定窗格會顯示URL設定引數,以及為自訂動作設定的驗證引數。 您無法在歷程中設定URL的靜態部分,但在自訂動作的全域設定中設定。 了解更多。
動態路徑
如果URL包含動態路徑,請在 路徑 欄位中指定路徑。
若要串連欄位和純文字字串,請使用字串函式或進階運算式編輯器中的加號(+)。 以單引號(‘)或雙引號(’')括住純文字字串。 了解更多。
此表格顯示組態範例:
https://xxx.yyy.com:8080/somethingstatic/The _id + '/messages'串連的URL具有以下形式:
https://xxx.yyy.com:8080/somethingstatic/<ID>/messages
標頭和查詢引數 headers
URL組態區段會顯示動態標頭和查詢引數欄位,但不會顯示常數欄位。 動態標題和查詢引數欄位在動作設定畫面中定義為變數。 了解更多
若要指定動態標題和查詢引數欄位的值,請在欄位內或鉛筆圖示上按一下,然後選取所需欄位。
自訂動作中的
動作引數
在 動作引數 區段中,您會看到定義為 「變數」 的訊息引數。 對於這些引數,您可以定義從何處取得此資訊(例如:事件、資料來源)、手動傳遞值或使用進階運算式編輯器進行進階使用案例。 進階使用案例可以是資料操控和其他函式用途。 請參見此頁面。
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 add and configure a custom action activity in a journey to call a third-party REST API with a JSON payload, including URL configuration, header/query parameter mapping, action parameter mapping, and applying data governance and consent policies.
Intents:
- Add a custom action activity to a journey to send data to a third-party system via REST API
- Configure a dynamic URL path by concatenating fields and static text in the expression editor
- Map dynamic header and query parameter values from journey events or datasources
- Map action parameters (defined as Variable) to event fields, datasource fields, or static values
- Apply data governance and consent policies to control what data is exported via custom actions
Glossary:
- Custom action: A journey action activity that calls an external REST API endpoint with a JSON-formatted payload to integrate third-party systems (product-specific)
- Dynamic path: The variable portion of the custom action URL that is defined per-execution using fields from the journey context (product-specific)
- Action parameters: Message payload fields defined as “Variable” in the custom action configuration, mapped to journey data at the journey level (product-specific)
Guardrails:
- The static part of the URL cannot be modified in the journey; it must be set in the global custom action configuration.
- Dynamic header and query parameter fields are defined as variable in the action configuration screen, not in the journey.
- Data governance and consent policies can be applied to prevent specific fields from being exported or to exclude non-consented customers.
Terminology:
- Canonical name: Custom action — Acronym: none — variants: custom actions, third-party action
- Synonyms: “action parameters” = “message parameters defined as Variable”
- Do not confuse: “static URL part” (set in global action config, not editable in journey) ≠ “dynamic path” (set in the journey per-execution)
FAQ:
- Q: Can I change the base URL of a custom action inside the journey? — No, only the dynamic path portion can be set in the journey; the static part of the URL is configured in the global custom action configuration.
- Q: How do I build a dynamic URL path that includes a profile ID? — Use the Path field with the advanced expression editor to concatenate the ID field with static strings, for example:
_id + '/messages'. - Q: How do I apply consent rules to a custom action? — Configure consent policies on the custom action to exclude customers who have not consented to receive the relevant communication; refer to the Consent page for details.
- Q: Where do I map the values for dynamic headers? — In the URL Configuration section of the activity pane, click inside the dynamic header field or use the pencil icon to select the desired field from events or datasources.
- Q: What types of values can I assign to action parameters? — You can map parameters to event fields, datasource fields, pass values manually, or use the advanced expression editor for data manipulation.