Clarification on Text: Find Phone Numbers Action

Options

Hoping someone can clarify two of the configuration fields for the action Text: Find Phone Numbers. Essentially, I am unsure of how the Output format and Default country settings work together for NATIONAL.

My understanding is that Output format is helping to indicate how you want the phone number to look after this action runs.

INTERNATIONAL as Output Format
So if the incoming format is +1 XXX-XXX-XXXX (US) and we want it to be MX, the app will reformat to +52 XXX XXX XXXX. This works with INTERNATIONAL for Output format and MX for Default country.

NATIONAL as Output Format
What exactly is the purpose of this? When I include NATIONAL for Output format, and select anything for Default country, the system doesn't find a phone number in the same document that I ran through INTERNATIONAL.

I can't exactly tell from the Help article what the intended difference is from INTERNATIONAL vs NATIONAL. And how the Default country should interact with the two different options.

Tagged:

Best Answer

  • James_186428
    James_186428 Posts: 2
    Answer ✓
    Options

    @Meghan_160385 From looking at the code, it seems Default country should refer to the format the phone number is expected to be in as we parse it from the document. So if in the document there is a US phone number that is that we want to pull, setting the Default country to US (or leaving it blank since US is the default) should make sure we're able to pull the phone number from the document as expected. This should work for a number of different valid US formats such as (XXX) XXX-XXXX, XXX XXX XXXX, XXXXXXXXXX, etc.

    Output Format however is used to determine format for how the number would be dialed. So if we have a US number that would be dialed from the US, setting Default country = US and Output format = NATIONAL would return (XXX) XXX-XXX whereas Default country = US and Output format = INTERNATIONAL would return +1 (XXX) XXX-XXX for the same number.

    As another example, if we have the number 44 (020) 1234 5678 from Great Britain, we would set Default country = GB and then if we set Output format = NATIONAL we'd get back 020 1234 5678 while with Output format = INTERNATIONAL we'd get back +44 20 1234 5678. Essentially it just comes down to how and where the parsed phone number will be used. We can also use Output format = E164 and Output format = RFC3966 to get +442012345678 and tel:+44-20-1234-5678 respectively.

    Hope this helps!