-
Notifications
You must be signed in to change notification settings - Fork 1
[FIX] Fixed Messages and Added SNS Events for Closing Session after Escalation. #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@AlexanderKanakis I tested this and it looks good. |
csmith14
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looks good to me!
Shailesh351
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just found that Closed by agent will be used also for other reasons for chat being closed. i.e. Session expiration, or any other App/network error.
Closed by agent should be set only when the chat is actually ended by the salesforce agent. which is when we receive ChatEnded with reason agent from salesforce
https://github.com/WideChat/Apps.Salesforce.LiveAgent/blob/master/helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts#L64...L73
We should keep other message for other errors
|
Thanks @Shailesh351 If I understand this correctly, we are currently catching a few network errors like, 403, 204, an 409, but anything else gets caught in |
Yes... |
|
@Shailesh351 A small clarification: We need events for the rest of the statues codes? |
|
@AlexanderKanakis Not exactly error codes, It should set message for whatever reason it was closed. If it was closed by some error it should show that error. |
Shailesh351
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ear-dev FYI this PR adds new Chat closed events that were not covered earlier.
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
Shailesh351
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are places when the session expired but the event is missing. handlers/LiveAgentSessionHandler.ts helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts
Same for UNKNOWN_ERROR_IN_CHECKING_AGENT_RESPONSE, you can global search for UNKNOWN_ERROR_IN_CHECKING_AGENT_RESPONSE
in helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts handlers/InitiateSalesforceSessionHandler.ts
helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckAgentStatusCallback.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/HandleEndChatCallback.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
|
@Shailesh351 after Alexander merges the 78 changes into this PR please have another look. thanks. |
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts
Outdated
Show resolved
Hide resolved
Removed redundant code Better pies for Shailesh
|
@ear-dev I have added the new events in the wiki which are included in this PR https://github.com/WideChat/Rocket.Chat/wiki/SNS-Logger/_compare/1eee89aad850ee3957c4365c51ec687f61f41002 |
That's awesome! Thanks @Shailesh351 |
Shailesh351
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Alexander!
|
@AlexanderKanakis I tested a case where the Salesforce agent went offline mid chat, and the 'Conversation Closed' system message is not correct. It is showing the contents of the sf.app config entry for "No Live Agent Available Message *" Can you take a look please? thanks... |
|
@AlexanderKanakis I tested a case where I mangled the SF url in the admin UI. What happened is that I get the proper Conversation Closed message, but that same message is also now sent to the visitor in the chat window, instead of the expected "Technical Difficulty Message *" as configured in the SF admin UI. Can you take a look please? thanks. |
@ear-dev do you happen to have debug messages activated? |
This reverts commit 78da510.
|
@AlexanderKanakis making a note here of what we just discussed.... It seems to me like you may have some wires crossed. Please go back over the entire PR and distinguish properly between messages sent to the visitor and messages that are only meant to show up as system messages for the admin under "conversation closed". The messages meant for the visitor are most often configured in the app.admin.ui Thanks. |
-Specify client end messages not caused by error
|
The issue was caused by our error callback function. The error description was used both for the admin UI close message and the client message. Additionally, when the chat was ended by non-error reasons, the client did not get a specific technical issues, or no agents available, message before the end chat message. Both are fixed with new commit. |
|
thanks @AlexanderKanakis this is now working as expected. |



Fixes: WideChat/Rocket.Chat#1278