Table of Contents


Overview

The Twilio Connector allows sending SMS messages via Designer applications using the Twilio API. A Twilio Connector can be associated with Action Button controls, and the system will send an SMS message to a phone number (static or dynamic) using Twilio programmable sms mechanism whenever the Action Button triggers that event.

Twilio connector properties must be configured in order to define the message content and recipient.


Properties

The section below will outline the properties for the Twilio connector.


Name

The Name is simply a friendly identifier given to the connector to help you subsequently identify this event from the others.


Account Sid

Account Sid is a string that identifies your account. You can find your account id on the Twilio console.


Auth token

Auth token is a password that is assocaited with your account. It should be kept as a secret for your own security. You can find your account id on the Twilio console.


From Number Static Value

From Number Static Value is the phone number of the recipient that will receive the SMS messages. Note that you need to purchase an SMS capable phone number from Twilio to be able to send SMS messages. This number should include a Country code.


To Number Type

This property defines whether the recipient number is to a be static phone number, or retrieved dynamically from a Single Named Range (SNR).

The corresponding values are as follows:

  • Static - You can enter a static number where the messages will be sent every time.
  • Dynamic - The target phone number will be based on a Single Named Range (SNR) from your workbook. You can select this named range from the To Number Named Range dropdown list, which will become visible when you select this option.

Body Type

This defines whether the contents of the Twilio message are to be static or retrieved dynamically from a Single Named Range (SNR).

The corresponding values are as follows:

  • Static - The contents of the Twilio message can be defined using the rich-text editor that becomes available upon selecting this option. This editor allows formatting the text, inserting media files, hyperlinks, and tables. You can also modify the custom CSS by opening the code editor with the > button.
  • Dynamic - The contents will be dynamic and based on a Single Named Range (SNR) from your workbook. You can select this named range from the Body Named Range Sequence ID dropdown list, which becomes visible when you select this option.

Static Body Type - Custom Content Injection

With the Static Body Type option, you can dynamically inject named range values into the Twilio message contents, just like you can with a Content Control in the User Interface Designer.

The value of the calculated and input named ranges can be injected directly into the HTML contents of a content / label control.

All dynamically injected variables must be placed inside double curly braces ({{ }}). To begin the process of injecting a variable into the contents, begin entering curly brackets, and hints will show up to guide you through the rest of the process.


Single Named Ranges

Upon opening double curly brackets, you will see a list of available Single Named Ranges (SNR). Selecting one of these from the dropdown will populate the content control with the named range's name.

If you would like no formatting to be applied, you can simply close the two brackets and the value will be injected as an unformatted value.

Text formatting options are available when injecting the value of a Single Named Range (SNR). To do this, simply type in a colon character (:) after the named range's name to see a list of supported data types.

These data types (Integer, Decimal, DateTime, or Text) are necessary for the system to determine of the actual data format, so select one that fits the assumed value of the Single Named Range (SNR). Text data type is different from the others since it will get the formatted value directly from the system. Text data type has an optional paramater, None, which has no effect on the output.

Upon selecting the data type, add a semicolon character (;) to begin defining the desired format for the output value. The .NET formatting standards apply to this format as outlined below.

See below for some examples.

{{NamedRangeName:Decimal;C2}}

  • When NamedRangeName = 12, the formatted value will be $12.00.
  • When NamedRangeName = 1.2345561, the formatted value will appear $1.23.
  • When NamedRangeName = 'ABC', the formatted value will appear blank.

{{NamedRangeName:Decimal;P3}}

  • When NamedRangeName = 0.12, the formatted value will be 12.000%.
  • When NamedRangeName = 1.2345561, the formatted value will appear 123.457%.
  • When NamedRangeName = 'ABC', the formatted value will appear blank.

{{NamedRangeName:Decimal;00000}}

  • When NamedRangeName = 1234.5678, the formatted value will be 01235.
  • When NamedRangeName = 1.2345561, the formatted value will appear 00001.
  • When NamedRangeName = 'ABC', the formatted value will appear blank.

Predefined Formats

In addition to manual format setting you may also use one of the predefined Numeric or Date and Time Formatting:

Integer (Input value: 1234)

  • {{ValueInteger:Integer;00}} => 1234
  • {{ValueInteger:Integer;#,##0}} => 1,234
  • {{ValueInteger:Integer;00000}} => 01234
  • {{ValueInteger:Integer;##-##}} => 12-34

Decimal (Input value: 123456.78)

  • {{ValueDecimal:Decimal;0.0}} => 123456.8
  • {{ValueDecimal:Decimal;0.00}} => 123456.78
  • {{ValueDecimal:Decimal;#,##0.0}} => 123,456.8
  • {{ValueDecimal:Decimal;#,##0.00}} => 123,456.78
  • {{ValueDecimal:Decimal;0.##}} => 123456.78
  • {{ValueDecimal:Decimal;00.00}} => 123456.78
  • {{ValueDecimal:Decimal;0,0.00}} => 123,456.78
  • {{ValueDecimal:Decimal;0%}} => 12345678%
  • {{ValueDecimal:Decimal;0.0%}} => 12345678.0%

Datetime (Input value: 12/05/2018 11:25:07 pm)

  • {{NamedRangeName:Datetime;yyyy}} => 2018
  • {{NamedRangeName:Datetime;MM}} => 12
  • {{NamedRangeName:Datetime;dd}} => 05
  • {{NamedRangeName:Datetime;yyyy/MM/dd}} => 2018/12/05
  • {{NamedRangeName:Datetime;MM/dd/yyyy}} => 12/05/2018
  • {{NamedRangeName:Datetime;dd/MM/yyyy}} => 05/12/2018
  • {{NamedRangeName:Datetime;HH}} => 23
  • {{NamedRangeName:Datetime;mm}} => 25
  • {{NamedRangeName:Datetime;ss}} => 07
  • {{NamedRangeName:Datetime;tt}} => PM
  • {{NamedRangeName:Datetime;HH:mm tt}} => 23:25 PM
  • {{NamedRangeName:Datetime;HH:mm:ss tt}} => 23:25:07 PM

Text

  • {{NamedRangeName:Text;None}} : None is an optional parameter
  • {{NamedRangeName:Text}} : Will work the same as above

While formats are Culture invariant when making a selection from the list, the values shown will be different for the current application Culture. For example #,##0.0 format will be shown as in "Thousands Comma Delimiter, Decimal Period Delimiter" Culture, but it will be shown as # ##0,0 for the "Thousands Space Delimiter, Decimal Comma Delimiter" Culture setting. Once you make a selection, the value will be inserted in the contents will be the same for all Cultures.


Inserting Stubs Using the Stubs Button

Clicking the Stubs button on the top right of the content editor will open the Insert Stub menu where you can add document stubs with the help of a graphical user interface.

On the Insert Stub menu, you can select a named range, type, and format to automatically add the stub corresponding to your selections. If you want to use text format you can click Pull format from Excel checkbox.

After selecting the named range, type and format properties, or selecting the named range field and clicking Pull format from Excel checkbox press the Insert Stub button to insert the stub text into the content editor.


List and Table Named Ranges

These types of named ranges must be entered in the same format as Single Named Ranges (SNR), except they do not support formatting of the output values. Using a List or Table Named Range within two sets of curly brackets will inject a full table into the content / label control.

This is best utilized when looking to test the values that exist within a named range, rather than for final presentation of a list or table named range. To present a readable and customizable format, use an Input or Output Grid control instead to display this type of data.


Record stubs

Record stubs are replaced with URLs related to the saved record when there is a Save event associated with the same button as the Twilio connector. The stubs that can be used are:

  • {{RecordLink}}: Replaced with View Record URL
  • {{RecordEditLink}}: Replaced with Edit Record URL.