edson.ogushi | 2020-05-05 21:22:26 UTC | #1
Hello,
We could make some integrations with web chat using the C# PureCloudPlatform.Client.V2.dll. But I could see that we need to pass to PureCloud the "target queue", and It´s working fine. But we need to pass the "FLOW ID" instead of "Queue ID", and in the post request I'm receiving the errror: ""code":"chat.error.invalid.queue","status":400,"messageWithParams":"An invalid queue was specified"
My question is, if is possible to send the CHAT to FLOW instead of QUEUE.
Follow bellow a example of my code, that I'm using to test.
WebChatApi webChatApi = new WebChatApi(); CreateWebChatConversationRequest createWebChatConversationRequest = new CreateWebChatConversationRequest(); WebChatRoutingTarget webChatRoutingTarget = new WebChatRoutingTarget(); GuestMemberInfo guestMemberInfo = new GuestMemberInfo(); CreateWebChatConversationResponse createWebChatConversationResponse = new CreateWebChatConversationResponse(); // WebChatMessageEntityList webChatMessageEntityList = new WebChatMessageEntityList(); try { createWebChatConversationRequest.OrganizationId = organizationId; createWebChatConversationRequest.DeploymentId = deploymentId;
guestMemberInfo.DisplayName = "Chat teste"; createWebChatConversationRequest.MemberInfo = guestMemberInfo;
webChatRoutingTarget.TargetType = WebChatRoutingTarget.TargetTypeEnum.Queue; webChatRoutingTarget.TargetAddress = targetAddress; createWebChatConversationRequest.RoutingTarget = webChatRoutingTarget;
createWebChatConversationResponse = webChatApi.PostWebchatGuestConversations(createWebChatConversationRequest);
var webSocketEndpoint = createWebChatConversationResponse.EventStreamUri; var webSocket = new ClientWebSocket(); webSocket.ConnectAsync(new Uri(webSocketEndpoint), CancellationToken.None).Wait();
}
Regards,
Edson Ogushi
anon39326996 | 2020-05-05 22:06:24 UTC | #2
The admin defines the flow from the admin UI and can change it from the admin UI without having to change the website. This is intentional and we don't have plans allowing the website to select the flows: https://help.mypurecloud.com/articles/create-a-widget-for-web-chat/
edson.ogushi | 2020-05-07 13:19:52 UTC | #3
Thanks Lucie,
We created the widget and it´s working now.
Regards,
Edson Ogushi
anon39326996 | 2020-05-07 13:42:48 UTC | #4
Nice, glad to hear!
system | 2020-06-07 13:42:50 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 7722