Notifications Builder

The Notifications Builder provides the tools to send outgoing Email or SMS messages that do not require a response through the same channel. These outgoing messages are referred to as Notifications.

Notifications cannot parse replies or incoming messages, but they can still be used to prompt responses from the recipient. For example, Notifications might contain web links or cues to prepare for a previously-scheduled meeting. Most commonly, Notifications are used to send reminders or follow-up messages spurring users to continue a half-finished Journey.

The Notifications Builder is structured with the Tree to the immediate right of the Builder Bar with the Stage to the immediate right of that:

Notifications Overview

New Notifications can be created by clicking on the '+' icon to the right of the Notifications section of the Tree, which provides the options to choose the type of Notification to create: Email or SMS.

Once a Notification is created, it can be sent as an Action at any point throughout a user's Journey. SMS Notifications are sent via the Send SMS Notification Action, and Email Notifications are sent via the Send Email Notification Action.

Notifications can also be sent as a direct part of the Journey by incorporating them into the Journey Builder.

🚧

In order for Notifications that are sent from a Journey Step be TCPA-compliant, the actor.region and actor.time_zone must be set before initializing the Actor. This will automatically initialize a calendarRestriction property on the Actor, which will resolve to the correct TCPA calendar to use for the user. For more information, see How To enforce TCPA.

Where are outgoing Notifications sent?

Outgoing Notifications are sent to the Actor.

An Actor represents any individual who goes through an application flow. Actors are identified by their contact information, such as their phone number or email address. Once this contact information is associated with an Actor, Notifications will be sent directly to the Actor via their established accounts. Tying contact information to an Actor is done via Initializing the Actor, which must be done before Notifications can be sent.

For a deeper dive into conceptualizing Actors, see Actors. For a step-by-step walkthrough of how to initialize the Actor, see Conversations with Actors.

Where are outgoing Notifications sent from?

Outgoing SMS Notifications are sent from the phone number associated with the application, while outgoing Email Notifications are sent from the email address associated with the application. These associations are defined in the Settings.

For more on how to associate phone numbers with Airkit apps, see Connecting Your Twilio Numbers To Airkit. For more on how to associate email addresses with Airkit Apps, see Configuring Domains to Send Emails.

SMS Notifications

SMS Notifications are sent via text message.

A single SMS Notification might consist of multiple texts, each one of which might be one of three types: Text, Link, or Link to Journey. This allows links to be sent be sent as separate SMS messages which, unlike links included within a larger text message, will automatically and consistently preview the web page being linked to.

Text

Text type texts can take the form of any string. This is what will be sent via SMS. The most simple texts are hardcoded strings, which are defined in the Stage.

For instance, the following example shows how the simple SMS Notification "Hello, welcome to Airkit!" will appear in the Stage:

🚧

When creating SMS experiences, bear in mind that Airkit won't allow for the sending of the same text message to the same phone number multiple times within a 30-minute period.

Text type texts can also be made more intricate with the edition of variables, custom Airscript expressions, and Journey Links.

Adding Variables and Custom Expressions

Clicking on the Airscript icon (2021-11-23_13-24-47.png2021-11-23_13-24-47.png) to the upper left of the text box will insert an Airscript expression into the text. Edit inserted Airscript expressions by clicking on them, which will prompt the following pop-up to appear:

Variable

The Variable tab allows the selection a variable to insert into the text. Incorporating the values of variables into texts allows for the creation of customized Notifications.

For instance, say the name of each user is saved as a global variable accessible under name. Referencing this variable within a text message makes it possible to send a personalized text message:

The Notifications Builder has access to all Global-, Profile-, and Theme-level variables. For more on Global-, Profile-, and Theme-level variables, see Variable Scopes.

Custom Expression

The Custom Expression tab provides an expression editor capable of parsing custom Airscript expressions.

For instance, the following example gives the input "Hello, Airkit" into the Airscript function UPPERCASE. This Notification will consequently send the text "HELLO, AIRKIT", with all letters capitalized:

The above example shows an Airscript expression that consists only of an Airscript function and hardcoded input. In most practical applications, however, Airscript expressions will need to reference variables in order to generate custom text messages. To this end, the Notifications Builder has access to all Global-, Profile-, and Theme-level variables.

For more on Airscript, see Airscript Quickstart. For more on Global-, Profile-, and Theme-level variables, see Variable Scopes.

Adding Links to Journeys

Clicking on the link icon on the upper right of the text box will insert a Journey Link directly into the Text. Journey Links direct users back to the web portion of their Journey. For a more detailed discussion of how this works, see Linking to Journeys.

When Journey Links are sent in this way, it is not guaranteed that they will display a preview of the relevant Web Flow. To ensure consistency previewing, a Journey Link needs to be sent via the Link to Journey type text.

Link

Link type texts contain a single link to a web page. Unlike links that might be sent as part of a larger text message, links sent in this way will automatically and consistently preview the web page being linked to.

The link URL is defined in the Stage. It can be edited by clicking on the text directly, or by clicking on the arrow icon to the right of the URL:

The expression editor that opens upon clicking on the arrow icon is capable of parsing Airscript. Because the Notifications Builder has access to all Global-, Profile-, and Theme-level variables, Global-, Profile-, and Theme-level variables can be used to define query or even path parameters within a URL. Best practices dictate that the bulk of the URL be defined as a string directly while variables are designated by surrounding them by double curly braces.

For instance, say we want to link users to a wikipedia article on a subject of their choice, which was already saved under the global variable session.subject. The Link SMS Notification can be defined as follows:

Link to Journey

Link to Journey type texts contain only a Journey Link. Journey Links direct users back to the web portion of their Journey. For a more detailed discussion of how this works, see Linking to Journeys.

Unlike Journey Links that are sent as part of a larger text message, Journey Links sent as a Link to Journey type text will automatically and consistently preview the web page being linked to.

Email Notifications

An Email Notification consists of a subject and a body, both of which are defined in the Stage.

Subject

The Subject is the string that will appear in the subject line when the Email Notification is received. Defining the Subject is done in an expression editor that accepts Airscript. This means that while the Subject can be generic and hardcoded, it can also use previously-collected user input to generate customized Subjects.

To hardcode a string, simply type the desired Subject between quotation marks, like so:

To insert an Airscript expression, place it inside of double curly braces. Note that the Notifications Builder has access to all Global-, Profile-, and Theme-level variables.

For instance, say the name of each user is saved as a global variable accessible under session.name. Referencing this variable within a simple Airscript expression makes it possible to personalize the Subject:

For more on Global-, Profile-, and Theme-level variables, see Variable Scopes. For more on writing Airscript expressions, see Airscript Quickstart.

Body HTML

The Body HTML section is where the email body is defined. The expression defining the email body will be parsed in HTML, though it can also access Airscript expressions.

To insert an Airscript expression, place it inside of double curly braces. Note that the Notifications Builder has access to all Global-, Profile-, and Theme-level variables.

For more on Global-, Profile-, and Theme-level variables, see Variable Scopes. For more on writing Airscript expressions, see Airscript Quickstart.


Did this page help you?