Open rasmusei opened 2 years ago
Administrator should have right to take over or forward the chat also when chatting CSA is active with status 1.
@turnerrainer Isn't this covered by the existing cs-redirect-chat
?
curl -X POST --location "http://localhost:8080/cs-redirect-chat" \
-H "Content-Type: application/json" \
-d "{
\"id\": \"id of the chat\",
\"customerSupportId\": \"user id\",
\"customerSupportDisplayName\": \"user name\"
}"
@joonasroosalung according to AC, this functionality is already covered but needs some additional attention / validation.
@rasmusei This functionality is hard to prototype. This task should be re-introduced when DSL is attached.
Admin can redirect a chat, if chat assigned CSA is online
or idle
. Does not need activity check.
CSA can redirect or claim a chat, if chat assigned CSA is idle
. Must check activity before redirect/claim.
Existing functionality:
CSA is removed from chat if assigned CSA becomes customerSupportStatus = 'offline'
or customerSupportActive = 'false'
.
Use existing /cs-redirect-chat
when non-admin CSA is redirecting. Use existing /cs-admin-redirect-chat
when a user with both ROLE_CUSTOMER_SUPPORT_AGENT
and ROLE_ADMINISTRATOR
roles is redirecting.
get_claimed_chat
will be returned whether the chat is successfully redirected or not. If successful, the customerSupportId
will be the same as on the outgoing request. For an unsuccessful request the returned customerSupportId
value will be the same as forwardedFromCsa
.
Request /cs-redirect-chat
curl -X POST --location "https://localhost:8445/cs-redirect-chat" \
-H "Content-Type: application/json" \
-d "{
\"id\": \"s0me-ch4t-1d\",
\"customerSupportId\": \"EE200\",
\"customerSupportDisplayName\": \"C. S. Agent\",
\"csaTitle\": \"\",
\"forwardedByUser\": \"EE900\",
\"forwardedFromCsa\": \"EE100\",
\"forwardedToCsa\": \"EE200\"
}"
Response /cs-redirect-chat
{
"data": {
"get_claimed_chat": {
"id": "s0me-ch4t-1d",
"customerSupportId": "EE200",
"customerSupportDisplayName": "C. S. Agent",
"endUserId": "",
"endUserFirstName": "",
"endUserLastName": "",
"externalId": "",
"forwardTo": "",
"forwardToName": "",
"receivedFrom": "",
"receivedFromName": "",
"status": "OPEN",
"endUserEmail": "",
"endUserPhone": "",
"endUserOs": "Mozilla/5.0",
"endUserUrl": "https://localhost:3000/",
"lastMessage": "",
"created": "2023-02-07T16:21:40.888+00:00",
"updated": "2023-02-07T16:22:38.863+00:00",
"ended": "",
"csaTitle": ""
}
},
"error": null
}
BUG - When CSA or Administrator is inactive there is opportunity, to "suuna kolleegile" and "võta üle", but when CSA or Administrator is active then it is opportunity only to "Võta üle". Should be - when CSA or Administrator is active it will be possible " Suuna kolleegile" and "Võta üe". If CSA or Administrator is "not active", "suuna kolleegile" and "võta üle" should be as disabled options Tested at https://admin.play.buerokratt.ee/chat/vestlus/aktiivsed
BUG - When CSA or Administrator is inactive there is opportunity, to "suuna kolleegile" and "võta üle", but when CSA or Administrator is active then it is opportunity only to "Võta üle". Should be - when CSA or Administrator is active it will be possible " Suuna kolleegile" and "Võta üe". If CSA or Administrator is "not active", "suuna kolleegile" and "võta üle" should be as disabled options Tested at https://admin.play.buerokratt.ee/chat/vestlus/aktiivsed
@janinakimtrohlev Fixed in https://github.com/buerokratt/Buerokratt-Chatbot/pull/264
AS AN Administrator and CSA I WANT TO be able to re-assign chats to other CSAs within the same organization SO THAT chats could be better organized
Acceptance Criteria
DSL