When capturing emails and phone numbers from users it is important to ensure the information is indeed valid. This is especially true when using that data with The Actor Model. Attempting to send emails to non-existent email addresses, and calling or sending text messages to invalid phone numbers can adversely affect spam scores. The ISEMAIL function will return TRUE when provided a string that appears to be a valid email address. The ISPHONE function will return TRUE when provided a string that appears to be an E-164 formatted phone number.
While the properly formatted E-164 phone number stored on the Actor is needed to ensure when interacting with the user over Voice or SMS, users are used to seeing phone numbers formatted in different ways depending on their locale. The FORMAT_PHONE function will display an E-164 string in various formats.
FORMAT_PHONE("+15558675309", "NATIONAL") => "(555) 867-5309"
Was this article helpful?
Articles in this section
- What is Airscript?
- Airscript Quick Start
- Airscript Examples
- Advanced Airscript Examples
- Working with Text in Airscript
- Working with Numbers and Currency in Airscript
- Working with Date, Time & DateTime in Airscript
- Working with Email & Phone Numbers in Airscript
- Working with Missing Values with Airscript
- Encoding in Airscript (URLs & Base64)