Just as important as checking emails before sending an email marketing campaign is to validate phone numbers before sending an SMS or call campaign. Although at the moment sending a campaign to invalid telephone numbers does not block it, it can lead to cost overruns that in many cases can make our campaigns unprofitable.
In this article we will see how we can perform the validation of telephone numbers and what information we have about them.
How to validate phone numbers
We can validate phone numbers using a real-time API or by using files. The real-time API works by making a Rest call to the phone number validation service. In a few seconds we get back the answer indicating if the phone number is correct. In addition to the status of the number, we can know more details such as the operator of the line, the country, if it is a fixed or mobile number…
If we have the phone numbers in a file, you can upload them to our platform and the service will automatically validate them. Once validated, you can download them in a CSV or Excel file.
What data can we obtain with phone number validation?
The data returned by each validation is in JSON format.
valid | true |
number | “34934511100” |
local_format | “934511100” |
international_format | “+34934511100” |
country_prefix | “+34” |
country_code | “EN” |
country_name | “Spain” |
location | “Barcelona” |
carrier | “” |
line_type | “landline” |
- valid: responds with “true” or “false” to indicate if the number is valid
- number: returns the telephone number with the international prefix
- local_format: indicates the local telephone number, without the international prefix
- international_format: returns the telephone number in international format
- country_prefix field: returns the international prefix
- coutry_code field returns the country code.
- country_name field returns the country name.
- location field: returns the user’s city.
- carrier field: returns the carrier of the line
- line_type field: returns the line type.
Validation of telephone numbers in Excel
Like email validation, we can validate phone numbers using Excel. We only need to indicate which column contains the telephone numbers and the API key to perform the validation. Once we have indicated these steps we must launch the validation process. In the front part we will see all the results of the verification.
How the validation process works
First, the phone numbers are syntactically checked. Make sure they have the correct international prefix, as well as the required number of digits. Once this validation has been performed, the number is compared with the operator’s telephone database to obtain the country code, city and the active operator of the number.
Combining number validation with contact data maintenance
There are companies that, once they have validated the telephone number, make an automatic call to the number to check the rest of the values, such as name, surname, email… this validation is done automatically and it is the user himself who verifies his data through voice commands or keyboard. We can leverage the call to perform Automated Voice Marketing actions.
There are companies that believe that it is not necessary to perform phone number validation, but a simple cost analysis indicates otherwise. If we are sending an SMS campaign to a group of 50,000 contacts, it is common that if the phone numbers have not been validated, 15% of them are invalid.
This does not give a figure of 7,500 invalid numbers. taking into account that the average cost of an SMS is 0.036€. The non-validation of telephone numbers will cost us 270€.
Considering the opportunity cost, the impact is greater. A very simple way to avoid this would be to implement phone number validation in the registration form. Its operation is very similar to mail verification. You can see a practical example in the article How to validate an email in php securely
By using our library, we would prevent the user from entering wrong numbers or numbers with formats that make their use very complicated.
If you need to know how to implement phone number validation, contact us and we will help you in your purpose.