buerokratt / Buerokratt-Chatbot

1 stars 18 forks source link

Show information about chat forwarding and takeover #39

Open rasmusei opened 2 years ago

rasmusei commented 2 years ago

AS AN Administrative User I WANT TO see information about chat forwarding and takeover with timestamp SO THAT I can know who forwarded or took over chats and when

Acceptance Criteria

GUI

image

DSL

helemand commented 1 year ago

POST cs-redirect-chat endpoint accepts additional fields for chat forwarding information

curl --location --request POST 'https://localhost:8445/cs-redirect-chat' \
--header 'Cookie: JSESSIONID=2991711AB1D8A47D97A9A10C21A3F482; chatJwt=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIiLCJjaGF0SWQiOiIwMWIwMzEzYi03MzIxLTQzOTctOWJjYS1jYWM1OWE1ODlmMTYiLCJpc3MiOiJieWsuYnVlcm9rcmF0dC5lZSIsImZvcndhcmRUbyI6IiIsImV4cCI6MTY3Mzk2MTMxOSwiaWF0IjoxNjczOTU0MTE5LCJqdGkiOiJmZDg5YzhjYy1kN2YwLTQ2NWEtYjljMi1jZjI1MzVhZTdmMmYifQ.LQILxR0ZFtssPF0ZoW_C-1tl63MQK4JpBgKxV6g2gMCcYuapT6KeKqBBYy2Z9cFmbC8mTz0K-Y1H8kTIEYoIZ2SsLDdCyy0PJMnlgGamRyxmsDaaAXUGS3gpwrrJQv8QE5dGyPFT8E3bglNErMUb3FfDX0JB3urexWGOTEsy0w8oRbanO2P4BfaCKNCyL4NdAq_vrhP8NVoArhxHfkIsLnErlhJDTMkDcFIQi9Fn2q29hgnvvdVl3mnryq9f3UjogM9Bz5DBg9GAMsE7EySAaFXOIWTVPQgEYoA7WY23iA3mfecmE2lgiX4zdaL1jkMiQlGj0hW95wpMEuJyPLVEpQ; customJwtCookie=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIiLCJpZENvZGUiOiJFRTQ5NjAyMTMwODE3IiwiZGlzcGxheU5hbWUiOiJKdXNlciIsImlzcyI6ImJ5ay5idWVyb2tyYXR0LmVlIiwiZXhwIjoxNjczOTYxODM2LCJsb2dpbiI6Ikp1c2VyIiwiaWF0IjoxNjczOTU0NjM2LCJjc2FFbWFpbCI6IiIsImp0aSI6Ijc3ZjI3NmVmLTE0NDYtNGZlYi05MjY4LTA1ZWYzMmI2YjRmMCIsImF1dGhvcml0aWVzIjpbIlJPTEVfQURNSU5JU1RSQVRPUiIsIlJPTEVfU0VSVklDRV9NQU5BR0VSIiwiUk9MRV9DVVNUT01FUl9TVVBQT1JUX0FHRU5UIiwiUk9MRV9DSEFUQk9UX1RSQUlORVIiLCJST0xFX0FOQUxZU1QiXSwiY3NhVGl0bGUiOiIifQ.UdUrUWttVa2G9RGIIDkgWP7emJ7SUnNwFAHFXbs0Oj9SF3TsWWxPQWea0Mb0xo5w9-Rn76-rIzol8uxpb0QmivBSN6YDz-J9J0REgSQu1zAMHRpPVY0u6b8VBMU92hHFTRe2y2_d6JQTpjaPlEGs45WyUQMJ2SwaJfgSIqZA_zCK-b3G5-w-4cg0jOaOp3QiH7gV-HE1T28nU7bI_EuGhVbUcWZrc7BTaA7BY-tyqBhdgR5sX00ucopDkrzyvTarXIjXOdMcU_TK3qDO-VAA-L0bs_Wdj5bBX47l13X8cAJeDpVNDJcrjzMgZTE5UIQ91zwx4qHvhUcL0kq-uwSbsg' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "8cecdc84-57fb-4f18-845e-5ca0be3d6223",
    "customerSupportDisplayName": "someCsaAgent",
    "customerSupportId": "EE49902206520",
    "forwardedByUser": "someAdminUser",
    "forwardedFromCsa": "csa1",
    "forwardedToCsa":  "csa2"
}'

Chat forwarding information can be read from messages endpoints For examplecs-get-messages-by-chat-id returns the following data:

{
    "data": {
        "cs_get_messages_by_chat_id": [
            {
                "id": "f25ea8f0-ed23-4abf-9f76-d99b21094d69",
                "chatId": "8cecdc84-57fb-4f18-845e-5ca0be3d6223",
                "content": "hello",
                "event": "",
                "authorId": "",
                "authorTimestamp": "2023-01-18T12:56:52.159+00:00",
                "authorFirstName": "",
                "authorLastName": "",
                "authorRole": "end-user",
                "forwardedByUser": "someAdminUser",
                "forwardedFromCsa": "csa1",
                "forwardedToCsa": "csa2",
                "rating": "",
                "created": "2023-01-18T12:56:52.895+00:00",
                "updated": "2023-01-18T12:56:52.909+00:00"
            }
        ]
    },
    "error": null
}
ceirowe commented 1 year ago

@rasmusei Prototype updated according to AC-s.

janinakimtrohlev commented 1 year ago

BUG - If i worward chat to another CSA it forwarded but it doesn´t show to whom with timestamp. Also if i´m the person to whom chat is forwarded there is no information about who forwarded with timestamp. Should be in active chat it is shown who forwarded chat and to whom with timestamp (User1 forwarded chat to User2) "Kasutaja1 suunas vestluse Kasutajale2 dd.MM.yyyy HH:mm:ss"

janinakimtrohlev commented 1 year ago

BUG - there is no information about forwarding chat in chat history. Should be Information about forwarding and takeover is also displayed in chat history

janinakimtrohlev commented 1 year ago

BUG - I forwarded chat to another CSA but in widget the notification doesn´t come. Should be in active chat End User sees only that the chat has been forwarded to other CSA as it is now - "Vestlus on üle antud teisele nõustajale"

1AhmedYasser commented 1 year ago

BUG - If i worward chat to another CSA it forwarded but it doesn´t show to whom with timestamp. Also if i´m the person to whom chat is forwarded there is no information about who forwarded with timestamp. Should be in active chat it is shown who forwarded chat and to whom with timestamp (User1 forwarded chat to User2) "Kasutaja1 suunas vestluse Kasutajale2 dd.MM.yyyy HH:mm:ss"

@janinakimtrohlev @varmoh @turnerrainer Working as expected on the local side, please recheck it again on the play environment, also this has been previously reported here https://github.com/buerokratt/Buerokratt-Chatbot/issues/101#issuecomment-1621392082, and the current situation on play is that it does not show at all at the moment

1AhmedYasser commented 1 year ago

BUG - there is no information about forwarding chat in chat history. Should be Information about forwarding and takeover is also displayed in chat history

Screenshot 2023-08-09 at 4 51 59 AM

@janinakimtrohlev @varmoh @turnerrainer Retested and its working perfectly on the local side as shown in the image, please recheck it again on the play environment

1AhmedYasser commented 1 year ago

BUG - I forwarded chat to another CSA but in widget the notification doesn´t come. Should be in active chat End User sees only that the chat has been forwarded to other CSA as it is now - "Vestlus on üle antud teisele nõustajale"

Screenshot 2023-08-09 at 4 53 47 AM

@janinakimtrohlev @varmoh @turnerrainer Retested and its working perfectly on the local side as shown in the image, please recheck it again on the play environment

janinakimtrohlev commented 1 year ago

tested and works