跟进记录模块
跟进记录类型列表接口
接口地址
https://e-crm.icsoc.net/openapi/v1/followupRecord/recordTypes
请求方式
curl -X GET \
https://e-crm.icsoc.net/openapi/v1/followupRecord/recordTypes \
-H "accept: application/json" \
-H "access-token: {access-token}" \
-H "Content-Type: application/json" \
字段说明
- access-token:认证文档中的access_token
响应结果
{
"code": 200,
"message": "ok",
"data": [
{
"id": 36,
"dic_name": "系统自动"
},
{
"id": 37,
"dic_name": "123123"
},
{
"id": 38,
"dic_name": "慢速记录"
},
{
"id": 39,
"dic_name": "光速记录"
}
]
}
字段说明
- id:类型ID
- dic_name:类型说明
新增跟进记录接口
接口地址
https://e-crm.icsoc.net/openapi/v1/followupRecord
请求方式
curl -X POST \
https://e-crm.icsoc.net/openapi/v1/followupRecord \
-H "accept: application/json" \
-H "access-token: {access-token}" \
-H "Content-Type: application/json" \
-d '{
"cle_id": 6470844909275561985,
"opty_id": 6471982131139821569,
"record_type": 36,
"record_content": "跟进记录"
}'
字段说明
- access-token:认证文档中的access_token
- cle_id: 客户ID 必填
- opty_id:商机ID 可选,若有值,必须是客户ID所属的商机
- record_type:跟进记录类型,具体枚举值参见 跟进记录类型列表接口
- record_content:记录内容
响应结果
{
"code": 200,
"message": "ok",
"data": {
"id": "6471994196059471873",
"_id": 6471994196059472000
}
}
字段说明
- id:跟进记录ID(string类型)
- _id:跟进记录ID(int类型)
跟进记录列表接口
接口地址
https://e-crm.icsoc.net/openapi/v1/followupRecord/followupRecords?page={page}&page_size={page_size}&cle_name={cle_name}&record_content_name={record_content_name}&sort={sort}&order={order}&cle_id={cle_id}
请求方式
curl -X GET \
https://e-crm.icsoc.net/openapi/v1/followupRecord/followupRecords?page={page}&page_size={page_size}&cle_name={cle_name}&cle_phone={cle_phone}&record_content_name={record_content_name}&sort={sort}&order={order}&cle_id={cle_id}&create_time=2019/01/01&cursor=WzE1NDIzNTA0NzgsImNybV9jbGllbnRzIzY0NjkwODY3ODA0NTYxNTcxODUiXQQD \
-H "accept: application/json" \
-H "access-token: {access-token}" \
-H "Content-Type: application/json"
字段说明
- access-token:认证文档中的access_token
- cursor: 游标,第一次查询时无需传该值,后续查询时,将上一次查询获取数据中的cursor传递过来即可,此字段用于分页查询
- page_size:客户名称每页显示条数。可选,默认为10。
- cle_id:客户id。若有值,返回符合条件的数据,匹配规则为精确匹配。
- cle_phone:客户电话。若有值,返回符合条件的数据,匹配规则为精确匹配。
- cle_name:客户名称,可选。若有值,返回符合条件的数据,匹配规则为模糊匹配。
- create_time:创建时间,若有值,返回该时间之后的数据,时间格式支持2019-01-01或者2019/01/01
- record_content_name:跟进记录内容,可选。若有值,返回符合条件的数据,匹配规则为模糊匹配。
- sort:排序字段,可选。若有值,根据字段进行排序返回,默认为create_time。
- order:排序规则(asc,desc),默认为降序desc
响应结果
{
"code": 200,
"message": "ok",
"data": {
"cursor": "WzE1NDIzNTA0NzgsImNybV9jbGllbnRzIzY0NjkwODY3ODA0NTYxNTcxODUiXQQD",
"total": 2,
"rows": [
{
"_id": 6471994196059471873,
"opty_id": 6471982131139821569,
"record_type": 36,
"cle_id": "6470844909275561985",
"record_content": "跟进记录",
"create_user_id": 90000172,
"create_time": 1543043660,
"client": {
"_id": 6470844909275561985,
"cle_name": "1112321323",
"cle_phone": "3121123123",
"cle_source": 1,
"cle_source_name": "官网注册",
"cle_type": 1,
"cle_type_name": "潜在客户",
"cle_grade": 1,
"cle_grade_name": "普通客户",
"sale_charge_user_id": 90002395,
"service_charge_user_id": 0,
"is_win_order": 2,
"is_win_order_name": "否",
"last_assign_time": 1542769648,
"last_recycle_time": 0,
"transfer_public_reason_id": 0,
"create_type": 0,
"import_task_id": 0,
"create_user_id": 90002395,
"create_time": 1542769648,
"update_user_id": 90000172,
"update_time": 1542950533,
"last_contact_user_id": 90000172,
"last_contact_time": 1542955157,
"datasource_6469093183677775873": [],
"datasource_6469093183677775873_name": "",
"datasource_6469093223150370817": [],
"datasource_6469093223150370817_name": "",
"input_6470108518023413761": "默认值测试",
"textarea_6470108592325509121": "12311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231",
"select_6470108723137462273": 2,
"select_6470108723137462273_name": "222222222222222",
"radio_6470108813340164097": 2,
"radio_6470108813340164097_name": "222222222222222",
"checkbox_6470108890934788097": [],
"checkbox_6470108890934788097_name": "",
"datetime_6470108953748684801": 1542556800,
"cascade_6470109026154954753": [],
"cascade_6470109026154954753_name": "",
"city_6470109140181303297": [],
"city_6470109140181303297_name": "",
"telephone_6470109718877814785": "132222212312312",
"email_6470109810384945153": "",
"number_6470109847739416577": 3,
"attachment_6470109901174849537": [],
"attachment_6470109999745187841": [],
"input_6470212194209611777": "",
"city_6470212275625246721": [],
"city_6470212275625246721_name": "",
"input_6470212373881012225": "",
"input_6470212433549180929": "",
"input_6470212479275483137": "",
"input_6470212529321918465": "",
"select_6470213535355092993": 0,
"select_6470213535355092993_name": "",
"input_6470213585858707457": "",
"input_6470213645757562881": "",
"select_6470215797540372481": 0,
"select_6470215797540372481_name": "",
"datasource_6470223215527706625": [
"230101"
],
"datasource_6470223215527706625_name": "武汉沌口门店",
"radio_6470475943239729153": 0,
"radio_6470475943239729153_name": "",
"radio_6470477758073126913": 0,
"radio_6470477758073126913_name": "",
"input_6470524366294859777": "",
"attachment_6470524827785740289": [],
"datasource_6470536728531943425": [],
"datasource_6470536728531943425_name": "",
"datasource_6470835680972095489": [],
"datasource_6470835680972095489_name": "",
"original_id": 0,
"cle_pinyin": "1112321323",
"sale_charge_user_name": "1214 luquan",
"sale_charge_department_id": 39,
"sale_charge_department_name": "测试分配策略",
"service_charge_user_name": "",
"service_charge_department_id": 0,
"service_charge_department_name": "",
"last_contact_user_name": "8002 8002坐席",
"last_contact_department_id": 1,
"last_contact_department_name": "公司",
"create_type_name": "手动创建",
"transfer_public_reason_name": "",
"opportunity_num": 4,
"import_task_name": "",
"im_third_id": "",
"create_role_id": 19,
"create_role_name": "鲁权测试",
"switch_times": 0,
"vcc_id": 90000000,
"create_user_name": "1214 luquan",
"create_department_id": 39,
"create_department_name": "测试分配策略",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": 0,
"select_6471310166045474817": 2,
"select_6471310166045474817_name": "222",
"id": "6470844909275561985",
"no_contact_days": 1
},
"opportunity": {
"_id": 6471982131139821569,
"opty_name": "商机1",
"cle_id": 6470844909275561985,
"opty_type": 1,
"opty_type_name": "新客户商机",
"opty_source": 1,
"opty_source_name": "官网注册",
"opty_stage": 22,
"lose_order_reason": 0,
"lose_order_remark": "",
"sale_charge_user_id": 90002395,
"create_user_id": 90000172,
"create_time": 1543040783,
"update_user_id": 90000172,
"update_time": 1543041375,
"last_contact_user_id": 90000172,
"last_contact_time": 1543043667,
"cle_name": "1112321323",
"cle_phone": "3121123123",
"opty_stage_name": "初步洽谈",
"lose_order_reason_name": "",
"sale_charge_user_name": "1214 luquan",
"sale_charge_department_id": 39,
"sale_charge_department_name": "测试分配策略",
"last_contact_user_name": "8002 8002坐席",
"last_contact_department_id": 1,
"last_contact_department_name": "公司",
"vcc_id": 90000000,
"create_user_name": "8002 8002坐席",
"create_department_id": 1,
"create_department_name": "公司",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": 0,
"id": "6471982131139821569"
},
"record_type_name": "系统自动",
"create_role_id": 1,
"create_role_name": "BOSS",
"vcc_id": 90000000,
"create_user_name": "8002 8002坐席",
"create_department_id": 1,
"create_department_name": "公司",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": "公司",
"cle_name": "1112321323",
"update_time": 1543043660,
"update_user_id": 90000172,
"record_content_name": "跟进记录",
"id": "6471994196059471873"
},
{
"_id": 6471994225851613185,
"opty_id": 6471982131139821569,
"record_type": 36,
"cle_id": "6470844909275561985",
"record_content": "跟进记录",
"create_user_id": 90000172,
"create_time": 1543043667,
"client": {
"_id": 6470844909275561985,
"cle_name": "1112321323",
"cle_phone": "3121123123",
"cle_source": 1,
"cle_source_name": "官网注册",
"cle_type": 1,
"cle_type_name": "潜在客户",
"cle_grade": 1,
"cle_grade_name": "普通客户",
"sale_charge_user_id": 90002395,
"service_charge_user_id": 0,
"is_win_order": 2,
"is_win_order_name": "否",
"last_assign_time": 1542769648,
"last_recycle_time": 0,
"transfer_public_reason_id": 0,
"create_type": 0,
"import_task_id": 0,
"create_user_id": 90002395,
"create_time": 1542769648,
"update_user_id": 90000172,
"update_time": 1542950533,
"last_contact_user_id": 90000172,
"last_contact_time": 1543043660,
"datasource_6469093183677775873": [],
"datasource_6469093183677775873_name": "",
"datasource_6469093223150370817": [],
"datasource_6469093223150370817_name": "",
"input_6470108518023413761": "默认值测试",
"textarea_6470108592325509121": "12311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231123112311231",
"select_6470108723137462273": 2,
"select_6470108723137462273_name": "222222222222222",
"radio_6470108813340164097": 2,
"radio_6470108813340164097_name": "222222222222222",
"checkbox_6470108890934788097": [],
"checkbox_6470108890934788097_name": "",
"datetime_6470108953748684801": 1542556800,
"cascade_6470109026154954753": [],
"cascade_6470109026154954753_name": "",
"city_6470109140181303297": [],
"city_6470109140181303297_name": "",
"telephone_6470109718877814785": "132222212312312",
"email_6470109810384945153": "",
"number_6470109847739416577": 3,
"attachment_6470109901174849537": [],
"attachment_6470109999745187841": [],
"input_6470212194209611777": "",
"city_6470212275625246721": [],
"city_6470212275625246721_name": "",
"input_6470212373881012225": "",
"input_6470212433549180929": "",
"input_6470212479275483137": "",
"input_6470212529321918465": "",
"select_6470213535355092993": 0,
"select_6470213535355092993_name": "",
"input_6470213585858707457": "",
"input_6470213645757562881": "",
"select_6470215797540372481": 0,
"select_6470215797540372481_name": "",
"datasource_6470223215527706625": [
"230101"
],
"datasource_6470223215527706625_name": "武汉沌口门店",
"radio_6470475943239729153": 0,
"radio_6470475943239729153_name": "",
"radio_6470477758073126913": 0,
"radio_6470477758073126913_name": "",
"input_6470524366294859777": "",
"attachment_6470524827785740289": [],
"datasource_6470536728531943425": [],
"datasource_6470536728531943425_name": "",
"datasource_6470835680972095489": [],
"datasource_6470835680972095489_name": "",
"original_id": 0,
"cle_pinyin": "1112321323",
"sale_charge_user_name": "1214 luquan",
"sale_charge_department_id": 39,
"sale_charge_department_name": "测试分配策略",
"service_charge_user_name": "",
"service_charge_department_id": 0,
"service_charge_department_name": "",
"last_contact_user_name": "8002 8002坐席",
"last_contact_department_id": 1,
"last_contact_department_name": "公司",
"create_type_name": "手动创建",
"transfer_public_reason_name": "",
"opportunity_num": 4,
"import_task_name": "",
"im_third_id": "",
"create_role_id": 19,
"create_role_name": "鲁权测试",
"switch_times": 0,
"vcc_id": 90000000,
"create_user_name": "1214 luquan",
"create_department_id": 39,
"create_department_name": "测试分配策略",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": 0,
"select_6471310166045474817": 2,
"select_6471310166045474817_name": "222",
"id": "6470844909275561985",
"no_contact_days": 0
},
"opportunity": {
"_id": 6471982131139821569,
"opty_name": "商机1",
"cle_id": 6470844909275561985,
"opty_type": 1,
"opty_type_name": "新客户商机",
"opty_source": 1,
"opty_source_name": "官网注册",
"opty_stage": 22,
"lose_order_reason": 0,
"lose_order_remark": "",
"sale_charge_user_id": 90002395,
"create_user_id": 90000172,
"create_time": 1543040783,
"update_user_id": 90000172,
"update_time": 1543041375,
"last_contact_user_id": 90000172,
"last_contact_time": 1543043667,
"cle_name": "1112321323",
"cle_phone": "3121123123",
"opty_stage_name": "初步洽谈",
"lose_order_reason_name": "",
"sale_charge_user_name": "1214 luquan",
"sale_charge_department_id": 39,
"sale_charge_department_name": "测试分配策略",
"last_contact_user_name": "8002 8002坐席",
"last_contact_department_id": 1,
"last_contact_department_name": "公司",
"vcc_id": 90000000,
"create_user_name": "8002 8002坐席",
"create_department_id": 1,
"create_department_name": "公司",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": 0,
"id": "6471982131139821569"
},
"record_type_name": "系统自动",
"create_role_id": 1,
"create_role_name": "BOSS",
"vcc_id": 90000000,
"create_user_name": "8002 8002坐席",
"create_department_id": 1,
"create_department_name": "公司",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": "公司",
"cle_name": "1112321323",
"update_time": 1543043667,
"update_user_id": 90000172,
"record_content_name": "跟进记录",
"id": "6471994225851613185"
},
、、、
]
}
}
字段说明
- total:总条数
- rows:结果集 (参数说明参见跟进记录字段参考说明)
跟进记录详情接口
接口地址
https://e-crm.icsoc.net/openapi/v1/followupRecord/{record_id}
请求方式
curl -X GET \
http://e-crm-dev-k8s.icsoc.net/api/followupRecord/{record_id}" \
-H "accept: application/json" \
字段说明
- access-token:认证文档中的access_token
- record_id: 跟进记录详情ID 必填
响应结果
{
"code": 200,
"message": "ok",
"data": {
"_id": 6471994196059471873,
"opty_id": 6471982131139821569,
"record_type": 36,
"cle_id": 6470844909275561985,
"record_content": "跟进记录",
"create_user_id": 90000172,
"create_time": 1543043660,
"record_type_name": "系统自动",
"create_role_id": 1,
"create_role_name": "BOSS",
"vcc_id": 90000000,
"create_user_name": "8002 8002坐席",
"create_department_id": 1,
"create_department_name": "公司",
"update_user_name": "8002 8002坐席",
"update_department_id": 1,
"update_department_name": "公司",
"cle_name": "1112321323",
"update_time": 1543043660,
"update_user_id": 90000172,
"record_content_name": "跟进记录",
"id": "6471994196059471873"
}
}
字段说明
cle_id:客户ID
opty_id:商机ID
record_type:跟进记录类型ID
record_content:跟进记录内容
更多字段参见跟进记录字段参考说明
删除跟进记录接口
支持批量删除
接口地址
https://e-crm.icsoc.net/openapi/v1/followupRecord
请求方式
curl -X DELETE \
http://e-crm-dev-k8s.icsoc.net/api/followupRecord" \
-H "accept: application/json" \
-H "access-token: {access-token}" \
-H "Content-Type: application/json" \
-d '{
"ids":[6454980244729479169,6454980230145884161]
}'
字段说明
- access-token:认证文档中的access_token
- ids:跟进记录ID集合
响应结果
{
"code": 200,
"message": "ok",
"data": []
}
跟进记录字段说明
参数名 | 参数说明 |
---|---|
_id | 跟进记录ID |
opty_id | 关联的商机ID,若跟进记录时基于商机添加的,则此字段有值 |
record_type | 跟进记录类型ID,具体枚举值参考 获取跟进记录类型列表 接口 |
cle_id | 关联的客户ID |
record_content | 跟进记录内容(原始内容,未去除html标签) |
create_user_id | 创建人ID |
create_time | 创建时间 |
client | 关联的客户所有信息,具体字段请参考 客户字段说明 |
opportunity | 关联的商机所有信息,具体字段请参考 商机字段说明 |
record_type_name | 跟进记录类型名称 |
create_role_id | 创建人角色ID |
create_role_name | 创建人角色名称 |
vcc_id | 企业号 |
create_user_name | 创建人姓名(坐席工号+空格+坐席名称) |
create_department_id | 创建人部门ID |
create_department_name | 创建人部门名称 |
update_user_name | 更新人名称(坐席工号+空格+坐席名称) |
update_department_id | 更新人部门ID |
update_department_name | 更新人部门名称 |
cle_name | 客户名称 |
update_time | 更新时间 |
update_user_id | 更新人ID |
record_content_name | 跟进记录内容(去除html标签后) |
id | 跟进记录ID(冗余字段,类型为string) |