Use Twilio to Validate Phone Numbers in Odoo

  Odoo Store

Businesses often collect customer phone numbers as a way to ensure easy future communication. This data is especially important in the development of strong customer relationships. So, if a phone number is recorded incorrectly, it can potentially lead to lost profit. 

It is easy to mishear or mistype a phone number when it is provided during a phone call. So, we created the Twilio Phone Validation module to remedy this issue. 

The Challenge

When using the default tools on Odoo, our customers were unable to easily check whether a mobile or landline number they had been provided with was correct. This occasionally led to the number being misheard or mistyped – leading to future issues with communication. 

We were asked to develop a way to allow users to quickly and easily check the validity of a phone number they input into Odoo. 

The Solution

We worked to create a module that helps users to make sure all phone numbers they store in Odoo are valid. This happens automatically in-app, so users don’t need to go through the laborious task of navigating away to an external validation tool. 

This tool allows businesses to remove any fake or mistaken phone numbers from their database, ensuring that they always have good quality data on their customers. 

How it Works

We developed this module to directly integrate with the Twilio API. Our module validates both landline and mobile phone numbers when entered into the contacts in real-time.

Invalid phone validated by twilio in Odoo

Visual Field Indications:

  • If the number is being validated, a yellow clock will appear next to the field
  • If the number entered is valid, a green tick will appear next to the field
  • If the number entered is invalid, a red cross will appear next to the field

Visual Banner Indications:

  • If the number entered is invalid, a red warning banner will be displayed at the top of the form

What is Twilio?

Twilio provides programmable communication tools for making and receiving phone calls, sending and receiving text messages, and performing other communication functions using its web service APIs.

Any Questions or Need a Custom Bespoke Module?

We are a UK based Odoo development team specialising in Python, PostgreSQL, JavaScript and XML. We can supply bespoke Odoo solutions including modules, customisations and website themes. We have worked closely with other companies and look forward to working with you, so feel free to get in touch with any questions or bespoke requests.