You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SF.app timeout timer] Reset the timeout timer during an escalated session when the user starts typing instead of message sent. #1256
If the visitor is typing a message, we don't want the timer to go off. We would like the timer to reset when the visitor starts typing, instead of when the visitor sends the message.
Since our timer is controlled by the app and not the widget, maybe we need to use 'sneak peek'?
FYI - I think that I am still seeing sneak peek as flaky..... but in the meantime we should design and implement this in any case.
@bhardwajaditya can you please look at sneak peek to verify our fixes are still in? not sure why my tests show it to be flaky.
Also, please come up with a design how to do this if possible.
ISSUE: In order to reset the timeout banner on the widget when the visitor starts typing, we need to send a message from the SF.app down to the widget that resets the customFields. However we do not want to display any message content to the visitor for this type of message/payload.
Maybe we need to create a new listener where the app can publish a message that the widget will listen for. This is kind of the way the widget sends visitor typing (for example) to the app..... but we need it to work in the other direction.
@csmith14 Please verify if the apps-engine PR is still required and reference it in this story if it is. If not please close the PR on apps-engine repo. thanks.
Update: Shailesh has suggested a design where we continue to use the same mechanism for passing info to the widget (a message), but only send one when the timeout warning banner is to be displayed, as opposed to every time the user types in order to reset the customFields.
This design will give all control to the RC.server/SF.app, and take it away from the widget entirely.
Perhaps we need a second scheduled_task for the warning banner. Currently we have a schedule_task for the timeout.
@Shailesh351 please comment on this design and point @csmith14 to some relevant links in the code.
NOTE: consolidating stories for this story to include the Bug:
When the setting on SF.app is toggled to "App", currently the widget is still also in control of killing the session when the timer goes off. We only want this control coming from the RC.server.
Activity
ear-dev commentedon Jul 26, 2022
@bhardwajaditya can you please look at sneak peek to verify our fixes are still in? not sure why my tests show it to be flaky.
Also, please come up with a design how to do this if possible.
csmith14 commentedon Sep 1, 2022
Two PRs have been created in relation to this story:Cws 1256 reset app timer Apps.Salesforce.LiveAgent#71Add modifier argument to executeOnRoomUserTyping Rocket.Chat.Apps-engine#54EDIT: These are now out of date.
ear-dev commentedon Sep 22, 2022
ISSUE: In order to reset the timeout banner on the widget when the visitor starts typing, we need to send a message from the SF.app down to the widget that resets the customFields. However we do not want to display any message content to the visitor for this type of message/payload.
Maybe we need to create a new listener where the app can publish a message that the widget will listen for. This is kind of the way the widget sends visitor typing (for example) to the app..... but we need it to work in the other direction.
csmith14 commentedon Sep 26, 2022
Three PRs have been created for this story:
ear-dev commentedon Sep 27, 2022
@csmith14 Please verify if the apps-engine PR is still required and reference it in this story if it is. If not please close the PR on apps-engine repo. thanks.
ear-dev commentedon Sep 29, 2022
Update: Shailesh has suggested a design where we continue to use the same mechanism for passing info to the widget (a message), but only send one when the timeout warning banner is to be displayed, as opposed to every time the user types in order to reset the customFields.
This design will give all control to the RC.server/SF.app, and take it away from the widget entirely.
Perhaps we need a second scheduled_task for the warning banner. Currently we have a schedule_task for the timeout.
@Shailesh351 please comment on this design and point @csmith14 to some relevant links in the code.
ear-dev commentedon Sep 29, 2022
NOTE: consolidating stories for this story to include the Bug:
When the setting on SF.app is toggled to "App", currently the widget is still also in control of killing the session when the timer goes off. We only want this control coming from the RC.server.
Shailesh351 commentedon Sep 29, 2022
@csmith14 Here are some links that might help
https://developer.rocket.chat/apps-engine/adding-features/scheduler-api
https://github.com/WideChat/Apps.Salesforce.LiveAgent/blob/master/SalesforceLiveAgentApp.ts#L126
https://github.com/WideChat/Apps.Salesforce.LiveAgent/blob/master/lib/IdleSessionTimeoutProcessor.ts
https://github.com/WideChat/Apps.Salesforce.LiveAgent/blob/master/helperFunctions/TimeoutHelper.ts#L98...L123