Skip to main content



Use the ISO3166 transform to convert an incoming string into an ISO 3166 country code value. The incoming data must be either a recognized country name or country code:

  • The alpha2 country code (e.g. "ES")
  • The alpha3 country code (e.g. "ESP)
  • The numeric country code (e.g. 724)
  • The English name for the country (e.g. Spain)
  • The native name for the country (e.g. España)

The output value can be any of these three values:

  • Two-character country code (e.g., "US")
  • Three-character country code (e.g., "USA")
  • Numeric country code (e.g., "840")
Other Considerations

If the input string to the transform does not represent a valid country code or country name, the transform returns null.

Transform Structure

The transform for iso3166 only requires the transform's type and name attributes:

"type": "iso3166",
"name": "ISO3166 Transform"


  • Required Attributes

    • type - This must always be set to iso3166.
    • name - This is a required attribute for all transforms. It represents the name of the transform as it will appear in the UI's dropdown menus.
  • Optional Attributes

    • requiresPeriodicRefresh - This true or false value indicates whether the transform logic should be reevaluated every evening as part of the identity refresh process.
    • format - Use this optional value to denote which ISO 3166 format to return. The following values are valid:
      • alpha2 - Two-character country code (e.g., "US"). This is the default value if you do not provide a format.
      • alpha3 - Three-character country code (e.g., "USA")
      • numeric - The numeric country code (e.g., "840")
    • input - This is an optional attribute that can explicitly define the input data passed into the transform logic. If no input is provided, the transform takes its input from the source and attribute combination configured with the UI.


Because no specific format is provided, this transform defaults to the alpha2 output and returns "US".

Input: "United States of America"
Output: "US"

Transform Request Body:

"type": "iso3166",
"name": "ISO3166 Transform"


Because the desired format is specified as numeric, the output of this transform returns "724".

Input: "ES"
Output: "724"

Transform Request Body:

"attributes": {
"format": "numeric"
"type": "iso3166",
"name": "ISO3166 Transform"