Validate and Interpret Phone Number v2.0.0 Help
Validates and interprets phone numbers based on provided inputs and configurable options.
How can I use the Step?
You can use the Step to validate and analyze user phone numbers. The Step lets you improve the accuracy of phone numbers stored in your system, ensure compliance with phone number regulations, and prevent fraud.
How does the Step work?
Input a phone number with a country code to receive its type, validity, formats, and location. Use the advanced analysis for more details and consider configuring caching to save time and costs.
Input settings
The following input settings are available for this Step:
- Phone number: a text field that allows the user to enter a phone number. An example of a valid phone number is
+15555551234
. - 800: Disallow toll-free, premium, UAN (Universal Account Number ), and shared-cost numbers.
- Country: Enable to select allowed countries from the list. You can choose one or more countries from this list to ensure the phone number belongs to an allowed country. The default is to allow all countries.
Advanced analysis
By default, the Step returns phone number type, validity, formats, and location. For more details, you can use the following advanced analysis options available at extra cost:
- Base analysis: Besides default info, provides carrier identity and enhances location with coordinates, metro code, and timezone.
- Deactivation status: Determines whether a phone number has been deactivated, when, and by which carrier the phone number was deactivated based on carriers' phone number data and proprietary analysis. Using the text field, you can specify the start day for checking the deactivation status. The valid date examples are
23.08.2023
and23rd aug 2023
. - Porting status: Finds out if a phone number was ported and what carrier currently has the number. The information you get in response includes the current MCC (mobile country code) and the current MNC (mobile network code).
- Porting history: Finds out when a phone number was ported and where it was ported to. Provides the complete porting history of the phone number, including its current and previous carrier name, MCC, MNC, phone type, and porting date if it was transferred within a specified period (defaults to
90 days
). You can set the porting history period between a minimum of1 day
and a maximum of90 days
.
Note: The advanced analysis costs vary depending on the type and number of analyses selected. To learn more, reach out for support.
Caching
Advanced analysis data for a phone number is cached in your account to mitigate cost and execution time. Using the text field, you can specify the period to cache the analysis data (defaults to 1 week
). The minimum caching period is 1 hour
, and the maximum caching period you can set is 6 months
. The valid input examples are 5 days
and 3 weeks
.
Output and exits behavior
- Output data structure: Example of output data structure. Varies depending on the selected options in Advanced analysis.
- Handle invalid data through separate exit: Enables an
invalid
exit to process invalid data. This allows for better error handling and management of invalid data.
Output example
The output depends on the inputs and selected analysis options. For example, the default analysis result appears as follows:
{
"valid": {
"input": "804-222-1111",
"normalized": "+18042221111",
"type": "fixed-line-or-mobile",
"canBeInternationallyDialled": true,
"possiblyMobile": true,
"isSpecial": false,
"validity": {
"valid": true,
"possible": true,
"code": "valid",
"message": "Phone number is valid and possible."
},
"formats": {
"e164": "+18042221111",
"national": "(804) 222-1111",
"international": "+1 804-222-1111",
"significant": "8042221111",
"rfc3966": "tel:+1-804-222-1111"
},
"location": {
"country": {
"name": "United States of America",
"iso2": "US",
"iso3": "USA",
"dialCode": 1
}
}
}
}
{
"valid": {
"input": "804-222-1111",
"normalized": "+18042221111",
"type": "fixed-line-or-mobile",
"canBeInternationallyDialled": true,
"possiblyMobile": true,
"isSpecial": false,
"validity": {
"valid": true,
"possible": true,
"code": "valid",
"message": "Phone number is valid and possible."
},
"formats": {
"e164": "+18042221111",
"national": "(804) 222-1111",
"international": "+1 804-222-1111",
"significant": "8042221111",
"rfc3966": "tel:+1-804-222-1111"
},
"location": {
"country": {
"name": "United States of America",
"iso2": "US",
"iso3": "USA",
"dialCode": 1
}
}
}
}
Service dependencies
- flow builder v3.42.0
- event-manager v2.0.1
- deployer v2.18.0
- phonenumber-interpreter v.0.0.16
- request advanced phone analysis
- enable advanced phone analysis
- request advanced phone analysis enablement
Release notes
v2.0.0
- Upgrade to phonenumber-interpreter package v.0.0.16
- Update phone number and country input validation to use the phonenumber-interpreter package
- Update Step logic
- Add advanced phone analysis
- Add output example on UI tab
v1.0.5
- Upgrade to npm package awesome-phonenumber version 4.0.0
- Add validations for input parameters
- Add country UI validation to prevent empty default value
- Add an option to handle an invalid phone as an error for invalid exit visibility.
- Enable error processing for the Step
- Move Merge field settings into a separate collapsible group
- Move phone number settings into a separate collapsible group
- Replace legacy phone number input with current text input component.
v1.0.0
- Initial release