---
schema_version: "1"
id: 43964c7f1a496a7dc7f8cfbe5e9b61497938dbd25a511c114d8b2ee659aa3996
title: Lifecycle of a Messaging Session
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/messaging_life_cycle.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.messaging_life_cycle.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 78559e01f0a747fae1fb641e01a2f8749ec7c432986ccacd593d98ed3e4c150b
description: Learn how Salesforce tracks messaging sessions in Agentforce Service (formerly Service Cloud), from the first message to the last. Understanding session status transitions helps you route and monitor inquiries effectively.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# Lifecycle of a Messaging Session

Learn how Salesforce tracks messaging sessions in Agentforce Service (formerly Service Cloud), from the first message to the last. Understanding session status transitions helps you route and monitor inquiries effectively.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" colspan="2" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.messaging_editions.htm&amp;language=en_US" target="_blank">View supported editions.</a></td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <a name="messaging_life_cycle__image_scz_pgf_5cc"><!-- --></a><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" id="messaging_life_cycle__image_scz_pgf_5cc" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/resources-global/_corporate/images/checkmark.png" alt="Check mark"></span>
              <strong>This article applies to:</strong>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Enhanced In-App Chat, Enhanced Web Chat, Enhanced WhatsApp, Standard and
              Enhanced Facebook Messenger, Standard and Enhanced SMS, Enhanced Apple Messages for
              Business, Enhanced LINE, and Bring Your Own Channel</td>

          </tr>
        </tbody>
      </table>

A messaging session’s participants can include a messaging user—also known as the customer—and a service rep, an Agentforce agent, an Einstein bot, or a combination of them. A session’s possible starting statuses, ending statuses, and status transitions depend on several factors:

- Who initiated the session (the customer or the business)
- The capacity setting (status or tab-based)
- The type of channel , such as SMS or Enhanced Chat
- Account configuration, which is required to make some of the scenarios work

## Customer-Initiated Tab-Based Capacity

Review possible status transitions for messaging sessions that customers initiate in Enhanced Messaging and Enhanced Chat channels with tab-based capacity.

![A map showing how a messaging session transitions through different statuses in Customer-Initiated Tab-Based Capacity.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/customer_tab.png)

## Customer-Initiated Status-Based Capacity

Review possible status transitions for messaging sessions that customers initiate in Enhanced Messaging and Enhanced Chat channels with status-based capacity.

![A map showing how a messaging session transitions through different statuses in Customer-Initiated Status-Based Capacity.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/customer_status.png)

## Business-Initiated Tab-Based Capacity

Review possible status transitions for messaging sessions initiated by your business (service reps, bots, or agents) in Enhanced Messaging and Enhanced In-App Chat channels with tab-based capacity. Reps can’t initiate sessions in Enhanced Web Chat channels.

![A map showing how a messaging session transitions through different statuses in Business-Initiated Tab-Based Capacity.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/business_tab.png)

## Business-Initiated Status-Based Capacity

Review possible status transitions for messaging sessions initiated by your business (service reps, bots, or agents) in Enhanced Messaging and Enhanced In-App Chat channels with status-based capacity. Reps can’t initiate sessions in Enhanced Web Chat channels.

![A map showing how a messaging session transitions through different statuses in Business-Initiated Status-Based Capacity.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/business_tab.png)

## Messaging Session Statuses

New

The messaging session was created. This status occurs when a service rep sends an opening message.

Waiting

An inbound messaging session is being routed or transferred, or a service rep initiated a messaging session and awaits the customer’s response. These actions can cause a session’s status to change to Waiting.

- A customer creates a messaging session by sending a message.
- A service rep transfers an active messaging session.
- A service rep creates a messaging session by sending a message.
- A service rep goes offline during an active messaging session (applies only for tab-based capacity models).
- After a messaging session is marked inactive, the customer resumes the conversation by sending a message.

Active

The messaging session is in progress. This status occurs when a service rep or bot accepts an inbound messaging session, or a customer responds in a business-initiated messaging session.

Consent

(Enhanced Messaging and Enhanced Chat channels only) The messaging user sends only consent keywords (opt-in, double opt-in, or help keywords) in the messaging session. For example, the messaging user has responded Start to agree to receive messages about new products, but hasn’t sent a unique inquiry that requires the attention of a bot or service rep. The Consent status value helps you design routing flows that exclude consent-related messaging sessions from routing.

Inactive

(Enhanced Messaging and Enhanced Chat channels only) A previously active messaging user received a message, but stopped responding before their issue was resolved. Service reps can mark a session inactive by selecting Mark Inactive next to the End Chat option. If a tab-based capacity model is used, reps can also close the session tab and select No Customer Response. You can automatically mark sessions inactive if the customer doesn’t respond within a specified time period.

Marking a session inactive frees up the service rep’s capacity, and also serves as a way to put the messaging user on hold. With tab-based capacity, if the messaging user sends a message after a session is marked inactive, the session status updates to Waiting and the session is rerouted to the next available rep. With status-based capacity, the same rep continues helping the customer. Inactive sessions switch to the Ended status after approximately 30 hours.

Error

(Enhanced Messaging and Enhanced Chat channels only) Salesforce fails to create or update a messaging session or a messaging user record. Misconfigured triggers or field requirements on the Messaging Session or Messaging User objects can cause errors. Salesforce tracks these failed messaging sessions and their error reasons in the Error Reason field on the Messaging Session object.

If the same issue caused the messaging user’s previous messaging session to end in an error, Salesforce updates the previous session’s Last Modified Date field instead of logging a new failed session.

Ended

The messaging user is no longer communicating with a service rep. Possible reasons for this status include:

- The messaging user opted out of receiving messages in the channel.
- The service rep closed the messaging session tab and ended the session.
- A flow sent an automated message in a new session, and the flow action isn’t configured to keep the session open for 48 hours.
- The session was inactive for more than 30 hours.
- A service rep initiated the messaging session, and the customer didn’t respond within 24 hours for a standard channel or 48 hours for an enhanced channel.

It’s up to you to define when a session ends. For example, let your support team know when it’s appropriate to inactivate a session rather than ending it. A service rep can begin a new messaging session with a messaging user only after the user’s previous session has ended with a status of Ended or Error.

Messaging sessions with a status of Ended or Error can be deleted. Sessions can’t be mass-deleted, but you can delete individual sessions on the session record page.

- **[Ending or Inactivating Messaging Sessions Automatically](https://help.salesforce.com/s/articleView?id=service.messaging_auto_end.htm&release=264.0.0&type=5)**  
    In certain circumstances, a messaging session’s status can automatically change to Inactive or Ended. Learn when and how these automatic updates occur.
- **[Automated Session Expiry and Inactivity Handling for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.messaging_auto_session_expiry_enhanced.htm&release=264.0.0&type=5)**  
    Inactivity in Enhanced Chat is handled differently depending on certain timeout settings and whether a service representative, bot, or Agentforce Service agent is involved in the conversation.

#### See Also

- [What’s Messaging?](https://help.salesforce.com/s/articleView?id=service.messaging_introduction.htm&release=264.0.0&type=5 "Seventy-five percent of adults want to communicate with brands the same way they do friends and family—through messaging. Messaging in Agentforce Service (formerly Service Cloud) provides a rich, efficient conversation experience for customers, service reps, and supervisors.")
- [End a Messaging Session](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_end_session.htm&release=264.0.0&type=5 "When you’re done helping a customer, end the messaging session from the conversation window or from the Messaging Sessions list view.")
- [Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm&release=264.0.0&type=5 "With the help of consent keywords, your customers tell you when and whether you can message them on a particular Messaging channel in Agentforce Service (formerly Service Cloud).")
- [Set Up Routing for Messaging Channels](https://help.salesforce.com/s/articleView?id=service.messaging_omnichannel_routing.htm&release=264.0.0&type=5 "Use Omni-Channel to route customer inquiries sent over a Messaging channel to a queue, bot, or qualified service rep. For simple routing scenarios, try queue-based routing. Alternatively, create an Omni-Channel flow to define routing rules and dynamically route messages, or route all messages to a single user or an Agentforce agent.")