E.164 Phone
Overview
Use the E.164 phone transform to convert an incoming phone number string into an E.164-compatible number.
- If the input string to the transform does not represent a valid phone number, the transform returns null.
Transform structure
The E.164 phone transform only requires the transform's type and name attributes:
{
"type": "e164phone",
"name": "Test E.164Phone Transform"
}
Top-level properties (required)
-
type
string(required)
Must be set toe164phone. -
name
string(required)
The name of the transform as it will appear in the UI's dropdown menus. -
requiresPeriodicRefresh
boolean(optional)
Whether the transform logic should be reevaluated every evening as part of the identity refresh process. Default isfalse.
Attributes
The E.164 phone transform only requires top-level properties:
{
"type": "e164phone",
"name": "Transform Name"
}
attributes (required)
The attributes object contains the E.164 phone configuration.
Optional
-
defaultRegion
string(optional)
The phone number region to format into. Must be in ISO 3166-1 alpha-2 format. Default isUS. -
input
object(optional)
Explicitly defines the input data passed into the transform. If not provided, the transform uses input from the source and attribute combination configured in the UI.
Examples
This transform transforms a phone number seperated by - into the E.164 Phone format.
Input: "512-777-2222"
Output: "+1512459222"
Transform request body:
{
"attributes": {
"input": {
"attributes": {
"value": "512-777-2222"
},
"type": "static"
}
},
"type": "e164phone",
"name": "E.164Phone Transform"
}
This transform transforms a phone number seperated by . into the E.164 Phone format.
Input: "779.284.2727"
Output: "+17792842727"
Transform request body:
{
"attributes": {
"input": {
"attributes": {
"value": "779.284.2727"
},
"type": "static"
}
},
"type": "e164phone",
"name": "E.164Phone Transform"
}
This transform transforms a phone number and country region code into the E.164 Phone format.
Input: "0412345678"
defaultRegion: "AU"
Output: "+61412345678"
Transform request body:
{
"attributes": {
"input": {
"attributes": {
"value": "0412345678"
},
"type": "static"
},
"defaultRegion": "AU"
},
"type": "e164phone",
"name": "E.164Phone Transform"
}