## Why contacts need a country

A number in the national format — `777 888 555`, say — does not by itself say which network the message belongs to. That is why you pick a country when uploading contacts: we use it to add the prefix, turning `777 888 555` into `+420 777 888 555`.

Numbers that already are in the international format stay exactly as they are. So you do not have to clean the file up beforehand — the Portal handles a mix of national and international numbers.

## Where you pick the country

When [importing to the address book](https://www.bulkgate.com/en/helpdesk/address-book/importing-contacts-to-address-book/), it is the `International phone number format` step of the wizard, the `Country prefix` field. The Portal pre-fills it with the country from your profile.

In a campaign you find the same `Country prefix` field when [importing via CSV/Excel](https://www.bulkgate.com/en/helpdesk/campaign/importing-contacts-to-campaign-via-csv-excel/) and [via vCard](https://www.bulkgate.com/en/helpdesk/campaign/importing-contacts-to-campaign-via-vcard/). When [entering numbers manually](https://www.bulkgate.com/en/helpdesk/campaign/importing-contacts-to-campaign-via-enter-number/), the country is pre-filled right in the number field. For contacts picked from the address book there is no country to choose — those numbers are already in the international format from an earlier import.

> [!NOTE]
> The selected country applies only to numbers that are not in the international format. The Portal says as much next to the `Country prefix` field: "If the phone numbers in the file are in the local format, we will try to add the prefix according to the selected country. Contacts from other countries in the international format will remain unchanged."

## How BulkGate converts the numbers

During processing, spaces, dashes and any other non-digit characters are stripped from the number first. Then the Portal checks whether the number starts with a known international prefix — if it does, it treats it as international and leaves it alone. If it does not, it adds the prefix of the selected country and drops a leading zero if there is one.

With the United Kingdom selected it looks like this:

| number in the file | after the import |
|:--|:--|
| `1632 960850` | `+44 1632 960850` |
| `01632 960850` | `+44 1632 960850` |
| `+48 600 700 800` | `+48 600 700 800` — unchanged |

> [!NOTE]
> Duplicates are compared in the international format as well. A contact written once nationally and once with a prefix is therefore one and the same after the import — and the `Duplicate contact processing` step asks you what to do with it: `Update contacts`, `Rewrite contacts`, or `Skip contacts, do nothing`.

## When the file holds numbers from several countries

If the file contains national numbers from different countries, one selected country will not help — add a column with the country to the file. The country of an individual contact takes precedence over whatever is selected in `Country prefix`.

You give the column its meaning in the `Designation of variables` step: in the selector, pick `Country` from the `Address` group. The value can be written as the country name in English or as its two-letter code.

> [!TIP]
> The column mapping is pre-filled from the first rows of the file — the Portal recognises phone numbers, emails, names and country names. A column headed `country` usually needs no manual assignment. Check the mapping anyway: `Mobile phone` is required and the wizard will not move on without it.

## What happens to numbers we cannot recognise

A number that cannot be turned into a valid phone number even with the selected country does not make it into the address book — that row is skipped during the import and the rest of the file is imported normally. A number shorter than 7 or longer than 18 digits is not recognised, nor is a number for which no existing mobile network can be found.

> [!IMPORTANT]
> If there is not a single valid number in the file, the import does not finish and the Portal reports `No valid contacts found`. The most common causes are a wrongly assigned phone number column, or a country other than the one the numbers belong to.
