When you create a flow in Architect, it is most helpful to configure it to retrieve as many digits as possible from a caller to help convert the information into a global phone number. Most often, prompting the caller will help ensure the desired number is collected. The flow author, through prompt cues, ensures the number of digits entered by the caller does not exceed the length of the dialing code and the subscriber number. Then, the author can set up a phone number data type that retrieves the customer-entered number and creates a new phone number, converting it to a global number. 

Converting customer-entered numbers into global phone numbers anywhere a phone number is used provides significant benefits, including:

  • Accurate runtime handling of phone numbers occurs for playback
  • The correct phone number is called during a callback attempt

If, for example, the “+” does not exist in the customer-entered phone number string, the string is treated as a local phone number and runtime behavior results may be limited. The “+” tells the system that the next 1 to 3 digits that follow it indicate the phone number’s dialing code which, when extracted, will create a global phone number.

The following scenarios offer insight to the flow author of ways Call.Ani can be used in the Phone Number data type to construct the acquisition of the most usable phone number string.

Note: These examples apply to “tel” phone numbers.

During flow configuration, the flow author:

  1. Creates a Flow.CustomerInput variable.
  2. Builds a prompt to request phone number input from the caller. For example “Please enter your 10-digit phone number.”
  3. Configures a Phone Number data type to construct a callback number using the following example expression to extract the best phone number:
ToPhoneNumber(Append("tel: +",ToPhoneNumber(Call.Ani).dialingCode, Flow.CustomerInput))

When a call enters the flow:

  1. Call.Ani acquires the caller’s originating telephone number: “tel: +13175550116”.
  2. The customer enters 3175550116, which Architect stores in Flow.CustomerInput.
  3. The system extracts the appropriate callback number from the Phone Number data type build during flow configuration.

During flow configuration, the flow author:

  1. Creates a Flow.CustomerInput variable.
  2. Builds a prompt to request phone number input from the caller. For example “Please enter your 10-digit phone number.”
  3. Configures a Phone Number data type to construct a callback number using the following example expression to extract the best phone number:
ToPhoneNumber(Append(Substring(Call.Ani, 0, Length(Call.Ani)-Length(Flow.CustomerInput)), Flow.CustomerInput))

When a call enters the flow:

  1. Call.Ani acquires the caller’s originating telephone number: “tel: +13175551000”.
  2. The customer enters 3175550116, which Architect stores in Flow.CustomerInput.
  3. The system extracts the appropriate callback number from the Phone Number data type build during flow configuration.
  4. The converted result yields a phone number with raw property of “tel: +13175550116”.

Notice how the expression uses tel: +1″ from the Call.Ani and then appends the customer-entered “3175550116” to build the global phone number.

Similar to Scenario B, the customer enters even fewer digits. Using the same expression, the flow author can still build the the most usable phone number string.

During flow configuration, the flow author:

  1. Creates a Flow.CustomerInput variable.
  2. Builds a prompt to request phone number input from the caller. For example “Please enter your 10-digit phone number.”
  3. Configures a Phone Number data type to construct a callback number using the following example expression to extract the best phone number:
ToPhoneNumber(Append(Substring(Call.Ani, 0, Length(Call.Ani)-Length(Flow.CustomerInput)), Flow.CustomerInput))

When a call enters the flow:

  1. Call.Ani acquires the caller’s originating telephone number: “tel: +13175551000”.
  2. The customer enters 5550116, which Architect stores in Flow.CustomerInput.
  3. The system extracts the appropriate callback number from the Phone Number data type build during flow configuration.
  4. The converted result yields a phone number with raw property of “tel: +13175550116”.

Notice how the expression uses “tel: +1317” from Call.Ani and then appends the customer-entered “5550116” to build the “tel: +13175550116” global phone number.