Adobe Campaign隨附預先定義的資料模型,其中資料會透過不同資源加以定義。 您可以擴充資源,新增您自己的自訂欄位或自訂表格(例如購買或產品表格),以豐富資料模型。
自訂資源可透過API存取,使用 /profileAndServicesExt 端點和自訂資源名稱。
https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/<resourceName>/
若為非現成可用的資源,請一律使用 "cus" 前置詞在資源的名稱前。
只要自訂資源連結至「設定檔」表格,您就可以使用自訂資源執行任何操作。 例如,讓我們考慮下清單格結構:
在此情況下, 交易, 交易詳細資訊 和 產品 表格只要連結至 設定檔 表格。
範例要求
存取擴充profileAndServicesExt資源的GET要求範例。
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
它會傳回所有連結的自訂資源清單。 然後,您就可以使用資源URL來執行本檔案中所述的任何API任務。
{
"apiName": "resourceType",
"cusProduct": {
"content": ...,
"data": "/profileAndServicesExt/cusProduct/",
"help": "Product",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/cusProduct/metadata",
"name": "cusProduct",
"type": "collection"
},
"cusTransaction": {
"content": ...,
"data": "/profileAndServicesExt/cusTransaction/",
"help": "Product",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/cusTransaction/metadata",
"name": "cusProduct",
"type": "collection"
},
...
}
如需資料模型擴充功能的詳細資訊,請參閱Campaign檔案: