Unify and manage your data

Phone cleanser

Learn how the phone cleanser validates and standardizes global phone numbers.

Cleanser Name - PhoneCleanserFn

Description

The Phone Cleanser (PhoneCleanserFn) validates, standardizes, and enriches phone numbers as part of data cleansing in the Reltio Data Cloud. It uses Google's libphonenumber library to enforce country‑specific rules and produce a consistent set of output attributes.

Phone numbers are often inconsistent or poorly formatted — entered in inconsistent formats, missing country codes, or containing formatting characters. The Phone Cleanser ensures:

  • Data is consistent and standardized across systems
  • Phone attributes are validated and normalized
  • Downstream processes (matching, analytics, communication) work with high‑quality phone data. This enables reliable identity resolution and better data integrity across domains.
    Important: Cleansing does not guarantee that a phone number is in service or reachable. It verifies format, structure, length, and consistency of the phone number based on numbering plans.
    The cleanser validates numbers against country‑specific rules, applies format rules, length checks, and structure rules and detects/assigns valid number type and metadata.

Supported phone number formats

Supported Input Types
Input TypeExample
With country code+1 415 555 2671
Without country code4155552671 (US by default or based on config)
With formatting characters(415) 555‑2671, 415.555.2671
Vanity number1‑800‑FLOWERS (converted to digits)
Country code rules
ConditionBehavior
Valid country code providedUses rules for that country
Missing or invalid country codeDefaults to US. When no country code is supplied, the cleanser assumes US formatting and validation rules. This may produce unexpected or invalid results for international numbers. We recommend supplying a valid ISO country code or an E.164 formatted number to ensure accurate validation and formatting.
No code, but + prefix detectedAttempts auto-detection from number format
Examples of valid formats
FormatNotes
+1 (415) 555-2671Valid US number
4155552671Valid (auto-detected US)
+44 20 7946 0958Valid UK number
+33 1 42 86 83 26Valid French number

Examples of invalid formats

FormatReason
1234567890Too short for most countries
+1 555 000 0000Invalid area code (555 is reserved)
+1 415 555Too short (missing digits)

Output formats and extracted fields

After cleansing, the phone attribute is enriched with the following structured results:

Output nameDescriptionExample / Notes
Validation statusIndicates whether the number passed all validation checksVALID, INVALID
Phone number format E164: Phone number in international E.164 format+14155552671
National: Country-specific national format(415) 555-2671
International: International format with spaces+1 415 555 2671
RFC3966: URI-compatible phone format (RFC3966)tel:+1-415-555-2671
Country CodeCountry identifier used for validation (ISO or numeric)US or 1
Area codeRegional area code extracted from number415
Local numberLocal portion of the number, after area code5552671
ExtensionExtension provided in input (if any)123
Line typeClassification of number typeMOBILE, FIXED_LINE, TOLL_FREE, VOIP
Geo countryCountry derived from number's geographyUnited States
Geo areaState, province, or city (if regionally mappable)California, London
Carrier informationCarrier associated with number, if availableAT&T
Format maskPattern showing digit structure of the number+n (nnn) nnn-nnnn
Digit countNumber of numeric digits (excluding symbols or separators)11
Digits numberFully numeric version of the phone number14155552671

Cleanser configuration options

ParameterPossible ValuesDescription
licensedCountryCodesISO3166-2 country codes with a semicolon (;) separator. For example, US;IN;RU. If blank, all countries are considered. The licensedCountryCodes parameter restricts phone cleansing to the specified countries. If it's omitted, phone numbers from all countries are supported.
  • If no value is mentioned, the phone cleanser cleanses the phone numbers of all the countries.
  • If a value is mentioned, the phone cleanser cleanses the phone numbers of that country only.
  • If the country code isn't part of the allowed list, the cleanser returns the original input unchanged.

You can configure licensedCountryCodes iat either the physical configuration level or the L3 configuration level.

  • Physical configuration: Contact Reltio Support if licensedCountryCodes must be enabled at the physical configuration level.
  • L3 Configuration: Add licensedCountryCodes under params in the PhoneCleanserFn cleanse configuration. For more information, see Cleanser mapping and L3 examples.
returnDataForInValidStatusThe following options are available:
  • true - This is the default value.
  • false
The returnDataForInValidStatus option is considered when ValidationStatus is INVALID. The following points explain how the returnDataForInValidStatus option works:
  • When the returnDataForInValidStatus option is set to true, the phone cleanser returns the cleansed data even for those phone numbers that are INVALID.
  • When the returnDataForInValidStatus option is set to false, the phone cleanser doesn't return the cleansed data. It just returns the user input along with ValidationStatus.
enhanceCleansingThe following options are available:
  • true
  • false - This is the default value.
The enhanceCleansing option is active only when ValidationStatus is INVALID. The following points explain how the enhanceCleansing option works:
  • If the enhanceCleansing option is set to true and the input phone number doesn't have a prefix of '+' or '0', the phone cleanser tries to re-cleanse the phone number by adding the '+' prefix to the input phone number.
  • If the enhanceCleansing option is set to false, the phone cleanser doesn't try to re-cleanse the phone number.
formatTypeThe following format types are supported:
  • E164
  • INTERNATIONAL
  • NATIONAL
  • RFC3966
This option determines the output format of the phone number. The default format is NATIONAL. For example:
  • E164: +15417543010
  • INTERNATIONAL: +1 541-754-3010
  • NATIONAL: (541) 754-3010
  • RFC3966:+1-541-754-3010

Cleanser mapping and L3 examples

Configure PhoneCleanserFn in the L3 configuration by mapping the nested phone attribute to the cleanser input and output fields.
Mapping snippet
{
  "attribute": "configuration/entityTypes/HCP/attributes/Phone/attributes/Number",
  "mandatory": true,
  "allValues": true,
  "cleanseAttribute": "Number"
}
L3 Configuration
{
  "uri": "configuration/entityTypes/HCP",
  "cleanseConfig": {
    "infos": [
      {
        "uri": "configuration/entityTypes/HCP/cleanse/infos/PhoneCleanserFn1",
        "useInCleansing": true,
        "sequence": [
          {
            "chain": [
              {
                "cleanseFunction": "PhoneCleanserFn",
                "resultingValuesSourceTypeUri": "configuration/sources/ReltioCleanser",
                "proceedOnSuccess": true,
                "proceedOnFailure": true,
                "params": {
                  "licensedCountryCodes": "US",
	      "formatType": "E164"
                },
                "mapping": {
                  "inputMapping": [
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Number",
                      "mandatory": true,
                      "allValues": true,
                      "cleanseAttribute": "Number"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/CountryCode",
                      "mandatory": false,
                      "allValues": true,
                      "cleanseAttribute": "CountryCode"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Type",
                      "mandatory": false,
                      "allValues": true,
                      "cleanseAttribute": "Type"
                    }
                  ],
                  "outputMapping": [
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Type",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "Type"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Number",
                      "mandatory": true,
                      "allValues": false,
                      "cleanseAttribute": "Number"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/CountryCode",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "CountryCode"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Extension",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "Extension"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/LineType",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "LineType"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormatMask",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "FormatMask"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/ValidationStatus",
                      "mandatory": true,
                      "allValues": false,
                      "cleanseAttribute": "ValidationStatus"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/AreaCode",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "AreaCode"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/GeoCountry",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "GeoCountry"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/GeoArea",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "GeoArea"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/DigitCount",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "DigitCount"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/LocalNumber",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "LocalNumber"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/CarrierInfo",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "CarrierInfo"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber",
                      "mandatory": true,
                      "allValues": false,
                      "cleanseAttribute": "FormattedNumber"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-NATIONAL",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "FormattedNumber-NATIONAL"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-INTERNATIONAL",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "FormattedNumber-INTERNATIONAL"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-E164",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "FormattedNumber-E164"
                    },
                    {
                      "attribute": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-RFC3966",
                      "mandatory": false,
                      "allValues": false,
                      "cleanseAttribute": "FormattedNumber-RFC3966"
                    }
                  ]
                }
              }
            ]
          }
        ],
        "nestedAttributeToCleanse": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone"
      }
    ]
  },
  "attributes": [
    {
      "uri": "configuration/entityTypes/HCP/attributes/ID",
      "label": "ID",
      "name": "ID",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/FirstName",
      "label": "First Name",
      "name": "FirstName",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/MiddleName",
      "label": "Middle Name",
      "name": "MiddleName",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/LastName",
      "label": "Last Name",
      "name": "LastName",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/Initial",
      "label": "Initial",
      "name": "Initial",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/Name",
      "label": "Name",
      "name": "Name",
      "description": "",
      "type": "String",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      }
    },
    {
      "uri": "configuration/entityTypes/HCP/attributes/Address",
      "label": "Address",
      "name": "Address",
      "description": "",
      "type": "Nested",
      "hidden": false,
      "important": false,
      "attributeOrdering": {
        "orderingStrategy": "LUD"
      },
      "attributes": [
        {
          "label": "City",
          "name": "City",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "faceted": true,
          "searchable": true,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/City",
          "skipInDataAccess": false
        },
        {
          "label": "State",
          "name": "StateProvince",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "faceted": true,
          "searchable": true,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/StateProvince",
          "lookupCode": "STATE_CODE",
          "skipInDataAccess": false
        },
        {
          "label": "Zip",
          "name": "Zip",
          "type": "Nested",
          "hidden": false,
          "important": false,
          "system": false,
          "faceted": false,
          "searchable": true,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Zip",
          "dataLabelPattern": "{Zip5}-{Zip4}",
          "attributes": [
            {
              "label": "Zip4",
              "name": "Zip4",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "faceted": false,
              "searchable": true,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Zip/attributes/Zip4",
              "skipInDataAccess": false
            },
            {
              "label": "Zip5",
              "name": "Zip5",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "faceted": false,
              "searchable": true,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Zip/attributes/Zip5",
              "skipInDataAccess": false
            }
          ],
          "skipInDataAccess": false
        },
        {
          "label": "Address Input",
          "name": "AddressInput",
          "type": "Blob",
          "hidden": false,
          "important": false,
          "system": false,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/AddressInput",
          "skipInDataAccess": false
        },
        {
          "label": "Address Line 1",
          "name": "AddressLine1",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/AddressLine1",
          "skipInDataAccess": false
        },
        {
          "label": "Address Line 2",
          "name": "AddressLine2",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/AddressLine2",
          "skipInDataAccess": false
        },
        {
          "label": "Country",
          "name": "Country",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Country",
          "skipInDataAccess": false
        },
        {
          "label": "Country Name",
          "name": "CountryName",
          "description": "DO NOT USE this field - use Country instead",
          "type": "String",
          "hidden": false,
          "important": false,
          "system": false,
          "attributeOrdering": {
            "orderingStrategy": "LUD"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/CountryName",
          "skipInDataAccess": false
        },
        {
          "label": "Phone",
          "name": "Phone",
          "type": "Nested",
          "hidden": false,
          "important": false,
          "system": false,
          "required": false,
          "attributeOrdering": {
            "fieldURI": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Rank",
            "orderType": "ASC",
            "orderingStrategy": "FieldBased"
          },
          "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone",
          "dataLabelPattern": "{Type} {Number}",
          "matchFieldURIs": [
            "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber"
          ],
          "attributes": [
            {
              "label": "Type*",
              "name": "Type",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "values": [
                "Mobile",
                "Home",
                "Work",
                "Fax",
                "Main",
                "Work Fax",
                "Home Fax",
                "Pager",
                "Other"
              ],
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Type"
            },
            {
              "label": "Number*",
              "name": "Number",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Number"
            },
            {
              "label": "Country Code*",
              "name": "CountryCode",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "values": [
                "US",
                "IN",
                "GB",
                "AU"
              ],
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/CountryCode"
            },
            {
              "label": "Extension",
              "name": "Extension",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Extension"
            },
            {
              "label": "Formatted Number",
              "name": "FormattedNumber",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber"
            },
            {
              "label": "National Formatted Number",
              "name": "FormattedNumber-NATIONAL",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-NATIONAL"
            },
            {
              "label": "International Formatted Number",
              "name": "FormattedNumber-INTERNATIONAL",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-INTERNATIONAL"
            },
            {
              "label": "E164 Formatted Number",
              "name": "FormattedNumber-E164",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-E164"
            },
            {
              "label": "RFC3966 Formatted Number",
              "name": "FormattedNumber-RFC3966",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormattedNumber-RFC3966"
            },
            {
              "label": "Rank",
              "name": "Rank",
              "description": "",
              "type": "Int",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/Rank"
            },
            {
              "label": "Area Code",
              "name": "AreaCode",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/AreaCode"
            },
            {
              "label": "Local Number",
              "name": "LocalNumber",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/LocalNumber"
            },
            {
              "label": "Validation Status",
              "name": "ValidationStatus",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/ValidationStatus"
            },
            {
              "label": "Line Type",
              "name": "LineType",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/LineType"
            },
            {
              "label": "Format Mask",
              "name": "FormatMask",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/FormatMask"
            },
            {
              "label": "Digit Count",
              "name": "DigitCount",
              "description": "",
              "type": "Int",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/DigitCount"
            },
            {
              "label": "Geo Area",
              "name": "GeoArea",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },t
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/GeoArea"
            },
            {
              "label": "Geo Country",
              "name": "GeoCountry",
              "description": "",
              "type": "String",
              "hidden": false,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/GeoCountry"
            },
            {
              "label": "CarrierInfo",
              "name": "CarrierInfo",
              "description": "",
              "type": "String",
              "hidden": true,
              "important": false,
              "system": false,
              "required": false,
              "attributeOrdering": {
                "orderingStrategy": "LUD"
              },
              "uri": "configuration/entityTypes/HCP/attributes/Address/attributes/Phone/attributes/CarrierInfo"
            }
          ]
        }
      ]
    }
  ]
}

Example to understand the input and output fields

Table 1.
OptionsInput FieldsOutput Fields
{ 
"returnDataForInValidStatus" : "true" 
}
{
"Number": "4420718876",
"CountryCode": "United Kingdom",
"Type": "Home"
}
{
"Type": "Home",
"Number": "4420718876",
"CountryCode": "US",
"FormattedNumber": " 4420718876",
"LocalNumber": "4420718876",
"ValidationStatus": "INVALID",
"LineType": "UNKNOWN",
"FormatMask": "nnnnnnnnnnnn",
"DigitCount": "10",
"GeoArea": "",
"GeoCountry": "United States"
}
{ 
"returnDataForInValidStatus" : "false" 
}
{
"Number": "4420718876",
"CountryCode": "United Kingdom",
"Type": "Home"
}
{
"Type": "Home",
"Number": "4420718876",
"CountryCode": "United Kingdom",
"ValidationStatus": "INVALID"
}
{ 
"enhanceCleansing" : "false" 
}
{
"Number": "442071884676",
"CountryCode": "US",
"Type": "Home"
}
{
"Type": "Home",
"Number": "442071884676",
"CountryCode": "US",
"FormattedNumber": " 442071884676",
"LocalNumber": "442071884676",
"ValidationStatus": "INVALID",
"LineType": "UNKNOWN",
"FormatMask": "nnnnnnnnnnnn",
"DigitCount": "12",
"GeoArea": "",
"GeoCountry": "United States"
}
{ 
"enhanceCleansing" : "true" 
}
{
"Number": "442071884676",
"CountryCode": "US",
"Type": "Home"
}
{
"Type": "Home",
"Number": "+442071884676",
"CountryCode": "GB",
"FormattedNumber": " 020 7188 4676",
"LocalNumber": "71884676",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE",
"FormatMask": "nnn nnnn nnnn",
"DigitCount": "12",
"GeoArea": "London",
"GeoCountry": "United Kingdom"
}
{ 
"licensedCountryCodes" : "US;IN" 
}
{
"Number": "+919966305879",
"CountryCode": "IN",
"Type": "Home"
}
{
"Type": "Home",
"Number": "+919966305879",
"CountryCode": "IN",
"FormattedNumber": "099663 05879",
"LocalNumber": "9966305879",
"ValidationStatus": "VALID",
"LineType": "MOBILE",
"FormatMask": "nnnnnn nnnnn",
"DigitCount": "11",
"GeoArea": "India",
"GeoCountry": "India"
}
{}
{
"Number": "+919966305879"
}
{
"Number": "+919966305879",
"CountryCode": "IN",
"FormattedNumber": "099663 05879",
"LocalNumber": "9966305879",
"ValidationStatus": "VALID",
"LineType": "MOBILE",
"FormatMask": "nnnnnn nnnnn",
"DigitCount": "11",
"GeoArea": "India",
"GeoCountry": "India"
}
{}
{
"Number": "9966305879"
}
{
"Number": "9966305879",
"CountryCode": "US",
"FormattedNumber": "(996) 630-5879",
"LocalNumber": "9966305879",
"ValidationStatus": "INVALID",
"LineType": "UNKNOWN",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10"
}
{}
{
"Number": "202-555-0191",
"Type": "Office"
}
{
"Type": "Office",
"Number": "202-555-0191",
"CountryCode": "US",
"FormattedNumber": "(202) 555-0191",
"AreaCode": "202",
"LocalNumber": "5550191",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE_OR_MOBILE",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10",
"GeoArea": "Washington D.C.",
"GeoCountry": "United States"
}
{}
{
"Number": "001-541-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "001-541-754-3010",
"CountryCode": "US",
"FormattedNumber": "0015417543010",
"LocalNumber": "0015417543010",
"ValidationStatus": "INVALID",
"LineType": "UNKNOWN",
"FormatMask": "nnnnnnnnnnnnn",
"DigitCount": "13"
}
{}
{
"Number": "1-541-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "1-541-754-3010",
"CountryCode": "US",
"FormattedNumber": "(541) 754-3010",
"AreaCode": "541",
"LocalNumber": "7543010",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE_OR_MOBILE",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10",
"GeoArea": "Corvallis, OR",
"GeoCountry": "United States"
}
{}
{
"Number": "+1-541-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "+1-541-754-3010",
"CountryCode": "US",
"FormattedNumber": "(541) 754-3010",
"AreaCode": "541",
"LocalNumber": "7543010",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE_OR_MOBILE",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10",
"GeoArea": "Corvallis, OR",
"GeoCountry": "United States"
}
{}
{
"Number": "(541)-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "(541)-754-3010",
"CountryCode": "US",
"FormattedNumber": "(541) 754-3010",
"AreaCode": "541",
"LocalNumber": "7543010",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE_OR_MOBILE",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10",
"GeoArea": "Corvallis, OR",
"GeoCountry": "United States"
}
{}
{
"Number": "(541)-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "(541)-754-3010",
"CountryCode": "US"
}
{ "licensedCountryCodes" : "RU;IN" }
{
"Number": "(541)-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "(541)-754-3010",
"CountryCode": "US"
}
{ "formatType" : "E164" }
{
"Number": "(541)-754-3010",
"CountryCode": "US",
"Type": "Work"
}
{
"Type": "Work",
"Number": "+15417543010",
"CountryCode": "US",
"FormattedNumber": "(541) 754-3010",
"AreaCode": "541",
"LocalNumber": "7543010",
"ValidationStatus": "VALID",
"LineType": "FIXED_LINE_OR_MOBILE",
"FormatMask": "(nnn) nnn-nnnn",
"DigitCount": "10",
"GeoArea": "Corvallis, OR",
"GeoCountry": "United States"
}

Best practices for phone cleansing

  • Always provide a country code
    • Prevents incorrect defaulting to US
    • Supports precise validation and formatting
  • Enable enhanceCleansing for messy input data
    • Automatically retries invalid numbers with a + prefix
    • Helps recover incomplete or poorly formatted values
  • Choose the right formatType for your use case
    • E164: Recommended for storage, integrations, and APIs
    • NATIONAL: Suitable for local display (UI)
    • INTERNATIONAL: Preferred for human-readable formatting across countries
  • Set returnDataForInValidStatus = true if you need metadata on invalid inputs
    • Useful for debugging, partial enrichment, and data profiling
  • Use licensedCountryCodes to restrict processing
    • Helps with compliance, cost control, or targeting specific markets