# Set up Contact Synchronization from Salesforce CRM

With Salesforce CRM (Customer Relationship Management) connected to Cloud Voice, you can turn on a one-way contact sync that pulls your Salesforce contacts into a single Cloud Voice phonebook. This page walks through enabling the sync, choosing which contacts to bring across, and deciding how aggressively Cloud Voice looks up CRM records.

## Before you start

Confirm that the [Salesforce CRM integration](/pbx/integrations/salesforce/integrate-cloud-voice-cloud-voice-with-salesforce-crm/#integrate-yeastar-p-series-pbx-with-salesforce-crm) is already in place. The sync depends on that connection to reach your Salesforce org.

## Enable contact synchronization

1. Sign in to the Cloud Voice management portal and open **Integrations > CRM**.
2. On the CRM integration page, switch on **Synchronize Contacts Automatically**.
3. Open the **Synchronize Contacts From** drop-down and select the Salesforce contact type or types you want to bring into Cloud Voice.

   ![Drop-down listing the Salesforce contact types available to synchronize](/images/pbx/sync-contacts-type.png)

4. In the **Synchronize to Phonebook** drop-down, choose an existing empty phonebook or add a new one to hold the imported records.

   :::note
   Contacts can only sync into an empty phonebook.
   :::

   ![Drop-down for choosing or creating the destination phonebook](/images/pbx/sync-to-phonebook.png)

5. Use the **Always Query CRM** option to decide whether Cloud Voice looks up contacts in Salesforce in real time.

   
   ![Cloud Voice, Always Query CRM toggle on the CRM integration page](/images/pbx/always-query-crm.png)

   - **Enabled**: Cloud Voice queries Salesforce in real time for contact details and supports live dial search of CRM contacts in the Cloud Voice App for the associated extension users.
   - **Disabled**: Cloud Voice only queries Salesforce when no matching record is found in the company contacts.

   :::caution
   Real-time querying makes an extra call to Salesforce for each lookup, which raises your API (Application Programming Interface) usage, so keep an eye on your Salesforce quota. Real-time search is also unavailable while masked numbers are enabled.
   :::

6. Click **Save**.

## What happens next

Under **Contacts > Phonebooks**, the destination phonebook now carries a CRM label.

![CRM label shown on the synchronized phonebook](/images/pbx/crm-tag.png)

![Phonebook list with the CRM-synced phonebook and its label](/images/pbx/phone-book-sync.png)

When an associated user answers an inbound call from one of the selected Salesforce contact types, or dials out to such a contact, Cloud Voice looks up the record and copies the matched contact's details from Salesforce into the linked phonebook.

:::note
This is a one-way sync into Cloud Voice, so the linked phonebook and its synced contacts are read-only.
:::

:::tip
Cloud Voice sometimes creates a new contact on an inbound call even though a matching contact already exists in Salesforce. This is a known CRM integration troubleshooting case, so check the CRM integration troubleshooting guidance before assuming the sync is broken.
:::
