Roboteka
Roboteka · Catalog · Format phone number: custom prefix

Format phone number: custom prefix

The Format phone number: custom prefix robot cleans a phone number of spaces, brackets and dashes and normalizes it to "prefix + digits" in Bitrix24 business processes and robots. The prefix is a text input — e.g. +, +1 or +44; when the number already starts with the prefix digits they are not doubled. It returns the normalized number, a Y/N recognition flag and a digits-only string.

The robot accepts one or several numbers in any notation — with spaces, brackets, dashes — plus a Prefix parameter: the string the result must start with (+, +1, +44, 00 and the like). The number is reduced to digits and the prefix is prepended; if the number already begins with the prefix digits they are not doubled: +44 20 7946 0958 with prefix +44 yields +442079460958. The robot does not convert national trunk codes. Typical cases: bringing a database to a single international form before an SMS campaign or a telephony integration. It returns the normalized number, a "Number recognized" Y/N flag and a digits-only variant.

What input parameters does the robot accept?

Parameter Type Required? Default
Phone number string yes
Prefix (country code) string +

What does the robot return?

Parameter Type
Normalized number string
Number recognized (Y/N) string
Digits only (no +) string

Scenario: one international format before an SMS campaign

  1. The card holds the number as (0044) 20 7946-0958
  2. The robot with prefix +44 converts it to +442079460958
  3. The SMS gateway receives the number in the expected format

Related robots