接入说明

1. 增加⽅法⽀持发起对话并发送⼀条消息,该消息作为访客消息处理
2. 仅⽀持发送⼀条消息
3. 根据不同接待⽅式的要求,过滤部分消息,如下

【⼈⼯对话】
1. 接⼊对话后,作为对话接通后访客的消息进⾏发送,在对话欢迎语之后
2. 若⼈⼯对话排队,并排队中不允许发送消息时,不⽀持发送
3. 若需要填写询前表单(⼊⼝信息收集),则在提交接⼊对话后,发送该条消息

【留⾔】
1. 接⼊留⾔后,作为接通后访客的消息进⾏发送,在离线提示语之后
2. 若设置询前表单(⼊⼝信息收集),则在提交表单接⼊留⾔后,发送该条消息
3. 若设置留⾔表单,不⽀持发送
4. 若禁⽌留⾔,不⽀持发送
5. 若为留⾔URL,不⽀持发送

【机器⼈】
1. 接⼊机器⼈后,作为接通后访客的消息进⾏发送,在机器⼈提示语之后

【⼯单】
1. 不⽀持发送


⽬前⽀持⽂本、图⽚、视频、⽂件4种消息,使⽤⽅法在对话窗⼝地址后新增参数&fm=

app接入对话传入fm参数(注意:app对话pm中图⽚、视频、⽂件需要使用https协议的地址)

1. ⽂本
参数说明

对象 参数 参数类型 描述
msgType string text
text content string ⽂本内容,⽀持html最⼤⻓度限制:10000

参数示例:

 
   {
 "content": "你好",
 "msgType": "text"
  } 
    

接⼊示例:点击查看效果

     
  https://yfbs.echatsoft.com/visitor/pc/chat.html?companyId=525715&fm=%7B%22content%22%3A%22DEEBOT%20U2%EF%BC%88U2_L%EF%BC%89%22%2C%22msgType%22%3A%22text%22%7D
    

2. 图⽚
参数说明

对象 参数 参数类型 描述
msgType string image
picUrl string 图⽚地址,最⼤⻓度限制:1024
image thumbUrl string 缩略图地址,最⼤⻓度限制:1024

参数示例:

 
 {
 "msgType": "image",
 "picUrl": "http://qnfile.echatsoft.com/7bf5ba09-4d5a-4158-b175-bdef6f094c69",
 "thumbUrl": "http://qnfile.echatsoft.com/7bf5ba09-4d5a-4158-b175-bdef6f094c69?imageView2/0/w/200/h/150"
}
    

接⼊示例:点击查看效果

   
 https://yfbs.echatsoft.com/visitor/pc/chat.html?companyId=525715&fm=%7B%22msgType%22%3A%22image%22%2C%22picUrl%22%3A%22https%3A%2F%2Fwww.echatsoft.com%2Fimages%2Flogo%2Ficon_echat_logo_1.png%22%2C%22thumbUrl%22%3A%22https%3A%2F%2Fwww.echatsoft.com%2Fwp-content%2Fimages%2Flogo.png%22%7D
    

3. 视频
参数说明

对象 参数 参数类型 描述
msgType string video
fileUrl string ⽂件地址,最⼤⻓度限制:1024
fileName string ⽂件名
fileSize int ⽂件大小
video thumbUrl string 视频缩略图地址

参数示例:

 
{
 "fileName": "1.mp4",
 "fileSize": 948265,
 "fileUrl": "http://ossfile.echatsoft.com/yichat-chat/2021-11-16/visitor/cd0fdaea-d9e9-4307-ba6b-1bc8befd1582?Expires=1700100266&OSSAccessKeyId=LTAIkfv0i9V7EJZG&Signature=xRs82nuHhUx6gvuszvMfVNzZj3U%3D",
 "msgType": "video",
 "thumbUrl": "http://ossfile.echatsoft.com/yichat-chat/2021-11-16/visitor/cd0fdaea-d9e9-4307-ba6b-1bc8befd1582?Expires=1700100266&OSSAccessKeyId=LTAIkfv0i9V7EJZG&Signature=Z%2BcZytYuAq60Of9%2FkYXTSVlOyAE%3D&x-oss-process=video%2Fsnapshot%2Ct_1000%2Cf_jpg%2Cw_200%2Ch_150%2Cm_fast"
}
    

接⼊示例:点击查看效果

  
 https://yfbs.echatsoft.com/visitor/pc/chat.html?companyId=525715&fm=%7B%20%22fileName%22%3A%20%221.mp4%22%2C%20%22fileSize%22%3A%20948265%2C%20%22fileUrl%22%3A%20%22http%3A%2F%2Fossfile.echatsoft.com%2Fyichat-chat%2F2021-11-16%2Fvisitor%2Fcd0fdaea-d9e9-4307-ba6b-1bc8befd1582%3FExpires%3D1700100266%26OSSAccessKeyId%3DLTAIkfv0i9V7EJZG%26Signature%3DxRs82nuHhUx6gvuszvMfVNzZj3U%253D%22%2C%20%22msgType%22%3A%20%22video%22%2C%20%22thumbUrl%22%3A%20%22http%3A%2F%2Fossfile.echatsoft.com%2Fyichat-chat%2F2021-11-16%2Fvisitor%2Fcd0fdaea-d9e9-4307-ba6b-1bc8befd1582%3FExpires%3D1700100266%26OSSAccessKeyId%3DLTAIkfv0i9V7EJZG%26Signature%3DZ%252BcZytYuAq60Of9%252FkYXTSVlOyAE%253D%26x-oss-process%3Dvideo%252Fsnapshot%252Ct_1000%252Cf_jpg%252Cw_200%252Ch_150%252Cm_fast%22%7D
    

4. 文件
参数说明

对象 参数 参数类型 描述
msgType string file
fileUrl string ⽂件地址,最⼤⻓度限制:1024
fileName string ⽂件名
fileSize int ⽂件大小

参数示例:

 
{
 "fileName": "1.txt",
 "fileSize": 7,
 "fileUrl": "http://qnfile.echatsoft.com/21121e7d-989a-4d76-a08f-37c4e2b5b92d",
 "msgType": "file"
}
    

接⼊示例:点击查看效果

 
https://yfbs.echatsoft.com/visitor/pc/chat.html?companyId=525715&fm=%7B%20%22fileName%22%3A%20%221.txt%22%2C%20%22fileSize%22%3A%207%2C%20%22fileUrl%22%3A%20%22http%3A%2F%2Fqnfile.echatsoft.com%2F21121e7d-989a-4d76-a08f-37c4e2b5b92d%22%2C%20%22msgType%22%3A%20%22file%22%7D