---
schema_version: "1"
id: 886bdb614ab91a59043c913063e1585e1c7fc7d6e1fac09d55584d8bb1baa9fd
title: Pause Messaging Sessions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-byoc-ccaas/guides/pause-messaging.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/pause-messaging.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a8a7cc193f494c3178958d378c748313256f1cd0eba9ee2ba3ebe56124b5efc8
products:
  - Bring Your Own Channel for CCaaS
  - Service Cloud Developer Content
---
# Pause Messaging Sessions

With status-based capacity enabled in Omni-Channel, reps can pause and unpause Messaging sessions. Rep capacity reflects active, unpaused Messaging sessions only. To support this feature for Bring Your Own Channel for CCaaS, follow these steps.

1. Implement the [onAgentWorkEvent(agentWork)](/docs/service/service-connector-api/references/connector-api/service-connector-interface-onagentwork.html) method in your connector to listen for PAUSED and UNPAUSED events from `agentWork.workEvent`.

   - `Constants.WORK_EVENT.PAUSED`: Omni-Channel sends a PAUSED event if a rep selects **Customer Inactive** in the Conversation component or if a conversation is automatically marked inactive after a period of inactivity.
   - `Constants.WORK_EVENT.UNPAUSED`: Omni-Channel sends an UNPAUSED event if a Messaging end user sends a message after the conversation has been marked inactive.

2. When agentWork is paused, release a rep’s capacity and set the work item status appropriately.
3. When agentWork is unpaused, include the work in a rep’s capacity and update the work item status as needed.

See the [vendor-sdk.js](https://github.com/salesforce-misc/byo-demo-connector/blob/main/src/main/vendor-sdk.js) file in GitHub for a sample implementation in the Bring Your Own Channel for CCaaS demo connector.

**See Also**

- _Salesforce Help_: [Ending or Inactivating Messaging Sessions Automatically](https://help.salesforce.com/s/articleView?id=service.messaging_auto_end.htm)
- _Salesforce Help_: [Set Up a Status-Based Capacity Model](https://help.salesforce.com/s/articleView?id=service.omnichannel_status_based_capacity.htm)
