Data Element: Phone Normalizer

A phone normalizer can normalize phone numbers for use in the corresponding phone matcher.

Considerations

As needed, create the following:

  • Replacement Lookup Table - This lookup table should remove invalid phone number values, like main phone numbers for close business partners that are often shared between hundreds of contact persons. When the normalizer runs, it replaces occurrences of a 'From' entry with the 'To' entry sequentially from the first row to the last row. Refer to the Transformation Lookup Tables topic in the Resource Materials section of online help here.

    For example, the phone numbers included in this lookup table are known main numbers for companies in the data being matched:

Input

Phone numbers are provided via 'Input Attribute' in the phone normalizer configuration, including formatting such as +, (, ), -, as well as phone extension numbers.

The phone number is normalized according to a set of regional rules, determined by the phone country code if it exists, secondary from a normalized address Standardized Country ISO Code or Input Country ISO Code, tertiary by the rules of the default country code as set on the phone normalizer, or finally, as a US phone number.

When configuring the data element:

  1. The Input Attribute field defines an attribute to be used as input.

  2. The Input Parameters field allows selection of:

    • 'Use Attribute on Object' – by default, this option is set to ‘True’ and indicates to read attributes on the object itself. Click the Value dropdown to manually set it to 'False' when using information from a Data Container or an Input Normalizer.

    • 'Data Container' – read attributes from the data container.

    • ‘Input Normalizer’ – read outputs from the selected Match Expression, as defined in the Matching Algorithms and Match Expressions topic here.

Output

The output of a phone normalizer is a java.util.Set<com.stibo.partydatamatching.domain.phone.Phone>.

Functionality

The phone normalizer automatically makes the following modifications to a phone number for comparison purposes only in the order listed:

  1. Applies the Replacement Lookup Table – This is used to remove invalid phone number values, like main phone numbers for close business partners, that are often shared between hundreds of contact persons.

  2. Look for a number in the input text – The normalization is quite lenient and looks for a number in the input text.  It ignores punctuation and white space, as well as any text before the number (e.g., a leading "Tel: ") and trims the non-number characters. It accepts a number in any format (E164, national, international, etc.), assuming it can be interpreted with the country code that is supplied. It also attempts to convert any alpha characters into digits for vanity numbers of the type '1800 ACMECORP'. The input number can contain formatting such as +, () and -, as well as a phone number extension. The normalization can also handle numbers provided in RFC3966 format.

The phone normalizer parses the phone number according to rules for a region, so a country code is needed. The following ordered attempts are made to identify the country code:

  1. The normalizer looks for a '+ country code' in the phone number.

  2. The normalizer uses the main address country code. This country code must be provided using CLDR two-letter region-code format, and from STEP release 11.0, the phone normalizer can get this from an address normalizer data element (add the data element ID in the main address input).

    • If the address is standardized, the phone normalizer uses the country code from the Standardized Country ISO Code as defined by the address component model.

    • If the address is not standardized, the phone normalizer uses the country code from the Default Country ISO Code.

  3. The normalizer uses the default country code set in the normalizer.

  4. The normalizer attempts to interpret the number as a US phone number.

In the examples below, the Brazil phone number is stripped of the long-distance marker (0) and the carrier selection code. The phone letter prefix from RFC3966 is stripped for different languages. Punctuation and parentheses are stripped. The country code is normalized and can be handled externally to the subscriber number.

Input Phone Number

Country Code Provided

Normalized Country Code and Phone Number

+55 0 15 21 5555-5555

BR

countryCode: 55, nationalNumber: 2155555555

tel:+55-00-98765-4321

BR

countryCode: 55, nationalNumber: 987654321

(+45) 9999 9999

DK

countryCode: 45, nationalNumber: 99999999

tlf (45) 99.99,99-99

DK

countryCode: 45, nationalNumber: 99999999

+81 3-3666-7195

JP

countryCode: 81, nationalNumber: 336667195

(03) 1234-5678

JP

countryCode: 81, nationalNumber: 312345678

+8103123456789

JP

countryCode: 81, nationalNumber: 3123456789

+18016954248

US

countryCode: 1, nationalNumber: 8016954248

+1 801.695.4258

US

countryCode: 1, nationalNumber: 8016954248

(890) 514-7258

US

countryCode: 1, nationalNumber: 8016954258

+55 (643) 958-6877

US

countryCode: 55, nationalNumber: 6439586877

Configuring a Phone Normalizer Data Element

After adding the phone normalizer in the Data Elements flipper of the Decision Table dialog (defined in the Match Criteria topic here), configure it as follows:

  1. Click into the Data Elements column and click the ellipsis button () to access the configuration dialog.

  2. On the Phone Normalizer dialog:

    • For the Input Attribute, click the ellipsis button () and select the phone number attribute.

    • For the Input Parameters, define the source of the data to be normalized. Refer to the Input section above for details.

      Right-click the arrow in the first column of the Input Parameters table for additional display and edit options. Although it appears that the default 'Use Attribute On Object' parameter can be removed, after closing the dialog it will continue to display. Instead, if a different input parameter is used, click the Value dropdown and manually set 'Use Attribute On Object' option to 'False.'

      Click the Add Input Parameter link to add other input parameters.

    • For the Replacement Lookup Table, click the ellipsis button () and select the transformation lookup table asset.

    • For the Default Country ISO Code, enter a two-letter ISO code string to be used when no country code is included in the phone number being normalized.

    • For the Main Address Input, optionally enter the ID of an Address Normalizer written in JavaScript that outputs a Country ISO Code. This output value is used in place of the Default ISO Code, if one exists.

  3. To test the configuration, for the Select Nodes parameters:

    • Click the ellipsis button () for each field and select two objects for comparison.

    • Click the Evaluate button.

      An empty result field indicates the value is not available in the selected node. Adjust as indicated by the Evaluator results and repeat the evaluation.

  4. Click OK to save and display the configuration in the Data Elements flipper.