Table of Contents


Overview

Slack connector allows sending Slack messages through Designer applications. A Slack connector can be associated with Action Button controls, and the system will send the message to a predefined Slack channel using incoming webhooks mechanism whenever the Action Button triggers the event.

Slack connector properties must be configured to create the message content and destination.


Properties


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


Name

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


Webhook Url

Incoming webhooks is a simple mechanism to send Slack messages. Webhook URL is a unique URL that needs to be obtained using Slack Apps web page. Additional information on incoming webhooks is given in the next section.


Body Type

This defines whether the contents of the Slack message should be static in a pre-defined format, or retrieved dynamically from a Single Named Range (SNR).

The corresponding values are as follows:

  • Static - The contents of the Slack message can be defined using the rich-text editor that will become available for the body upon selection of this option. This editor allows formatting the text, insert media, hyperlinks, and tables. You can also modify the custom CSS by opening the code editor using the button.
  • Dynamic - The contents will be dynamic, 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 will become visible upon selection of this option.


Static Body Type - Custom Content Injection

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

The value of 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 the curly brackets and hints will show up to guide you through the rest of the process.


Single Named Ranges

Upon opening the curly brackets, you will note a list of Single Named Ranges (SNR). Selecting one of these from the hints 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.

Alternatively, several formatting options are available when injecting the value of a Single Named Range (SNR). To utilize any of the formatting options, 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 determination of the actual 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 Slack connector. The stubs that can be used are:

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

Incoming Webhooks

You need a webhook url to be used in determining the message destination. This URL can be obtained from the Slack Apps page. You will need a Slack account to be able to obtain a webhook URL.

According to documentation made publicly available by Slack, the steps to create a webhook URL are:

  • Create a Slack app
  • Enable Incoming Webhooks
  • Create an Incoming Webhook
  • Use your Incoming Webhook URL to post a message.

For further information, please refer to related Slack documentation at address.