---
schema_version: "1"
id: c5375bfd0d2a2ebe35324e2f5ca46613f0bde2b742e56ca451c323e7df56361f
title: Configure Rep Status Syncing for Messaging
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-byoc-ccaas/guides/configure-agent-status-syncing.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-agent-status-syncing.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a102c8a85a3c2b83648565a3295a28ddd5d5cc1af3b96283c5376580a5221bc4
products:
  - Bring Your Own Channel for CCaaS
  - Service Cloud Developer Content
---
# Configure Rep Status Syncing for Messaging

Rep (agent) status syncing, also known as presence status syncing, automatically synchronizes your contact centers with your reps’ Omni-Channel presence statuses to help indicate their availability to receive work. Two-way status syncing allows Salesforce to notify the partners of the status change that happens on the Omni-Channel side, and allows partner contact centers to notify Salesforce about the status change on their side. Two-way status syncing is already supported for voice channels. Bring Your Own Channel for CCaaS adds two-way status syncing support for Messaging.

To configure two-way status syncing for Bring Your Own Channel for CCaaS, use the Service Connector API. When the connector loads, Salesforce calls the `init()` API with the argument `callCenterConfig`. The argument contains a JSON field called `userPresenceStatuses`, which you can parse into a map of `statusId: statusInfo`.

When the rep status changes through the Omni-Channel widget on the Salesforce side, the connector calls the `setAgentStatus()` API with the status information. Implement the `setAgentStatus()` API to receive the updated status and change the status on the contact center side.

When the rep status changes on the contact center side, implement the `publishEvent()` API with the `SET_AGENT_STATUS` event to automatically update the rep statuses on the Salesforce side.

**See Also**

- _Service Connector API Reference_: [init](/docs/service/service-connector-api/references/connector-api/service-connector-interface-init.html)
- _Service Connector API Reference_: [setAgentStatus](/docs/service/service-connector-api/references/connector-api/service-connector-interface-setagentstatus.html)
- _Service Connector API Reference_: [publishEvent](/docs/service/service-connector-api/references/connector-api/service-connector-base-publishevent.html)
- _Salesforce Voice with Partner Telephony Developer Guide_: [Two-Way Agent Status Syncing](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_agent_status_syncing.htm)
- _Salesforce Help_: [Sync Rep Presence Statuses Automatically](https://help.salesforce.com/s/articleView?id=service.voice_pt_setup_sync_agent_presence_statuses.htm)
- _Salesforce Help_: [Understand the Details of the Routing Lifecycle](https://help.salesforce.com/s/articleView?id=service.omnichannel_psr_lifecycle.htm)
