Flow Service 可用來收集和集中Adobe Experience Platform中各種不同來源的客戶資料。 該服務提供用戶介面和RESTful API,所有受支援的源都可從中連接。
本教學課程使用 Flow Service 探索CRM系統的API。
本指南需要妥善了解下列Adobe Experience Platform元件:
以下章節提供您需要知道的其他資訊,以便使用 Flow Service API。
若要探索您的CRM系統,請使用 Platform API,您必須擁有有效的連線ID。 如果您尚未連線要使用的CRM系統,您可以透過下列教學課程建立連線:
本教學課程提供範例API呼叫,以示範如何設定要求格式。 這些功能包括路徑、必要標題和格式正確的請求裝載。 也提供API回應中傳回的範例JSON。 如需範例API呼叫檔案中所使用慣例的相關資訊,請參閱 如何閱讀API呼叫範例 在 Experience Platform 疑難排解指南。
若要對 Platform API,您必須先完成 驗證教學課程. 完成驗證教學課程會提供所有 Experience Platform API呼叫,如下所示:
Authorization: Bearer {ACCESS_TOKEN}
x-api-key: {API_KEY}
x-gw-ims-org-id: {ORG_ID}
中的所有資源 Experience Platform,包括 Flow Service,會與特定虛擬沙箱隔離。 所有請求 Platform API需要標頭,以指定要在中執行操作的沙箱名稱:
x-sandbox-name: {SANDBOX_NAME}
所有包含裝載(POST、PUT、PATCH)的請求都需要其他媒體類型標題:
Content-Type: application/json
使用CRM系統的連線ID,您可以透過執行GET請求來探索資料表。 使用以下調用查找要檢查或將其嵌入的表的路徑 Platform.
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
CRM系統的基本連線ID。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/{BASE_CONNECTION_ID}/explore?objectType=root' \
-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}'
回應
成功的回應是從到CRM系統的表陣列。 找到要放進的桌子 Platform 並注意 path
屬性,因為您必須在下一個步驟中提供屬性,以檢查其結構。
[
{
"type": "table",
"name": "Solution Component Summary",
"path": "msdyn_solutioncomponentsummary",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Quote Invoicing Product",
"path": "msdyn_quoteinvoicingproduct",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Opportunity Relationship",
"path": "customeropportunityrole",
"canPreview": true,
"canFetchSchema": true
}
]
要從CRM系統檢查表的結構,請在指定表的路徑作為查詢參數時執行GET請求。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
CRM系統的基本連線ID。 |
{TABLE_PATH} |
表的路徑。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}' \
-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}'
回應
成功的回應會傳回表格的結構。 有關表格各欄的詳細資訊位於 columns
陣列。
{
"format": "flat",
"schema": {
"columns": [
{
"name": "first_name",
"type": "string",
"meta": {
"originalType": "String"
}
},
{
"name": "last_name",
"type": "string",
"meta": {
"originalType": "String"
}
},
{
"name": "email",
"type": "string",
"meta": {
"originalType": "String"
}
}
]
}
}
依照本教學課程,您已探索您的CRM系統,並找到您要帶入的表格路徑 Platform,並取得其結構的相關資訊。 您可以在下一個教學課程中使用此資訊,以 從您的CRM系統收集資料並匯入Platform.