Add a phone number type

Create a phone number type variable in an Update Data action sequence when you want to specify a phone number whose properties can be accessed in other flow locations. For more information, see About the phone number data type.

Example

A typical use case for phone number update statement is to create a phone number from Call.Ani. Because Call.Ani is a string, converting it to a phone number and accessing the properties gives flow authors easy access to information about the phone number via properties. This alleviates the need to write your own string parsing code to retrieve the information:

  • Variable name: Flow.ClientPhoneNumber
  • Value to assign: ToPhoneNumber(Call.Ani)
Property Description
Flow.ClientPhoneNumber.uri Returns the URI for the tel scheme phone number, otherwise a NOT_SET string.
Flow.ClientPhoneNumber.e164 Returns the E.164 formatted string for the tel scheme phone number with a valid E.164 phone number, including dialing code and subscriber number, otherwise a NOT_SET string.
Flow.ClientPhoneNumber.subscriberNumber Returns the E.164 formatted subscriber number for a tel scheme phone number with a valid E.164 phone number, otherwise a NOT_SET string.
Flow.ClientPhoneNumber.dialingCode Returns theE.164 formatted dialing code string for a tel: scheme phone number, otherwise a NOT_SET string.
Flow.ClientPhoneNumber.isSip Returns false.
Flow.ClientPhoneNumber.isTel Returns true. 
Flow.ClientPhoneNumber.isGlobal Returns true.
Flow.ClientPhoneNumber.scheme Returns tel.
Flow.ClientPhoneNumber.raw Returns the Call.Ani.

Example

The following example illustrate the property data you can extract and the ouput returned when you create a phone number type in a task sequence:

  • Variable name: Flow.ClientPhoneNumber
  • Value to assign: ToPhoneNumber(+13175550116)
Property Output
Flow.ClientPhoneNumber.uri “tel:+13175550116″
Flow.ClientPhoneNumber.e164 +13175550116″
Flow.ClientPhoneNumber.subscriberNumber 3175550116″
Flow.ClientPhoneNumber.dialingCode “1”
Flow.ClientPhoneNumber.isSip false
Flow.ClientPhoneNumber.isTel true
Flow.ClientPhoneNumber.isGlobal true
Flow.ClientPhoneNumber.scheme tel
Flow.ClientPhoneNumber.raw +13175550116″

Add a phone number update statement to a task sequence

In a task sequence, you can add a phone number expression to an Update Data data action. For example, 

  1. From the Toolbox, expand the Data category and drag an Update Data action to the desired location in the task.
  2. On the Update Data design form, in the Name field, add a meaningful name to describe the item.
  3. Click next to Update Statements and select Phone Number.
  4. In the Variable Name field, type the label to store the data and identify the variable on tasks.
  5.  To assign a telephone number, complete one of the following steps:
    1. In the Value To Assign field, leave the default tel: data type unchanged.
    2. Click the arrow at the end of the Dialing Code drop-down list and choose the dialing code for the telephone number to ensure the phone number has global dialing information.
    3. In the Enter phone number box, add the subscriber number for the phone number. 

Note: The subscriber number can also contain an extension. For example, 31755501116;ext=1234. In this case, the full phone number including scheme, dialing code, and subscriber number is tel: +13178723000;ext=1234.

  1. To assign a SIP URI to the phone number, follow these steps:
    1. In the Value To Assign field, click the arrow at the end of the tel: drop-down list and select sip:.
    2. In the Enter SIP URI box, add the SIP URI phone number string. 
  2. To assign a secure SIP URI to the phone number, follow these steps:
    1. In the Value To Assign field, click the arrow at the end of the tel: drop-down list and select sips:.
    2. In the Enter SIP URI box, add the secure SIPS URI phone number string. 

Note: To set the value using an expression, click the expression modes button and perform one of the following steps:
  • Add the expression inline.
  • Click to open the large expression editor and build your expression.
  1. (Optional) To add another Phone Number variable, click next to Update Statements