【发布时间】:2017-04-10 21:04:31
【问题描述】:
我目前正在开发中测试 Live Agent。如果我理解正确,我应该能够通过在传递正确信息的同时执行 Postman 命令来测试其余 API。
我能够执行System/SessionId 请求并获取带有密钥、ID 和关联令牌的响应。但是,当我尝试执行 Chasitor/ChasitorInit 时,我得到了 "Status 200, OK" 但在 https://eu11.salesforce.com/console 中,在线代理没有收到请求。
这就是我通过邮递员发送的内容 - Chasitor/ChasitorInit:
POST /chat/rest/Chasitor/ChasitorInit HTTP/1.1
Host: d.la1-c2-par.salesforceliveagent.com
X-LIVEAGENT-API-VERSION: 39
X-LIVEAGENT-AFFINITY: c01b1fa0
X-LIVEAGENT-SESSION-KEY: e29ca4be-0580-4769-85fd-0a2ae29efef1!1491574157856!+mmC0MgxsyXGOC5v3M4uKpCQHTg=
X-LIVEAGENT-SEQUENCE: 1
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 3e421cb9-e777-4a6c-9ead-8e14f1f8ff60
有效载荷:
{
"organizationId": "00D0Y0000xxxxx",
"deploymentId": "5720Y0000xxxxx",
"buttonId": "liveagent_button_online_5730Y0000xxxxxx",
"sessionId": "e29ca4be-0580-4769-85fd-0a2ae29efef1",
"userAgent": "",
"language": "en-US",
"screenResolution": "1900x1080",
"visitorName": "Frank Underwood",
"prechatDetails": [],
"prechatEntities": [],
"receiveQueueUpdates": true,
"isPost": true
}
我做错了什么?为什么代理没有聊天请求?
当我使用 .html 页面开始与 Live 代理聊天时 - 它可以工作。代理接收邀请,可以接受,聊天工作。我试图查看使用 .html javascript 时发送了哪些请求,但它似乎正在使用套接字——这超出了我的调试能力。
另外 - 如果我随后从与代理的现有网络聊天中劫持会话密钥/关联令牌到 Postman - 我能够劫持会话并继续从 Postman 发送/接收消息。但我无法从 Postman 开始聊天。
【问题讨论】:
标签: rest salesforce postman salesforce-service-cloud