Reputation: 675
I have a problem in integrating LiveAgent (A customer support/ticketing web application) and MS BotFramework.
The botframework in Azure works fine and ready to integrate with it.
https://<ms_azure_link>/api/messages
)api/messages
or something called DirectLine API 3.0?Actually the DirectLine API will return something like this:
{
"conversationId": "3M3TeaDtc3uArxXwlna7AG",
"token": "<My token>",
"expires_in": 1800,
"streamUrl": "wss://directline.botframework.com/v3/directline/conversations/3M3TeaDtc3uArxXwlna7AG/stream?watermark=-&t=ubeJVCXqb9I.dAA.MwBNADMAVABlAGEARAB0AGMAMwB1AEEAcgB4AFgAdwBsAG4AYQA3AEEARwA.7UpMr6Tm0wE.9RmCM_XyjII.CQbU7viSec2P7CtznrijQwou0A8N0GynOvnsUmNT04o",
"referenceGrammarId": "669c7246-bc5c-f25f-aae7-0ad7f39e25b4"
}
As you can see, after you connect using DirectLine, you need to proceed using WebSocket.
So how to connect to this WebSocket thing using LiveAgent? For your information, LiveAgent only suppots HTTP GET/POST to custom URL.
If we don't use DirectLine API, that I will use MS Azure Bot Endpoint.. Now the question becomes: what should be passed to this endpoint so that LiveAgent can authorize itself and using the Bot as usual? Any example on that? DirectLine API Example seems not talking about this.
Thank you very much in advance. I know that this question may not be illustrated well but, hope that you can understand.
If you have any question, please let me know, I am glad to clarify that.
Thank you very much again for all your help.
Upvotes: 1
Views: 530
Reputation: 13918
If you want to treat LiveAgent as a bot client and to make some request against to your bot application. We suggust you to leverage DirectLine APIs.
To implement with DirectLine API via Node.js, you can start with the sample at https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-DirectLine/DirectLineClient
Specially to your second question, to keep a conversation with bot, the web socket stream is not required, unless you want to Receive activities via WebSocket stream
You can refer to the code block from the official DL code sample, which doesn't keep the web socket stream, and only leverage the conversationId
and token
to make HTTP requests against to bot application.
Upvotes: 5
Reputation: 178
We did similar solution using MS BOT Chat SDK without DirectLine using windows selfservicehost service. We are interface from left side to MS BOT and to another CRM from right side. When do you say LiveAgent - is it Salesforce solution?
Upvotes: 2