使用Flow Service API创建Salesforce Service Cloud源连接
基本连接表示源和Adobe Experience Platform之间的已验证连接。
阅读本教程以了解如何使用Flow Service API为Salesforce Service Cloud创建基本连接。
快速入门
本指南要求您对 Adobe Experience Platform 的以下组件有一定了解:
以下部分提供使用Flow Service API成功连接到Salesforce Service Cloud所需了解的其他信息。
收集所需的凭据
有关检索凭据的更多信息,请阅读身份验证指南。
使用Experience Platform API
有关如何成功调用Experience Platform API的信息,请参阅Experience Platform API快速入门指南。
创建基本连接
基本连接会保留源与Experience Platform之间的信息,包括源的身份验证凭据、连接的当前状态以及唯一的基本连接ID。 基本连接ID允许您浏览和浏览源中的文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。
要创建基本连接ID,请在提供您的Salesforce Service Cloud身份验证凭据作为请求参数的一部分时,向/connections端点发出POST请求。
API格式
POST /connections
请求
以下请求使用OAuth 2客户端凭据为Salesforce Service Cloud创建基本连接:
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/connections' \
-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 '{
"name": "Salesforce Service Cloud account for ACME data (OAuth2)",
"description": "Salesforce Service Cloud account for ACME data (OAuth2)",
"auth": {
"specName": "OAuth2 Client Credential",
"params":
"environmentUrl": "https://acme-enterprise-3126.my.salesforce.com",
"clientId": "xxxx",
"clientSecret": "xxxx",
"apiVersion": "60.0"
}
},
"connectionSpec": {
"id": "cb66ab34-8619-49cb-96d1-39b37ede86ea",
"version": "1.0"
}
}'
属性
描述
auth.params.environmentUrlSalesforce Service Cloud实例的URL。
auth.params.clientId与您的Salesforce Service Cloud帐户关联的客户端ID。
auth.params.clientSecret与您的Salesforce Service Cloud帐户关联的客户端密钥。
auth.params.apiVersion您正在使用的Salesforce Service Cloud实例的REST API版本。
connectionSpec.idSalesforce Service Cloud连接规范ID:
cb66ab34-8619-49cb-96d1-39b37ede86ea。响应
成功的响应将返回您新创建的基本连接及其唯一ID。
{
"id": "4267c2ab-2104-474f-a7c2-ab2104d74f86",
"etag": "\"0200f1c5-0000-0200-0000-5e4352bf0000\""
}
后续步骤
通过完成本教程,您已使用Flow Service API创建了Salesforce Service Cloud基本连接。 您可以在下列教程中使用此基本连接ID:
recommendation-more-help
experience-platform-help-sources