领土 API
区域管理帮助您根据客户属性(如地理位置、公司规模或行业)对您的Zoho CRM记录进行分类。这使得与销售团队的相关成员共享相关记录变得容易。区域管理允许您自动将Account、联系人和交易与区域关联,以最大化收入。
注意
Users具有Admin配置文件的权限,能够在Zoho CRM界面中启用此功能。
主要优势
- 避免复杂的数据共享结构 - 具有复杂销售结构的组织可以使用区域轻松与不同团队的用户共享记录。根据账户特征而不是记录的个人所有权来分组记录也很方便。
- 提供专注的工作环境 - 利用区域分配客户账户可以创建专注的工作环境,从而确保更好的销售团队参与度。这也通过减少旅行时间和增加行业专业知识来提高销售团队的效率。
- 准确评估销售团队的表现 - 基于区域生成销售报告,以评估和衡量各区域销售团队的效率。此外,还可以更好地了解每个区域的销售贡献。
- 预测每个区域的销售并设定明确的目标 - 为用户所属的每个区域创建单独的预测目标。这将为不同区域设定的目标提供一个清晰的图景,以便用户保持专注。
请参阅 使用区域 以了解更多关于区域管理的信息。
领土 API
目的
获取您 Zoho CRM 组织启用的区域列表。
端点
- GET /settings/territories
- GET /settings/territories/{territory_ID}
请求详情
请求 URL
获取所有区域:
{api-domain}/crm/{version}/settings/territories
获取特定区域:
{api-domain}/crm/{version}/settings/territories/{territory_ID}
标题
授权:Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
ZohoCRM.settings.territories.{operation_type}
可能的操作类型
全部 - 完全访问区域数据
读取 - 读取区域数据
参数
filters
可以使用Filters参数来检索您正在搜索的区域详细信息。
例如,?filters={"field": {"api_name" : "manager.id"},"value":"431581000000278001" ,"comparator": "equal"}
这可以用于查找经理是J Smith(其用户ID为431581000000278001)的区域。注意
在发送请求之前对filters参数的值进行编码。
- 钥匙reporting_to.id, manager.id, id, permission_type, created_by, modified_by
比较器 equal, not_equal - Key name
比较器 equal, not_equal, ends_with, starts_with, contains, not_contains - 钥匙created_time, modified_time
比较器 less_equal, between, greater_than, less_than, equal
- 钥匙reporting_to.id, manager.id, id, permission_type, created_by, modified_by
ids 整数,可选
表示要检索的地区的唯一ID。
- 页面integer, optional
从各自的页面获取记录列表。页面的默认值为1。
可能的值:
仅正整数。 - 每页integer, optional
获取每页可用的记录列表。默认值和最大可能值为2000。
可能的值:
仅正整数值。 - 包含字符串,可选
表示适用于领土的标准规则(如果有)。
- lead_rule_criteria:用于检索线索模块中使用的条件规则。
- account_rule_criteria:用于检索账户模块中使用的条件规则。
- deal_rule_criteria:用于检索交易模块中使用的规则条件。
- 包括内部细节字符串,可选
此参数用于检索有关区域管理员的附加详细信息。使用此参数的值 manager.zuid 和 manager.status 分别在响应中获取管理员的ZUID和管理员状态。
注意
要从支持地区的模块中获取记录,请在请求中使用参数 "territory_id" 和 "include_child"。有关详细信息,请参阅获取记录列表。
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/territories?include_inner_details=manager.zuid,manager.status"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GETCopiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v8/settings/territories"
type: GET
connection:"crm_oauth_connection"
];
info response;响应 JSON 键
- created_time 字符串
表示当前辖区的创建日期和时间。
- 经理 JSON 对象
表示当前辖区经理的姓名和 ID。
- account_rule_criteria JSON 对象
表示账户模块区域规则的条件(比较符、字段和值)
- 描述字符串
表示该地区的描述(如有)。
- lead_rule_criteria JSON 对象
表示线索模块区域规则的条件(比较器、字段和值)
- reporting_to 字符串
表示父级辖区的唯一ID(如果有)。
- deal_rule_criteria JSON 对象
表示交易模块区域规则的条件(比较器、字段和值)
- permission_type 字符串
表示该区域的权限类型。可能的取值为 read_only 和 read_write_delete。
可能的取值:
read_only:表示只读权限。
read_write_delete:表示可读、可写及可删除权限。 - modified_time 字符串
表示当前区域上次被修改的日期和时间。
- api_name 字符串
表示该区域的 API 名称。
- 名称 字符串
表示辖区的名称。
- modified_by JSON 对象
表示最后修改当前区域的用户的姓名和ID。
- id 字符串
表示辖区的唯一 ID。
注意
如果您的组织未启用商机规则或线索规则,则响应中不会包含该键
可能的错误
- INVALID_REQUEST_METHOD HTTP 400
HTTP请求方法类型无效
解决方法: 您指定了无效的HTTP方法来访问API URL。请指定有效的请求方法。请参考上面的端点部分。 - AUTHORIZATION_FAILED HTTP 400
用户没有足够的权限读取区域数据
解决方法: 该用户没有权限检索区域数据。请联系您的系统管理员。 - OAUTH_SCOPE_MISMATCH HTTP 401
未授权
解决方法: 客户端没有 ZohoCRM.settings.territories.READ 权限范围。请创建具有有效权限范围的新客户端。参考上面的权限范围部分。 - NO_PERMISSION HTTP 403
读取权限被拒绝
解决方法: 用户没有权限读取区域数据。请联系您的系统管理员。 - INVALID_URL_PATTERN HTTP 404
请检查您尝试访问的URL是否正确
解决方法: 指定的请求URL不正确。请指定有效的请求URL。详情请参考上面的请求URL部分。 - INTERNAL_ERROR HTTP 500
服务器内部错误
解决方法: 服务器出现了意外且未处理的异常。请联系支持团队。
示例响应
Copied{
"territories": [
{
"created_time": "2024-07-09T20:50:29+05:30",
"permission_type": "read_only",
"modified_time": "2024-07-09T20:50:29+05:30",
"manager": {
"name": "Patricia",
"id": "2276164000000471001",
"zuid": 8186088,
"status": "active"
},
"api_name": "zoho",
"name": "zoho",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"description": "Organization Parent Territory",
"id": "2276164000001054020",
"reporting_to": null,
"created_by": {
"name": "Patricia",
"id": "2276164000000471001"
}
},
{
"created_time": "2024-07-09T20:50:32+05:30",
"permission_type": "read_write_delete",
"modified_time": "2024-07-09T23:29:13+05:30",
"manager": null,
"api_name": "CEO",
"name": "CEO",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"description": "Users with this role have access to the data owned by all other users.",
"id": "2276164000001054022",
"reporting_to": {
"name": "zoho",
"id": "2276164000001054020"
},
"created_by": {
"name": "Patricia",
"id": "2276164000000471001"
}
},
{
"created_time": "2024-07-09T20:50:33+05:30",
"permission_type": "read_only",
"modified_time": "2024-07-09T20:50:33+05:30",
"manager": null,
"api_name": "China",
"name": "China",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"description": "Users belonging to this role cannot see data for admin users.",
"id": "2276164000001054024",
"reporting_to": {
"name": "Patricia",
"id": "2276164000000471001"
},
"created_by": {
"name": "Patricia",
"id": "2276164000000471001"
}
},
{
"created_time": "2024-07-09T23:21:22+05:30",
"permission_type": "read_only",
"modified_time": "2024-07-09T23:21:22+05:30",
"manager": {
"name": "Patricia",
"id": "2276164000000471001",
"zuid": 8186088,
"status": "active" },
"api_name": "India",
"name": "India",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"description": "test",
"id": "2276164000001054258",
"reporting_to": {
"name": "Manager",
"id": "2276164000001054024"
},
"created_by": {
"name": "Patricia",
"id": "2276164000000471001"
}
},
{
"created_time": "2024-07-10T13:14:35+05:30",
"permission_type": "read_write_delete",
"modified_time": "2024-07-10T13:14:35+05:30",
"manager": {
"name": "Patricia",
"id": "2276164000000471001",
"zuid": 8186088,
"status": "active"
},
"api_name": "USA",
"name": "USA",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"description": "",
"id": "2276164000001064032",
"reporting_to": {
"name": "zoho",
"id": "2276164000001054020"
},
"created_by": {
"name": "Patricia",
"id": "2276164000000471001"
}
}
],
"info": {
"per_page": 2000,
"count": 5,
"page": 1,
"more_records": false
}
}