Session Timeout Management
The Session Timeout management in WhatsApp4Dynamics helps organizations automatically manage and close inactive chat sessions within Microsoft Dynamics 365 CRM.
A chat session is considered inactive when the customer stops responding for a configured Session Timeout duration. Once the defined session timeout period is reached, the system automatically identifies the chat session as inactive and closes it accordingly.
This functionality helps organizations:
Maintain cleaner chat management
Automatically close inactive conversations
Reduce unnecessary active chat sessions
Changing the Session Timeout Duration
CRM administrators can modify the Session Timeout duration directly from the WhatsApp4Dynamics Configuration.
Steps to Change Session Timeout
Navigate to: WhatsApp4Dynamics → Configurations
Open the active WhatsApp Configuration record.
Locate the: Session Timeout field.
Enter the required timeout duration based on business requirements.
Save the configuration.
Once updated, the new timeout duration will be applied to future inactive chat evaluations.

How Session Timeout Works
The Session Timeout is calculated based on the last message received from the customer (end user).
If the customer does not send any new message within the configured timeout duration, the chat session becomes eligible for automatic closure.
For example:
If the Session Timeout is configured as: 1 Day
And the customer’s last message was received at: 3:00 PM
The session becomes eligible for closure at: 3:00 PM the next day
Automatic Chat Session Closure
WhatsApp4Dynamics uses an automated Power Automate flow to identify and close inactive chat sessions.

This flow:
Runs automatically at scheduled intervals
Evaluates all active chat sessions
Identifies sessions that meet the timeout criteria
Closes inactive chat sessions automatically

By default, the flow executes every:
12 Hours
Understanding the Session Closure Behavior
Since the closure process depends on the scheduled execution of the Power Automate flow, there may sometimes be a delay between the timeout completion and the actual closure of the session.
Example Scenario
Suppose:
The customer’s last message was received at: 3:00 PM
The configured Session Timeout is: 24 Hours
This means the session becomes eligible for closure at: 3:00 PM the next day
Now assume the Power Automate flow had already executed earlier at: 2:00 PM
Since the flow runs every 12 hours, the next scheduled execution will occur at: 3:00 AM
In this scenario:
Even though the session becomes eligible for closure at 3:00 PM
The session will remain visible in the agent’s chat list
Until the next scheduled flow execution at 3:00 AM
Once the flow runs:
The session will be identified as inactive
The chat session will be closed automatically
Modifying the Flow Execution Frequency
If required, organizations can reduce the execution interval of the Power Automate flow to close inactive sessions more quickly.
For example:
Every 2 Hours
Every 1 Hour
Every 30 Minutes

Reducing the execution frequency minimizes the delay between:
Customer inactivity
Session timeout eligibility
Automatic session closure
Important Notes
Session timeout is calculated based on the customer’s last incoming message.
Chat sessions are closed only when the Power Automate flow executes.
Until the flow runs, eligible inactive sessions may still appear in the agent’s active chat sessions list.
Reducing the flow interval improves inactive session handling speed.
With Session Timeout Management in WhatsApp4Dynamics, organizations can efficiently handle inactive customer conversations and maintain a more streamlined and productive communication environment within Microsoft Dynamics 365 CRM.
Last updated
Was this helpful?