我们提供了应用级别的 Webhook 推送机制。
当问卷、评价数据发生「新增」时,支持将数据按照 JSON 格式发送指定服务器。
支持获取应用级别的全局 webhook 地址
重连机制
发送 Post 请求需要目标服务器「在 2 秒内返回 2XX(如 200)作为应答」,如果没有正确回应,尝试重新 1 次推送,间隔 5 秒。如果重新推送也失败,停止推送动作。
{
"campaign": {
// 评价/问卷详情
},
"entry": {
// 数据详情
},
"event_type":"entry_submitted"
}
目前浩客评价、问卷所有字段都支持推送
问卷/评价题目字段类型:NPS、CSAT、CES、评分、多选题、单选题、简答题
系统字段:填写时长、填写地区、浏览器、操作系统、IP、提交方式、填写页面
客户属性:预设客户属性、传入客户属性
字段code | 字段说明 | 字段值 |
---|---|---|
submitted_on | 提交方式 | 自动(expiration)/手动(completion) |
serial_number | 数据序号 | 指生成这条数据的序号(在一个问卷/评价中是唯一的标识) |
delivery_method | 投放方式 | URL 填写(URL)/贴边按钮/弹框(SDK) |
filling_duration | 填写时长 | |
region | 填写地区 | |
browser | 浏览器 | |
os | 操作系统 | |
ip | IP | |
referer | 填写页面 |
{
"campaign": {
"name": "NPS 调研问卷",
"fields": [
{
"code": "field_1",
"label": "你愿意向同事/朋友推荐我们产品吗?",
"type": "NpsField"
},
{
"code": "field_3",
"label": "您觉得哪些方面还需要改进",
"type": "CheckBox",
"choices": [
{
"label": "产品质量",
"value": "d2s6",
"type": "TextChoice"
},
{
"label": "产品设计",
"value": "sbXb",
"type": "TextChoice"
},
{
"label": "服务品质",
"value": "a2aY",
"type": "TextChoice"
},
{
"label": "产品宣传",
"value": "rkeU",
"type": "TextChoice"
},
{
"label": "售后",
"value": "bsXc",
"type": "TextChoice"
},
{
"label": "其他",
"value": "choiceOther",
"type": "OtherChoice"
}
]
},
{
"code": "field_4",
"label": "请告诉我们选择这个分数的原因",
"type": "TextArea"
}
],
"id": "4dbca3a44d407236c71e792a6e2b774a"
},
"entry": {
"referer": "http://127.0.0.1:8080/?appid=5abf14ef-7816-483b-80ea-38640ef010c4",
"submitted_on": "completion",
"delivery_method": "SDK",
"os": "Mac OS X 10.15.7",
"ip": "0:0:0:0:0:0:0:1",
"browser": "Chrome 109.0.0",
"filling_duration": 11,
"created_at": "2023-02-08T10:30:15Z",
"serial_number": 5,
"fields": {
"field_3": {
"value": [
"rkeU",
"bsXc"
]
},
"field_4": "功能可以满足我的需求,但配置比较难以完成",
"field_1": 6,
},
// customer: { uid: 'xxx' }
"region": {
"country": "中国",
"province": null,
"city": null
},
"platform": "Mac"
},
"event_type": "entry_submitted"
}
推送的request header中的 x-requested-by
字段值为 howxm,可用来验证该请求的发送来源浩客。