# Set up Contact Synchronization from Bitrix24 CRM

Once Cloud Voice is connected to Bitrix24 CRM (Customer Relationship Management, the system that stores your customer and contact records), you can turn on a one-way sync that copies CRM contact records into a dedicated Cloud Voice phonebook. Records flow in a single direction, from Bitrix24 into Cloud Voice, so the resulting phonebook stays in step with your CRM without you maintaining it by hand.

## Before you begin

Make sure you have already [integrated Cloud Voice with Bitrix24 CRM](/pbx/integrations/bitrix24/integrate-cloud-voice-with-bitrix24-crm/).

## Configure the sync

1. Sign in to the PBX (Private Branch Exchange, your phone system) web portal and open **Integrations > CRM**.

2. Turn on **Synchronize Contacts Automatically**.

3. Open the **Synchronize Contacts From** drop-down list and choose which Bitrix24 record types you want to bring across. You can select more than one:

   - **Contacts**: someone who has bought your product or service, or a company contact responsible for purchasing.
   - **Leads**: someone who might become a customer for your product or service.
   - **Companies**: a client, supplier, or partner you do business with.

   ![Synchronize Contacts Automatically toggle with the record-type selector](/images/pbx/synchronize-contact-automatically.png)

4. Use the **Synchronize to Phonebook** drop-down list to pick the phonebook that will hold the imported records. Choose an existing empty phonebook, or create a new one on the spot.

   :::note
   Records can only be synced into an empty phonebook.
   :::

   ![Phonebook selector for the destination of synced Bitrix24 records](/images/pbx/existing-phonebook.png)

5. Set the **Always Query CRM** option to control whether Cloud Voice looks up contacts in Bitrix24 in real time.

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

   - **Enabled**: Cloud Voice queries Bitrix24 in real time for contact details and lets associated extension users search CRM contacts as they dial in the Cloud Voice App.
   - **Disabled**: Cloud Voice queries Bitrix24 only when no match is found in the PBX company contacts.

   :::caution
   Real-time querying adds to your API usage, so keep an eye on your quota when it is enabled. Real-time dial search is also unavailable while number masking is turned on.
   :::

6. Click **Save**.

## What happens next

Go to **Contacts > Phonebooks** and you will see a CRM label ![CRM label](/images/pbx/crm-tag.png) on the phonebook you chose.

![The synced phonebook listed with its CRM label under Contacts and Phonebooks](/images/pbx/crm-phonebook.png)

From then on, whenever an associated extension takes an inbound call from a Bitrix24 record of one of your [selected types](#configure-the-sync) or dials that contact, Cloud Voice looks the contact up, and any match is copied from Bitrix24 into the linked phonebook automatically.

:::note
Because this is a one-way sync from Bitrix24 to Cloud Voice, the linked phonebook and its synced records are read-only.
:::

## Troubleshooting

**Some CRM contacts will not sync.** A record that is missing key details cannot be imported. Confirm the following are present on the contact, then run the directory sync again:

- Either the **First name** or the **Last name** field is filled in.
- At least one phone-number field is filled in.
