自定义字段各属性说明
- id
自定义字段id
- agent_permission
客服权限,整数,1为必填,0为非必填
- customer_permission
客户权限,整数,0为客户不可见,1为客户可见但不可修改,2为客户可修改
- title
自定义字段名称
- custom_field_name
自定义字段在系统中的名称,形如"SelectField_x"或者"TextField_x"
- content_type
模板字段类型,包括选择类型(SelectField)字段和文本类型(TextField)字段
- SelectField: 选择类型
- droplist: 下拉框
- radio: 单选框
- checkbox: 多选框
- chained_droplist: 级联
- TextField: 文本类型
- text: 普通文本
- area_text: 多行文本
- link: url链接(以http://,https://,ftp://开头)
- date: 日期
- time: 时间
- numeric: 数值
- number: 整数
- options
选项,选择型自定义字段独有
- sort
自定义字段显示顺序,用于工单模板,业务记录模板等
自定义字段传参说明
- 文本类型自定义字段传参示例如下
custom_fields: { TextField_8: "123", TextField_9:"您好" ...}
- 选择型自定义字段
单选框、下拉框的各个选项在系统中由数组存储,前端选了某个选项时,给后端传该选项的数组索引,注意虽然只有一个选项,也要以数组的形式传过去(单个元素的数组)
javascript
{ custom_fields: { SelectField_8: ["0"], SelectField_5: ["1"] } }
复选框,级联字段的各个选项在系统中由数组存储,前端可以选好几个选项,以数组的形式传过去
javascript
{ custom_fields: { SelectField_8: ["0", "0", "1"], SelectField_5: ["1", "2", "0"] } }
示例
{
"customer_custom_fields": [
{
"name": "SelectField_5",
"title": "客户等级",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"content_type": "droplist",
"sort": 1,
"requirement":false,
"options": [
"A级-近期购买意向强烈,需求和价格匹配理论考试等发达啦地方了咖啡大量的积分快点发来看",
"B级-有一定意向,需求和价格还需要引导",
"C级-产品对客户有帮助,先了解一下",
"D级-基本可以放弃",
"E级-完全不考虑",
"F级-竞争对手"
]
},
{
"name": "TextField_8",
"title": "二级域名",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"requirement":false,
"content_type": "text",
"sort": 2,
"options": ""
},
{
"name": "SelectField_6",
"title": "关注点",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"requirement":false,
"content_type": "checkbox",
"sort": 4,
"options": [
"电话",
"IM",
"工单",
"微信",
"机器人",
"其他",
"全渠道"
]
},
{
"name": "TextField_10",
"title": "注册/创建日期",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"content_type": "date",
"requirement":false,
"sort": 6,
"options": ""
},
{
"name": "TextField_72",
"title": "来源url",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"requirement":false,
"content_type": "area_text",
"sort": 14
},
{
"name": "TextField_77",
"title": "超链接",
"comment": "输入网址 ",
"requirement":false,
"agent_permission": 2,
"customer_permission": 3,
"content_type": "link",
"sort": 17,
"options": ""
},
{
"name": "TextField_78",
"title": "正整数",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"content_type": "number",
"requirement":false,
"sort": 18
},
{
"name": "TextField_79",
"title": "数值",
"comment": "",
"agent_permission": 2,
"customer_permission": 0,
"content_type": "numeric",
"requirement":false,
"sort": 19,
"options": ""
}
]
}