Session Screen Manager
Updated
You have the capability to manage anonymous user session expirations, including configuring the session expiry screen, setting the inactivity duration before a session expires, and customizing alert screens.
There are 2 types of sessions -
Time Based
Rule Based
Time-based session
Application Managed:
Application-managed session lets the live chat application handle the expiration of the session without the dependency of the client or the user to manually terminate a session. The application closes the session based on the time-based inactivity of the user exhibited during the live chat session.
You can set a pre-defined inactivity time of the user in minutes post which the session expires automatically.
You can also configure the alert before the session expires to notify the user of the upcoming session's expiry.
Sno. | Element | Description |
1 | Inactivity Time for session expiry field | Input field to decide after how many minutes of user inactivity on live chat, should the session expire |
2 | Show alert before expiring | Enables or disables the alerts to be shown to user before session expiration |
3 | Time left to session expiry | Input field to plan how many seconds before session expiry should the user see the alert |
4 | Alert Title | Name of alert to be shown to the end user |
5 | Alert Description | Add a description of the alert to inform the user of the session's expiry due to inactivity. |
6 | Continue Session Label | Label for button in case the user wishes to continue the session |
7 | End Session Label | Label for button in case the user wishes to terminate the session |
You can customize the duration (in seconds) for which the alert would be visible on screen; you can also set an alert title and description with two Call to Action buttons to end or continue the ongoing session.
Inactivity Alert Screen:
This is an example of how the inactive screen alert could look like:
If the user clicks on the ‘Continue Session’ the session will continue, and the session inactivity timer will disappear.
Upon clicking the ‘End Session' the session will end, and the user will go back to the home screen of the Live Chat and a new session will be created.
The default Time Based Session is set to Disabled as shown below:
Client Managed
Once it is enabled, continuous user session activity is captured on the browser, providing a reliable source to track and manage user sessions. For instance, if you intend to take specific actions on your website based on live chat user activity (such as sending messages, initiating new conversations, or navigating from the home page to the conversation page), you can enable this feature and monitor user sessions by utilizing the following SDK code:
window.sprChat('subscribeToUpdate', {
topic:'eventTriggered',
subscriber: payload => {if(payload.response.data.eventType==='SESSION_ACTIVE')console.warn('Event',payload)},
});
Expired Session Screen
Expired session screen is shown due to time based or rule-based expiry. This helps in informing the user that the present session has ended and gives them the option to restart another session.
It's a mandatory requirement for an application managed session but optional in case the time-based session is Disabled or is Client Managed.
Expired Session Screen
This is an example of how the expired session screen could look like.
You can customize the expired session screen via the header icon image, header titles, description, and the label of a CTA button to restart another session.
Sno. | Element | Description |
1 | Header icon | To add a header icon by uploading or adding an image from the Digital Asset Manager |
2 | Header | To add a header title |
3 | Header Description | Description of the expired session screen |
4 | New Session Start Button Label | Button label for expired session screen upon clicking the user can initiate a new session |
In case the expired session screen is not enabled this is how the screen would look like upon session expiration: