(测试版)为 SugarCRM Accounts & Contacts 使用流量服务API

注意

的 SugarCRM Accounts & Contacts 来源为测试版。 请参阅 源概述 有关使用测试版标记的源的详细信息。

以下教程将指导您完成创建 SugarCRM Accounts & Contacts 源连接和创建数据流以 SugarCRM 帐户和联系人数据使用Adobe Experience Platform Flow Service API.

快速入门

本指南需要对Experience Platform的以下组件有一定的了解:

  • :Experience Platform允许从各种源摄取数据,同时让您能够使用Platform服务来构建、标记和增强传入数据。
  • 沙箱:Experience Platform提供将单个Platform实例分区为单独虚拟环境的虚拟沙盒,以帮助开发和改进数字体验应用程序。

以下部分提供了成功连接到所需了解的其他信息 SugarCRM 使用 Flow Service API。

收集所需的凭据

为了连接 SugarCRM Accounts & Contacts 对于平台,必须为以下连接属性提供值:

凭据 描述 示例
host 源连接到的SugarCRM API端点。 developer.salesfusion.com
username 您的SugarCRM开发人员帐户用户名。 abc.def@example.com@sugarmarketdemo000.com
password 您的SugarCRM开发人员帐户密码。 123456789

连接 SugarCRM Accounts & Contacts 使用 Flow Service API

下面概述了验证您的 SugarCRM 源,创建源连接,并创建数据流以将帐户和联系人数据Experience Platform。

创建基本连接

基本连接保留了源和平台之间的信息,包括源的身份验证凭据、连接的当前状态和唯一基本连接ID。 基本连接ID允许您从源中浏览和导航文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。

要创建基本连接ID,请向 /connections 提供 SugarCRM Accounts & Contacts 身份验证凭据作为请求正文的一部分。

API格式

POST /connections

请求

以下请求会为 SugarCRM Accounts & Contacts:

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": "SugarCRM Accounts & Contacts base connection",
      "description": "Create a live inbound connection to your SugarCRM Accounts & Contacts instance, to ingest both historic and scheduled data into Experience Platform",
      "connectionSpec": {
          "id": "59a4b493-a615-40f9-bd38-f823d0909a2b",
          "version": "1.0"
      },
      "auth": {
          "specName": "OAuth2 Refresh Code",
          "params": {
              "host": "developer.salesfusion.com",
              "username": "{SUGARCRM_DEVELOPER_ACCOUNT_USERNAME}",
              "password": "{SUGARCRM_DEVELOPER_ACCOUNT_PASSWORD}"
          }
      }
  }'
属性 描述
name 基本连接的名称。 确保基本连接的名称具有描述性,因为您可以使用此名称查找有关基本连接的信息。
description 可包含的可选值,用于提供有关基本连接的更多信息。
connectionSpec.id 源的连接规范ID。 此ID可在您的源通过注册和批准之后进行检索 Flow Service API。
auth.specName 用于向平台验证源的验证类型。
auth.params.host SugarCRM API主机: developer.salesfusion.com
auth.params.username 您的SugarCRM开发人员帐户用户名。
auth.params.password 您的SugarCRM开发人员帐户密码。

响应

成功的响应会返回新创建的基本连接,包括其唯一连接标识符(id)。 在下一步中,需要此ID才能浏览源的文件结构和内容。

{
     "id": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
     "etag": "\"4d08164f-0000-0200-0000-6368b7bf0000\""
}

探索您的来源

使用上一步中生成的基本连接ID,您可以通过执行GET请求来浏览文件和目录。
使用以下调用查找要引入平台的文件路径:

API格式

GET /connections/{BASE_CONNECTION_ID}/explore?objectType=rest&object={OBJECT}&fileType={FILE_TYPE}&preview={PREVIEW}&sourceParams={SOURCE_PARAMS}

执行GET请求以浏览源的文件结构和内容时,必须包括下表中列出的查询参数:

参数 描述
{BASE_CONNECTION_ID} 上一步中生成的基本连接ID。
objectType=rest 要浏览的对象类型。 当前,该值始终设置为 rest.
{OBJECT} 仅当查看特定目录时,才需要此参数。 其值表示要浏览的目录的路径。 对于此源,值将为 json.
fileType=json 要引入平台的文件的文件类型。 目前, json 是唯一支持的文件类型。
{PREVIEW} 一个布尔值,用于定义连接的内容是否支持预览。
{SOURCE_PARAMS} 为要引入平台的源文件定义参数。 检索已接受的格式类型 {SOURCE_PARAMS},则必须在base64中对整个字符串进行编码。
SugarCRM Accounts & Contacts 支持多个API。 根据您使用的对象类型,传递以下任一类型:
  • accounts :您的组织与其有关系的公司。
  • contacts :贵组织与其有既定关系的个人。

的 SugarCRM Accounts & Contacts 支持多个API。 根据您利用要发送的请求的对象类型,如下所示:

请求

对于 SugarCRM 帐户API的值 {SOURCE_PARAMS} 传递为 {"object_type":"accounts"}. 当编码为base64时,它等于 eyJvYmplY3RfdHlwZSI6ImFjY291bnRzIn0= 如下所示。

curl -X GET \
  'https://platform.adobe.io/data/foundation/flowservice/connections/f5421911-6f6c-41c7-aafa-5d9d2ce51535/explore?objectType=rest&object=json&fileType=json&preview=true&sourceParams=eyJvYmplY3RfdHlwZSI6ImFjY291bnRzIn0=' \
  -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}'

对于 SugarCRM 联系API {SOURCE_PARAMS} 传递为 {"object_type":"contacts"}. 在base64中编码时,等于 eyJvYmplY3RfdHlwZSI6ImNvbnRhY3RzIn0= 如下所示。

curl -X GET \
  'https://platform.adobe.io/data/foundation/flowservice/connections/f5421911-6f6c-41c7-aafa-5d9d2ce51535/explore?objectType=rest&object=json&fileType=json&preview=true&sourceParams=eyJvYmplY3RfdHlwZSI6ImNvbnRhY3RzIn0=' \
  -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}'

响应

同样,根据您利用接收响应的对象类型,如下所示:

注意

有些记录已被截断,以便进行更好的演示。

成功的响应会返回如下结构。

{
    "format": "hierarchical",
    "schema": {
        "type": "object",
        "properties": {
            "next": {
                "type": "string"
            },
            "page_number": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "previous": {},
            "total_count": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "count": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "results": {
                "type": "object",
                "properties": {
                    "owner": {
                        "type": "string"
                    },
                    "key_account": {
                        "type": "boolean"
                    },
                    "owner_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "custom_score_field": {
                        "type": "string"
                    },
                    "created_by": {
                        "type": "string"
                    },
                    "billing_city": {
                        "type": "string"
                    },
                    "account_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "phone": {
                        "type": "string"
                    },
                    "account_name": {
                        "type": "string"
                    },
                    "updated_by": {
                        "type": "string"
                    },
                    "updated_by_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "created_date": {
                        "type": "string"
                    },
                    "updated_date": {
                        "type": "string"
                    },
                    "created_by_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "account_score": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "account": {
                        "type": "string"
                    },
                    "contacts": {
                        "type": "string"
                    }
                }
            },
            "page_size": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            }
        }
    },
    "data": [
        {
            "next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 101148,
            "count": 101148,
            "results": {
                "account_id": 1,
                "account": "https://developer.salesfusion.com/api/2.0/accounts/1/",
                "account_name": "No Company",
                "owner_id": 1,
                "owner": "https://developer.salesfusion.com/api/2.0/users/1/",
                "created_date": "2022-06-22T23:35:00Z",
                "created_by": "https://developer.salesfusion.com/api/2.0/users/1/",
                "updated_date": "2019-08-29T15:18:00Z",
                "updated_by": "https://developer.salesfusion.com/api/2.0/users/1/",
                "contacts": "https://developer.salesfusion.com/api/2.0/accounts/1/contacts/",
                "created_by_id": 1,
                "updated_by_id": 1,
                "custom_score_field": "0",
                "account_score": 0,
                "key_account": false
            },
            "page_size": 100
        },
        {
            "next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 101148,
            "count": 101148,
            "results": {
                "account_id": 2,
                "account": "https://developer.salesfusion.com/api/2.0/accounts/2/",
                "account_name": "360 Vacations",
                "owner_id": 45,
                "owner": "https://developer.salesfusion.com/api/2.0/users/45/",
                "phone": "+1 - 384 - 735 - 3844",
                "created_date": "2022-09-22T23:35:00Z",
                "created_by": "https://developer.salesfusion.com/api/2.0/users/45/",
                "updated_date": "2022-02-03T21:55:00Z",
                "updated_by": "https://developer.salesfusion.com/api/2.0/users/45/",
                "billing_city": "New York City",
                "contacts": "https://developer.salesfusion.com/api/2.0/accounts/2/contacts/",
                "created_by_id": 45,
                "updated_by_id": 45,
                "custom_score_field": "0",
                "account_score": 0,
                "key_account": false
            },
            "page_size": 100
        },
        {
            "next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 101148,
            "count": 101148,
            "results": {
                "account_id": 50,
                "account": "https://developer.salesfusion.com/api/2.0/accounts/50/",
                "account_name": "Waverly Trading House",
                "owner_id": 40,
                "owner": "https://developer.salesfusion.com/api/2.0/users/40/",
                "phone": "+1 - 964 - 226 - 4552",
                "created_date": "2022-09-18T23:35:00Z",
                "created_by": "https://developer.salesfusion.com/api/2.0/users/40/",
                "updated_date": "2022-02-03T21:55:00Z",
                "updated_by": "https://developer.salesfusion.com/api/2.0/users/40/",
                "billing_city": "Minneapolis",
                "contacts": "https://developer.salesfusion.com/api/2.0/accounts/50/contacts/",
                "created_by_id": 40,
                "updated_by_id": 40,
                "custom_score_field": "0",
                "account_score": 0,
                "key_account": false
            },
            "page_size": 100
        }
    ]
}
{
    "format": "hierarchical",
    "schema": {
        "type": "object",
        "properties": {
            "next": {
                "type": "string"
            },
            "page_number": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "previous": {},
            "total_count": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "count": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "results": {
                "type": "object",
                "properties": {
                    "opt_out": {
                        "type": "string"
                    },
                    "custom_score_field": {
                        "type": "string"
                    },
                    "contact_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "title": {
                        "type": "string"
                    },
                    "deleted_date": {},
                    "contact": {
                        "type": "string"
                    },
                    "account_name": {
                        "type": "string"
                    },
                    "first_name": {
                        "type": "string"
                    },
                    "del_date": {},
                    "email": {
                        "type": "string"
                    },
                    "delivered_date": {},
                    "owner": {
                        "type": "string"
                    },
                    "owner_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "created_by": {
                        "type": "string"
                    },
                    "account_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "opt_out_date": {},
                    "phone": {
                        "type": "string"
                    },
                    "crm_id": {
                        "type": "string"
                    },
                    "crm_type": {
                        "type": "string"
                    },
                    "updated_by": {
                        "type": "string"
                    },
                    "updated_by_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "deliverability_status": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "deliverability_message": {},
                    "created_date": {
                        "type": "string"
                    },
                    "updated_date": {
                        "type": "string"
                    },
                    "created_by_id": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "account": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    }
                }
            },
            "page_size": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            }
        }
    },
    "data": [
        {
            "next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 135704,
            "count": 135704,
            "results": {
                "contact_id": 1,
                "contact": "https://developer.salesfusion.com/api/2.0/contacts/1/",
                "first_name": "Cynthia",
                "last_name": "Rose",
                "phone": "+1 - 000 - 000 - 000",
                "email": "test.user@hotmail.com",
                "account_id": 10,
                "account_name": "Sunyvale Reporting Ltd",
                "account": "https://developer.salesfusion.com/api/2.0/accounts/10/",
                "owner_name": "Sarah Smith",
                "owner": "https://developer.salesfusion.com/api/2.0/users/41/",
                "created_date": "2022-06-23T23:35:00Z",
                "created_by": "https://developer.salesfusion.com/api/2.0/users/41/",
                "updated_date": "2022-02-03T21:55:00Z",
                "updated_by": "https://developer.salesfusion.com/api/2.0/users/41/",
                "created_by_id": 41,
                "updated_by_id": 41,
                "crm_id": "f53c3982-84ea-11ec-874a-06a1e215b98e",
                "opt_out": "N",
                "crm_type": "Lead",
                "status": "Assigned",
                "title": "Director Operations",
                "custom_score_field": "0",
                "deliverability_status": 0
            },
            "page_size": 100
        },
        {
            "next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 135704,
            "count": 135704,
            "results": {
                "contact_id": 2,
                "contact": "https://developer.salesfusion.com/api/2.0/contacts/2/",
                "email": "test.user@outlook.com",
                "created_date": "2022-06-21T23:35:00Z",
                "updated_date": "2022-02-03T21:55:00Z",
                "opt_out": "N",
                "crm_type": "Contact",
                "deliverability_status": 0
            },
            "page_size": 100
        },
        {
            "next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
            "page_number": 1,
            "total_count": 135704,
            "count": 135704,
            "results": {
                "contact_id": 3,
                "contact": "https://developer.salesfusion.com/api/2.0/contacts/3/",
                "first_name": "Jonathan",
                "last_name": "Ryan",
                "phone": "+1 - 000 - 000 - 0000",
                "email": "test.user@yahoo.com",
                "account_id": 52,
                "account_name": "Q3 ARVRO III PR",
                "account": "https://developer.salesfusion.com/api/2.0/accounts/52/",
                "owner_name": "Max Jensen",
                "owner": "https://developer.salesfusion.com/api/2.0/users/45/",
                "created_date": "2022-07-02T23:35:00Z",
                "created_by": "https://developer.salesfusion.com/api/2.0/users/45/",
                "updated_date": "2022-02-03T21:55:00Z",
                "updated_by": "https://developer.salesfusion.com/api/2.0/users/45/",
                "created_by_id": 45,
                "updated_by_id": 45,
                "crm_id": "f54a1840-84ea-11ec-9546-06a1e215b98e",
                "opt_out": "N",
                "crm_type": "Lead",
                "status": "New",
                "title": "Director Sales",
                "custom_score_field": "0",
                "deliverability_status": 0
            },
            "page_size": 100
    ]
}

创建源连接

您可以通过向 Flow Service API。 源连接由连接ID、源数据文件的路径和连接规范ID组成。

API格式

POST /sourceConnections

请求

以下请求会为 SugarCRM Accounts & Contacts:

根据您使用的对象类型,从以下选项卡中选择:

对于 SugarCRM 帐户API object_type 属性值应 accounts.

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/sourceConnections' \
  -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": "SugarCRM Source Connection",
      "description": "SugarCRM Source Connection",
      "baseConnectionId": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
      "connectionSpec": {
          "id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
          "version": "1.0"
      },
      "data": {
          "format": "json"
      },
      "params": {
          "object_type": "accounts",
          "path": "accounts"
      }
  }'

对于 SugarCRM 联系API object_type 属性值应 contacts.

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/sourceConnections' \
  -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": "SugarCRM Source Connection",
      "description": "SugarCRM Source Connection",
      "baseConnectionId": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
      "connectionSpec": {
          "id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
          "version": "1.0"
      },
      "data": {
          "format": "json"
      },
      "params": {
          "object_type": "contacts",
          "path": "contacts"
      }
  }'
属性 描述
name 源连接的名称。 确保源连接的名称具有描述性,因为您可以使用该名称查找有关源连接的信息。
description 可包含的可选值,用于提供有关源连接的更多信息。
baseConnectionId 基本连接ID为 SugarCRM Accounts & Contacts. 此ID是在前面的步骤中生成的。
connectionSpec.id 与源对应的连接规范ID。
data.format 的格式 SugarCRM Accounts & Contacts 要摄取的数据。 目前,唯一支持的数据格式是 json.
object_type SugarCRM Accounts & Contacts 支持多个API。 根据您使用的对象类型,传递以下任一类型:
  • accounts :您的组织与其有关系的公司。
  • contacts :贵组织与其有既定关系的个人。
path 此值将与您选择的值相同 object_type.

响应

成功的响应会返回唯一标识符(id)。 在后续步骤中需要此ID才能创建数据流。

{
    "id": "8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3",
    "etag": "\"ed05f1e1-0000-0200-0000-6368b8710000\""
}

创建目标XDM架构

要在Platform中使用源数据,必须创建目标架构以根据您的需求构建源数据。 然后,目标架构用于创建包含源数据的Platform数据集。

通过对 架构注册表API.

有关如何创建目标XDM架构的详细步骤,请参阅 使用API创建模式.

创建目标数据集

通过对 目录服务API,在有效负载中提供目标架构的ID。

有关如何创建目标数据集的详细步骤,请参阅 使用API创建数据集.

创建目标连接

目标连接表示与存储所摄取数据的目标的连接。 要创建目标连接,必须提供与数据湖相对应的固定连接规范ID。 此ID为: c604ff05-7f1a-43c0-8e18-33bf874cb11c.

现在,您将唯一标识符作为目标架构作为目标数据集,并将连接规范ID用于数据湖。 使用这些标识符,您可以使用 Flow Service 用于指定将包含集客源数据的数据集的API。

API格式

POST /targetConnections

请求

以下请求会为 SugarCRM Accounts & Contacts:

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
  -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": "SugarCRM Target Connection Generic Rest",
      "description": "SugarCRM Target Connection Generic Rest",
      "connectionSpec": {
          "id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
          "version": "1.0"
      },
      "data": {
          "format": "parquet_xdm",
          "schema": {
              "id": "https://ns.adobe.com/{TENANT_ID}/schemas/b156e6f818f923e048199173c45e55e20fd2487f5eb03d22",
              "version": "1.22"
          }
      },
      "params": {
          "dataSetId": "6365389d1d37d01c077a81da"
      }
  }'
属性 描述
name 目标连接的名称。 确保目标连接的名称具有描述性,因为您可以使用此名称查找有关目标连接的信息。
description 可包含的可选值,用于提供有关目标连接的更多信息。
connectionSpec.id 与数据湖对应的连接规范ID。 此固定ID是: 6b137bf6-d2a0-48c8-914b-d50f4942eb85.
data.format 的格式 SugarCRM Accounts & Contacts 要摄取的数据。
params.dataSetId 在上一步中检索到的目标数据集ID。

响应

成功的响应会返回新目标连接的唯一标识符(id)。 此ID是后续步骤所必需的。

{
    "id": "6b137bf6-d2a0-48c8-914b-d50f4942eb85",
    "etag": "\"8405a268-0000-0200-0000-6368b8c30000\""
}

创建映射

要将源数据摄取到目标数据集,必须先将其映射到目标数据集所附加的目标架构。 这是通过执行POST请求来实现的 Data Prep API ,在请求有效负载中定义数据映射。

API格式

POST /conversion/mappingSets

请求

curl -X POST \
  'https://platform.adobe.io/data/foundation/conversion/mappingSets' \
  -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 '{
      "outputSchema": {
          "schemaRef": {
              "id": "https://ns.adobe.com/{TENANT_ID}/schemas/b156e6f818f923e048199173c45e55e20fd2487f5eb03d22",
              "contentType": "application/vnd.adobe.xed-full+json;version=1"
          }
      },
      "mappings": [
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.account",
          "destination": "_extconndev.account"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.account_id",
          "destination": "_extconndev.account_id"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.acount_name",
          "destination": "_extconndev.account_name"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.account_score",
          "destination": "_extconndev.account_score"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.billing_city",
          "destination": "_extconndev.billing_city"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.contacts",
          "destination": "_extconndev.contacts"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.created_by",
          "destination": "_extconndev.created_by"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.created_by_id",
          "destination": "_extconndev.created_by_id"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.created_date",
          "destination": "_extconndev.created_date"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.custom_score_field",
          "destination": "_extconndev.custom_score_field"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.key_account",
          "destination": "_extconndev.key_account"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.owner",
          "destination": "_extconndev.owner"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.owner_id",
          "destination": "_extconndev.owner_id"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.phone",
          "destination": "_extconndev.phone_no"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.updated_by",
          "destination": "_extconndev.updated_by"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.updated_by_id",
          "destination": "_extconndev.updated_by_id"
      },
      {
          "sourceType": "ATTRIBUTE",
          "source": "results.updated_date",
          "destination": "_extconndev.updated_date"
      }
      ]
  }'
属性 描述
outputSchema.schemaRef.id 的ID 目标XDM架构 生成。
mappings.sourceType 正在映射的源属性类型。
mappings.source 需要映射到目标XDM路径的源属性。
mappings.destination 源属性映射到的目标XDM路径。

响应

成功的响应会返回新创建映射的详细信息,包括其唯一标识符(id)。 在后续步骤中需要此值才能创建数据流。

{
    "id": "059c69f7207b4d7e9b48c47e2fd966a6",
    "version": 0,
    "createdDate": 1597784069368,
    "modifiedDate": 1597784069368,
    "createdBy": "{CREATED_BY}",
    "modifiedBy": "{MODIFIED_BY}"
}

创建流

将数据从 SugarCRM Accounts & Contacts 平台是创建数据流。 现在,您已准备以下必需值:

数据流负责从源中调度和收集数据。 通过在有效负载中提供先前提到的值时执行POST请求,可以创建数据流。

要计划摄取,您必须首先将开始时间值设置为以秒为单位的新纪元时间。 然后,必须将频率值设置为 hourday. 间隔值指定两个连续摄取之间的时段。 间隔值应设置为 124 取决于 scheduleParams.frequency 选择 hourday.

API格式

POST /flows

请求

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/flows' \
  -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": "SugarCRM Connector Description Flow Generic Rest",
      "description": "SugarCRM Connector Description Flow Generic Rest",
      "flowSpec": {
          "id": "6499120c-0b15-42dc-936e-847ea3c24d72",
          "version": "1.0"
      },
      "sourceConnectionIds": [
          "8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3"
      ],
      "targetConnectionIds": [
          "6b137bf6-d2a0-48c8-914b-d50f4942eb85"
      ],
      "transformations": [
          {
              "name": "Mapping",
              "params": {
                  "mappingId": "059c69f7207b4d7e9b48c47e2fd966a6",
                  "mappingVersion": "0"
              }
          }
      ],
      "scheduleParams": {
          "startTime": "1625040887",
          "frequency": "hour",
          "interval": 1
      }
  }'
属性 描述
name 数据流的名称。 确保数据流的名称具有描述性,因为您可以使用该名称查找有关数据流的信息。
description 可包含的可选值,用于提供有关数据流的更多信息。
flowSpec.id 创建数据流所需的流规范ID。 此固定ID是: 6499120c-0b15-42dc-936e-847ea3c24d72.
flowSpec.version 流量规范ID的相应版本。 此值默认为 1.0.
sourceConnectionIds 源连接ID 生成。
targetConnectionIds 目标连接ID 生成。
transformations 此属性包含需要应用于数据的各种转换。 将不符合XDM的数据引入平台时,需要使用此属性。
transformations.name 分配给转换的名称。
transformations.params.mappingId 映射ID 生成。
transformations.params.mappingVersion 映射ID的相应版本。 此值默认为 0.
scheduleParams.startTime 此属性包含有关数据流的摄取调度的信息。
scheduleParams.frequency 数据流收集数据的频率。 可接受的值包括: hourday.
scheduleParams.interval 该间隔指定两个连续流运行之间的周期。 间隔的值应为非零整数。 间隔值应设置为 124 取决于 scheduleParams.frequency 选择 hourday.

响应

成功的响应会返回ID(id)。 您可以使用此ID来监视、更新或删除您的数据流。

{
     "id": "fcd16140-81b4-422a-8f9a-eaa92796c4f4",
     "etag": "\"9200a171-0000-0200-0000-6368c1da0000\""
}

附录

以下部分提供了有关可以监视、更新和删除数据流的步骤的信息。

监控数据流

创建数据流后,您可以监视通过其摄取的数据,以查看有关流量运行、完成状态和错误的信息。 有关完整的API示例,请阅读 使用API监控源数据流.

更新数据流

通过向发出PATCH请求,更新数据流的详细信息(如其名称和描述),以及其运行计划和关联的映射集 /flows 端点 Flow Service API,同时提供数据流的ID。 发出PATCH请求时,必须提供数据流的唯一 etagIf-Match 标题。 有关完整的API示例,请阅读 使用API更新源数据流

更新您的帐户

通过向执行PATCH请求,更新源帐户的名称、说明和凭据 Flow Service API,同时将基本连接ID作为查询参数提供。 发出PATCH请求时,必须提供源帐户的唯一 etagIf-Match 标题。 有关完整的API示例,请阅读 使用API更新源帐户.

删除数据流

通过执行对的DELETE请求删除数据流 Flow Service API,同时提供要作为查询参数一部分删除的数据流的ID。 有关完整的API示例,请阅读 使用API删除数据流.

删除您的帐户

通过向执行DELETE请求删除您的帐户 Flow Service API,同时提供要删除的帐户的基本连接ID。 有关完整的API示例,请阅读 使用API删除源帐户.

在此页面上