Country by phone number
The Country by phone number robot determines the country of a phone number in Bitrix24 business processes and robots. It accepts a number in any format; when the number has no country code, the default country is used (RU by default). It returns the country ISO code, the name in Russian and English, the calling code, and Y/N flags for "country determined" and "number valid".
The robot determines the country of a phone number offline (no external service calls) and returns the country ISO code, the name in Russian and English, and the calling code. The input is a number in any format plus an optional default country (an ISO code such as RU) that is used only when the number itself carries no international code. The robot correctly disambiguates countries that share a calling code — for example, +7 is recognized as Russia for 9XX/495 numbers and as Kazakhstan for 7XX numbers. Typical use cases: routing a lead or inquiry by the client country, validating a number before an outbound call, auto-filling the Country field in the card. The "country determined" (Y/N) flag is handy in the next step condition to handle unrecognized numbers.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Phone (any format) | string | yes | |
| Default country (ISO, e.g. RU) — used when the number has no country code | string | — | RU |
What does the robot return?
| Parameter | Type |
|---|---|
| Country ISO code (e.g. RU) | string |
| Country in Russian | string |
| Country in English | string |
| Country calling code | int |
| Country determined (Y/N) | string |
| Number is valid (Y/N) | string |
Scenario: routing a lead by country
- A lead is created with a phone number in international format
- The Country by phone number robot returns the ISO code and the country name
- By the ISO code the workflow assigns the lead to a dedicated manager; on the N flag, to the common queue