使用Schema Registry API建立結構描述
Schema Registry是用來存取Adobe Experience Platform中的Schema Library。 Schema Library包含Adobe、Experience Platform合作夥伴以及您使用之應用程式的廠商所提供的資源。 登入提供使用者介面和RESTful API,所有可用的程式庫資源都可從其中存取。
本教學課程使用Schema Registry API逐步引導您完成使用標準類別撰寫結構描述的步驟。 如果您偏好在Experience Platform中使用使用者介面,結構描述編輯器教學課程會提供在結構描述編輯器中執行類似動作的逐步指示。
快速入門
本指南需要您深入了解下列 Adobe Experience Platform 元件:
- Experience Data Model (XDM) System: Experience Platform用來組織客戶體驗資料的標準化架構。
- 結構描述組合的基本概念:瞭解XDM結構描述的基本建置區塊,包括結構描述組合中的關鍵原則和最佳實務。
- Real-Time Customer Profile:根據來自多個來源的彙總資料,提供統一的即時消費者設定檔。
- Sandboxes: Experience Platform提供的虛擬沙箱可將單一Platform執行個體分割成個別的虛擬環境,以利開發及改進數位體驗應用程式。
開始進行此教學課程之前,請檢閱開發人員指南以取得重要資訊,您必須瞭解這些資訊才能成功呼叫Schema Registry API。 這包括您的{TENANT_ID}
、「容器」的概念以及發出要求所需的標頭(特別注意Accept
標頭及其可能的值)。
本教學課程將逐步解說構成忠誠會員綱要的步驟,該綱要說明與零售忠誠會員計畫成員相關的資料。 開始之前,您可以預覽附錄中的完整忠誠會員綱要。
使用標準類別撰寫結構描述
結構描述可視為您要擷取到Experience Platform的資料的藍圖。 每個結構描述都由一個類別和零個或多個結構描述欄位群組組成。 換言之,您不必新增欄位群組來定義結構,但在大多數情況下至少使用一個欄位群組。
指派類別
結構描述組合程式從選取類別開始。 類別會定義資料的主要行為方面(記錄與時間序列),以及描述將擷取之資料所需的最少欄位。
您在本教學課程中建立的結構描述使用XDM Individual Profile類別。 XDM Individual Profile是Adobe提供的標準類別,用於定義記錄行為。 在結構描述組合的基本資料中可以找到更多關於行為的資訊。
若要指派類別,會進行API呼叫,以在租使用者容器中建立(POST)新結構描述。 此呼叫包含結構描述將實作的類別。 每個結構描述只能實作一個類別。
API格式
POST /tenant/schemas
要求
要求必須包含參考類別$id
的allOf
屬性。 此屬性會定義結構描述將實作的「基底類別」。 在此範例中,基底類別是XDM Individual Profile類別。 XDM Individual Profile類別的$id
在下面的allOf
陣列中被用作$ref
欄位的值。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"type": "object",
"title": "Loyalty Members",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile"
}
]
}'
回應
成功的要求傳回HTTP回應狀態201 (已建立),其回應本文包含新建立之結構描述的詳細資料,包括$id
、meta:altIt
和version
。 這些值是唯讀的,並由Schema Registry指派。
{
"$id": "https://ns.adobe.com/tenantId/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_tenantId.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.0",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310304048,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6d2ed8acd9c3b768a44de29e069fc6f71329d2550f708381d22fa8bf8c192366",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_tenantId"
}
查詢結構描述
若要檢視您新建立的結構描述,請使用結構描述的meta:altId
或URL編碼的$id
URI來執行查詢(GET)要求。
API格式
GET /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
curl -X GET \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/https%3A%2F%2Fns.adobe.com%2F{TENANT_ID}%2Fschemas%2F533ca5da28087c44344810891b0f03d9\
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/vnd.adobe.xed+json; version=1'
回應
回應格式取決於隨要求傳送的Accept
標頭。 請嘗試使用不同的Accept
標頭,看看哪一個最符合您的需求。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.0",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
}
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310304048,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6d2ed8acd9c3b768a44de29e069fc6f71329d2550f708381d22fa8bf8c192366",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:allFieldAccess": true
}
新增欄位群組 add-a-field-group
現在,忠誠會員方案已建立並確認,欄位群組可新增到其中。
根據所選的結構描述類別,有不同的標準欄位群組可供使用。 每個欄位群組都包含一個intendedToExtend
欄位,定義與該欄位群組相容的類別。
欄位群組會定義概念(例如「name」或「address」),這些概念可在需要擷取相同資訊的任何結構描述中重複使用。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
此請求會更新熟客方案以包含人口統計詳細資料欄位群組 (profile-person-details
)中的欄位。
透過新增profile-person-details
欄位群組,「熟客方案成員」結構描述現在會擷取熟客方案成員的人口統計資訊,例如他們的名字、姓氏和生日。
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/context/profile-person-details"}}
]'
回應
回應顯示meta:extends
陣列中新增的欄位群組,並包含allOf
屬性中欄位群組的$ref
。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.1",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310912096,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "b480f28a35f356b237fc129e796074a3f33a7a67df273f6a8beaee1ec6465540",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
新增更多欄位群組
「熟客方案成員」結構需要兩個以上的標準欄位群組,您可以使用其他欄位群組重複步驟以新增它們。
$id
:code language-http |
---|
|
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
此請求會更新熟客方案以納入以下標準欄位群組中的欄位:
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details"}},
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details"}}
]'
回應
回應顯示meta:extends
陣列中新增的欄位群組,並包含allOf
屬性中欄位群組的$ref
。
忠誠會員結構描述現在應在allOf
陣列中包含四個$ref
值: profile
、profile-person-details
、profile-personal-details
及profile-loyalty-details
,如下所示。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.2",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673311559934,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "1de5ed1a07e3478719952f0a8c94d5e5390d5a9a998761adb4cf1989137fd6ea",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
定義新的欄位群組
雖然標準熟客方案詳細資料欄位群組為結構描述提供有用的熟客方案相關欄位,但還有其他熟客方案欄位未包含在任何標準欄位群組中。
若要新增這些欄位,您可以在tenant
容器中定義您自己的自訂欄位群組。 這些欄位群組是您組織所獨有的,組織外部的任何人都看不到或無法編輯。
為了建立(POST)新的欄位群組,您的要求必須包含一個meta:intendedToExtend
欄位,其中包含與欄位群組相容的基底類別的$id
,以及該欄位群組將包含的屬性。
任何自訂屬性都必須巢狀化至TENANT_ID
下方,以避免與其他欄位群組或欄位衝突。
API格式
POST /tenant/fieldgroups
要求
此請求會建立新的欄位群組,該群組有loyaltyTier
物件,其中包含公司特定熟客方案專屬的四個欄位: id
、effectiveDate
、currentThreshold
和nextThreshold
。
curl -X POST\
https://platform.adobe.io/data/foundation/schemaregistry/tenant/fieldgroups\
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'content-type: application/json' \
-d '{
"type": "object",
"title": "Loyalty Tier",
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier."
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier."
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier."
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier."
}
}
}
}
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier"
}
]
}'
回應
成功的要求傳回HTTP回應狀態201 (已建立),其回應本文包含新建立欄位群組的詳細資料,包括$id
、meta:altIt
和version
。 這些值是唯讀的,並由Schema Registry指派。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673313004645,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "98e5d48808f5a4d9655493777389568a2581cfce013351ab9e1595d82f698dd6",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
將自訂欄位群組新增到結構描述
您現在可以對新增標準欄位群組執行相同的步驟,將此新建立的欄位群組新增到您的結構描述。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
此請求會更新(PATCH)熟客方案以包含新「熟客方案」欄位群組中的欄位。
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"}}
]'
回應
您會看到欄位群組已成功新增,因為回應現在顯示meta:extends
陣列中新新增的欄位群組,並包含allOf
屬性中欄位群組的$ref
。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.3",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673313118938,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6559b197a04bb3fda5bc80bf383a260cfbe32539d528f0139c5750711eebfba2",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
檢視目前的結構描述
您現在可以執行GET要求來檢視目前的結構描述,並檢視新增的欄位群組對結構描述整體結構的貢獻。
API格式
GET /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
curl -X GET \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/vnd.adobe.xed-full+json; version=1'
回應
使用application/vnd.adobe.xed-full+json; version=1
Accept
標頭,您可以看到顯示所有屬性的完整結構描述。 這些屬性是構成結構描述的類別和欄位群組所貢獻的欄位。 在下列範例回應中,只會顯示最近新增的欄位以留出空間。 您可以在此檔案結尾的附錄中檢視完整結構描述,包括所有屬性及其屬性。
在"properties"
底下,您可以看到新增自訂欄位群組時所建立的_{TENANT_ID}
名稱空間。 該名稱空間內是loyaltyTier
物件,以及建立欄位群組時定義的欄位。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673313004645,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "98e5d48808f5a4d9655493777389568a2581cfce013351ab9e1595d82f698dd6",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
建立資料型別
您建立的「熟客層」欄位群組包含可能在其他結構描述中有用的特定屬性。 例如,資料可能會當作體驗事件的一部分擷取,或供實作不同類別的結構描述使用。 在此情況下,將物件階層儲存為資料型別是可行的做法,以便能更輕鬆地在其他地方重複使用定義。
資料型別可讓您定義物件階層一次,並在欄位中參照它,就像任何其他純量型別一樣。
換言之,資料型別允許一致地使用多欄位結構,具有比欄位群組更大的彈性,因為它們可以新增為欄位的「型別」,以包含在結構描述中的任意位置。
API格式
POST /tenant/datatypes
要求
定義資料型別不需要meta:extends
或meta:intendedToExtend
欄位,而且欄位不需要巢狀化到您的租使用者ID下以避免衝突。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/datatypes \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '{
"title": "Loyalty Tier",
"type": "object",
"description": "Loyalty Tier data type",
"definitions": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier."
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier."
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier."
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier."
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier"
}
]
}'
回應
成功的要求傳回HTTP回應狀態201 (已建立),其回應本文包含新建立資料型別的詳細資料,包括$id
、meta:altIt
和version
。 這些值是唯讀的,並由Schema Registry指派。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"meta:altId": "_{TENANT_ID}.datatypes.c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"meta:resourceType": "datatypes",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Loyalty Tier data type",
"definitions": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673378256699,
"repo:lastModifiedDate": 1673378256699,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "8afba84c0c9a68126a7a1389f8523a1112bdf4405badc6dcddbbb4a0e18f5cdb",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
您可以使用編碼的URL $id
URI來執行查詢(GET)要求,以直接檢視新的資料型別。 確定在查閱要求的Accept
標頭中包含version
。
在結構描述中使用資料型別
現在已建立忠誠度層級資料型別,您可以更新(PATCH)您建立的欄位群組中的loyaltyTier
欄位,以參考資料型別,取代先前存在的欄位。
API格式
PATCH /tenant/fieldgroups/{FIELD_GROUP_ID}
{FIELD_GROUP_ID}
meta:altId
或URL編碼$id
。要求
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/fieldgroups/_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{
"op": "replace",
"path": "/definitions/loyaltyTier/properties/_{TENANT_ID}/properties",
"value": {
"loyaltyTier": {
"title": "Loyalty Tier",
"$ref": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"description": "Loyalty tier info"
}
}
}
]'
回應
回應現在包含loyaltyTier
物件中資料型別的參考($ref
),而不是先前定義的欄位。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.1",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"title": "Loyalty Tier",
"$ref": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"description": "Loyalty tier info",
"type": "object",
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673378970276,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "4df8fa56d00991590364606bb2e219e1ea8f5717a51c0e6ae57ca956830b6a27",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
如果您現在執行GET要求來查閱結構描述,loyaltyTier
屬性會在meta:referencedFrom
下顯示資料型別的參考:
"_{TENANT_ID}": {
"type": "object",
"meta:xdmType": "object",
"properties": {
"loyaltyTier": {
"title": "Loyalty Tier",
"description": "Loyalty tier info",
"type": "object",
"meta:xdmType": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:referencedFrom": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb"
}
}
}
定義身分描述項
結構描述用於將資料擷取至Experience Platform。 這些資料最終會跨多個服務使用,以建立個人的單一、統一檢視。 為協助進行此程式,可將關鍵欄位標示為「身分」,並在資料擷取後,將這些欄位中的資料插入該個人的「身分圖表」。 然後Real-Time Customer Profile和其他Experience Platform服務就可以存取圖表資料,以提供每個個別客戶的拼接檢視。
通常標示為「身分」的欄位包括:電子郵件地址、電話號碼、Experience Cloud ID (ECID)、CRM ID或其他唯一ID欄位。 請考量貴組織特有的任何唯一識別碼,因為這些識別碼可能是良好的身分欄位。
身分描述項會指出sourceSchema
的sourceProperty
是應視為身分的唯一識別碼。
如需使用描述元的詳細資訊,請參閱Schema Registry開發人員指南。
API格式
POST /tenant/descriptors
要求
下列要求定義了「忠誠會員」結構描述在personalEmail.address
欄位上的身分描述項。 這會告訴Experience Platform使用熟客方案會員的電子郵件地址做為識別碼,以協助彙整個人的相關資訊。 此呼叫也會將此欄位設定為結構描述的主要身分識別,方法是將xdm:isPrimary
設定為true
,這是啟用結構描述以用於即時客戶設定檔的必要條件。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/descriptors \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '{
"@type": "xdm:descriptorIdentity",
"xdm:sourceSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/533ca5da28087c44344810891b0f03d9",
"xdm:sourceVersion": 1,
"xdm:sourceProperty": "/_{TENANT_ID}/loyalty/loyaltyId",
"xdm:namespace": "Email",
"xdm:property": "xdm:code",
"xdm:isPrimary": false
}'
回應
成功的回應會傳回HTTP狀態201 (已建立),其回應本文包含新建立之描述項的詳細資料,包括其@id
。 @id
是由Schema Registry指派的唯讀欄位,用於參考API中的描述項。
{
"@id": "719a4391897c097786efbaa6d4262bb928a1cd88540344c6",
"@type": "xdm:descriptorIdentity",
"xdm:sourceSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"xdm:sourceVersion": 1,
"xdm:sourceProperty": "/personalEmail/address",
"imsOrg": "{ORG_ID}",
"version": "1",
"xdm:namespace": "Email",
"xdm:property": "xdm:code",
"xdm:isPrimary": true,
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production"
}
啟用結構描述以用於Real-Time Customer Profile profile
在結構描述套用主要身分描述項後,您可以將union
標籤新增至meta:immutableTags
屬性,以啟用Real-Time Customer Profile使用的「忠誠會員」結構描述。
新增union
標籤
為了將結構描述包含在合併的聯合檢視中,union
標籤必須新增到結構描述的meta:immutableTags
屬性。 這是透過PATCH要求完成的,以更新結構描述並新增值為union
的meta:immutableTags
陣列。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL編碼的$id
。要求
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/meta:immutableTags", "value": ["union"]}
]'
回應
回應顯示操作已順利執行,而且結構描述現在包含最上層屬性meta:immutableTags
,這是包含值"union"的陣列。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.4",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673380280074,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "c590ccc7a293040d85c2b7d93276480ef4b4aa9a4fcd6991f50fbb47f58bced2",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:immutableTags": [
"union"
],
"meta:descriptorStatus": {
"result": []
}
}
聯合中的清單結構描述
您現在已成功新增結構描述至XDM Individual Profile聯合。 若要檢視屬於相同聯合的所有結構描述清單,您可以使用查詢引數執行GET請求以篩選回應。
使用property
查詢引數,您可以指定只傳回包含meta:immutableTags
欄位(其meta:class
等於XDM Individual Profile類別的$id
)的結構描述。
API格式
GET /tenant/schemas?property=meta:immutableTags==union&property=meta:class=={CLASS_ID}
要求
以下範例要求傳回屬於XDM Individual Profile聯合的所有結構描述。
curl -X GET \
'https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas?property=meta:immutableTags==union&property=meta:class==https://ns.adobe.com/xdm/context/profile' \
-H 'Accept: application/vnd.adobe.xed-id+json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
回應
回應是經過篩選的結構描述清單,僅包含同時符合兩個需求的結構。 請記住,使用多個查詢引數時,會假設為AND關係。 清單回應的格式取決於請求中傳送的Accept
標頭。
{
"results": [
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/d29a200b5deb6cfb55d3b865ef627f33",
"meta:altId": "_{TENANT_ID}.schemas.d29a200b5deb6cfb55d3b865ef627f33",
"version": "1.2",
"title": "Profile Schema"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/5d70026f5522fc60b3c81f6523b83c86",
"meta:altId": "_{TENANT_ID}.schemas.5d70026f5522fc60b3c81f6523b83c86",
"version": "1.3",
"title": "CRM Onboarding"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/653e53eb04341d09453c9b6a5fb43d1b4ca9526ec274856d",
"meta:altId": "_{TENANT_ID}.schemas.653e53eb04341d09453c9b6a5fb43d1b4ca9526ec274856d",
"version": "1.1",
"title": "Profile consents"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"version": "1.4",
"title": "Loyalty Members"
}
],
"_page": {
"orderby": "updated",
"next": null,
"count": 4
},
"_links": {
"next": null,
"global_schemas": {
"href": "https://platform.adobe.io/data/foundation/schemaregistry/global/schemas?property=meta:immutableTags==union&property=meta:class==https://ns.adobe.com/xdm/context/profile"
}
}
}
後續步驟
依照本教學課程,您已使用標準欄位群組和您定義的欄位群組成功撰寫結構。 您現在可以使用此結構描述來建立資料集,並將記錄資料擷取至Adobe Experience Platform。
在本教學課程中建立的完整熟客方案可在下列附錄中取得。 您可以檢視結構,瞭解欄位群組對整體結構的貢獻,以及哪些欄位可用於資料擷取。
建立多個結構描述後,您就可以透過使用關係描述元來定義它們之間的關係。 如需詳細資訊,請參閱的教學課程,以定義兩個結構描述之間的關係。 如需如何在登入中執行所有作業(GET、POST、PUT、PATCH和DELETE)的詳細範例,在使用API時,請參閱結構描述登入開發人員指南。
附錄 appendix
下列資訊補充API教學課程。
完整的熟客方案會員 complete-schema
在本教學課程中,結構描述會用於描述零售忠誠度計畫的成員。
結構描述實作XDM Individual Profile類別並結合多個欄位群組。 它會使用標準Demographic Details、個人聯絡詳細資料及熟客詳細資料欄位群組,以及透過教學課程中定義的自訂熟客層級欄位群組,擷取熟客方案會員的相關資訊。
以下顯示JSON格式中完成的熟客方案會員綱要:
code language-json |
---|
|