英文:
How to get message from agent ( in aws connect ) to serverless lambda
问题
我的意图是通过AWS Lex构建一个聊天机器人,并可选择与AWS Connect中的代理人进行通信。
为此,我已经创建了一个自定义的聊天机器人小部件,它通过API网关连接到Lex,通过WebSocket将消息转发给Lex,然后再回复给聊天机器人小部件。我还在客户要与代理人聊天的情况下将这些消息重定向到代理人而不是Lex。
我能够从Lambda向代理人发送消息,但我在接收代理人回复消息方面遇到了问题。我该如何解决这个问题?
英文:
My intention is to build a chatbot thru aws lex and optionally communicate with agent in aws connect.
For this I have created a custom chatbot widget which connects to api gateway and forwards message to lex thru websocket and respond back to chatbot widget. I also redirect these message to agent rather than lex in cases where customer whats to chat with agent.
Im able to send message from lamda to agent, but I am having trouble receiving message back from agent. How can solve this ?
答案1
得分: 1
以下是翻译好的部分:
- 将Amazon Lex机器人添加到Connect,这将允许您在联系流中从机器人路由到代理。详情请参考:https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html
- 然后,您可以使用Connect的API将机器人和代理连接到您的小部件中(这里提供了示例链接)。详情请参考:https://docs.aws.amazon.com/connect/latest/adminguide/enable-chat-in-app.html
- 根据您在聊天小部件中的其他操作,您甚至可能不需要自定义小部件,而可以使用预构建的小部件。详情请参考:https://docs.aws.amazon.com/connect/latest/adminguide/add-chat-to-website.html
英文:
You may find it easier to use Amazon Connect for both the bot and the agent.
- Add an Amazon Lex bot to Connect, this will let you route from the bot to an agent in a contact flow https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html
- You can then use Connect's APIs to connect both to your bot and your agent from your widget (there are samples linked from here) https://docs.aws.amazon.com/connect/latest/adminguide/enable-chat-in-app.html
- Depending on what else you are doing in your chat widget, you may not even need a custom one, you may be able to use the pre-built one https://docs.aws.amazon.com/connect/latest/adminguide/add-chat-to-website.html
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论