
To end Messaging Session due to inactivity in Salesforce Messaging for In-App and Web, enable “Automatically mark conversations inactive after a period of customer inactivity”.
1. Creating a Messaging Component to send text when the Messaging Session is idle i.e the customer is not responding to the agents.

2. Go to Messaging Settings in Salesforce Setup. Edit the Messaging Channel.
3. Select the Messaging Component created in Step 1 in Inactive Conversation.
4. Enable “Automatically mark conversations inactive after a period of customer inactivity”.

5. Test it by keeping the Visitor session idle for 5 minutes. The Automatic Message will be sent to the visitor. The Messaging Session will auto ended. This will allow the chat agents to work with other customers.
Output:
