在调用Einstein Bot时,使用RoutingService或RoutingServiceREST API来确保聊天转移只会发生在队列成员之间。示例代码如下:
//通过RoutingService API对Einstein Bot进行调用 RoutingService.ReplyResult botReply = RoutingService.replyToConversation(botConversation);
//通过RoutingServiceREST API对Einstein Bot进行调用 HTTPResponse httpResponse = new HTTP().send(req); String jsonString = httpResponse.getBody(); RoutingService.Response botResponse = RoutingService.Response.parse(jsonString);
//上述示例代码中RoutingService和RoutingServiceREST API都可以用来调用Einstein Bot,以确保聊天转移只在队列成员之间发生。