# Triggers Builder

The Triggers Builder provides the tools to define and manage how Journeys begin. Journeys are started by external Triggers, which fall into three categories: **User Interactions**, **App APIs**, and **Subscriptions**.

Like most Builders, the layout of the Triggers Builder maps comfortably onto the general structure of the Studio: to the immediate right of the Builder Bar is the Tree, to the right of which is the Stage, to the right of which is the Inspector, when applicable. Depending on the element being examined, there might not always be an imagine on display in the Stage:

![](https://4185914948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSItjRhbHaLQ4ar3DUljt%2Fuploads%2Fgit-blob-ab84278ad6fd74990a21704eef4fd817ee0ada48%2Ftriggers-builder-v181-0.png?alt=media)

## User Interactions

Journeys can be triggered by direct user interactions: users can begin a Journey by texting a particular phone number, calling a particular phone number, or clicking on a Starting Link.

To add a new User Interactions Trigger, click on the '+' icon to the right of the **User Interactions** section of the Tree and select the relevant Trigger type:

![](https://4185914948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSItjRhbHaLQ4ar3DUljt%2Fuploads%2Fgit-blob-d396de1217a75f055da972ff487289bb1246688d%2Ftriggers-builder-v181-1.png?alt=media)

### Receive an SMS

The **Receive an SMS** Trigger begins a Journey when a new user sends a text message to a particular number.

<details>

<summary>What number are these incoming texts being sent to?</summary>

\


Whatever number you associate with the application!

The [Console](../../console/console) provides the means to connect your phone numbers to your [Org](../../administration/airkit-organizations). Once connected to an Org, phone numbers will become available in the [Configuration Builder](https://docs.airkit.ai/?q=configuration-builder) when accessing your application in the Studio. Under the **Chat Bot** section, you can select an available number to receive, send, and manage texts associated with your application.

Once a phone number is configured, incoming messages to that phone number through the SMS will automatically be parsed as part of a Journey.

For more on how to associate your phone numbers with Airkit apps, see [Connecting Your Twilio Numbers To Airkit](../../sms/connecting-twilio-numbers).

</details>

<details>

<summary>Will a new Journey be triggered every time someone sends a text to this phone number?</summary>

\


No, a new Journey will only be triggered when a text is sent by a user who is not already going on an active Journey through the application.

Airkit manages SMS conversations through the lens of an Actor. Actors represent users who are in the process of going through an Airkit Journey, and Actors can be identified by their phone numbers. When someone triggers a Journey by sending text message, the phone number that they used to send that text becomes tied with their Journey. Should they send any more texts while their Journey is still ongoing, those texts will not trigger a new Journey and will instead automatically become part of their existing Journey.

For more on Actors, see [Actors](../../concepts/actors). For a more detailed dive into how incoming texts are processed – both when they trigger the start of a Journey and when they don't – see [Conversations with Actors](../../concepts/actors/initializing-the-actor).

</details>

Invoking the **Receive an SMS** Trigger is an [Event](../events) capable of triggering an Action Chain. This Action Chain is constructed in the Inspector. Clicking on the '+' icon to the upper right lets you select an Action to add to the Action Chain:

![](https://4185914948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSItjRhbHaLQ4ar3DUljt%2Fuploads%2Fgit-blob-55b4f2a4850a596a1528f6b78f15abd721acb0b1%2Ftriggers-builder-v181-2.png?alt=media)

Most commonly, this Action Chain issued to call upon the [Start Chat Bot](../../actions/the-start-chat-bot-action) Action or [Send SMS Notification](../../actions/send-sms-notification-action) Action. This makes it possible to designate an outgoing SMS message to reply to the incoming SMS message that triggered the start of the Journey.

<details>

<summary>SMS messages cannot be sent unless the Actor is properly initialized, and initializing the Actor is not part of this Action Chain. When was the Actor initialized?</summary>

\


(For more context on initializing Actors, see [Actors](../../concepts/actors) and [Conversations with Actors](../../concepts/actors/initializing-the-actor).)

The **Invoke** Event described here is technically distinct from the application's [Starting Event](../events/starting-events), which comes out of the box tied to the necessary Actions to initialize the Actor. The Action Chain associated with the Starting Event are run immediately before Action Chain associated with this **Invoke** Event, meaning the Actor would be initialized shortly before sending the outgoing SMS notification.

Starting Events are Global Events; they are accessible in the Connections Builder.

</details>

### Receive a Call

The **Receive a Call** Trigger begins a Journey when a new user calls a particular phone number.

<details>

<summary>What number are these incoming calls being sent to?</summary>

\


Whatever number you associate with the application!

The [Console](../../console/console) provides the means to connect your phone numbers to your [Org](../../administration/airkit-organizations). Once connected to an Org, phone numbers will become available in the [Configuration Builder](https://docs.airkit.ai/?q=configuration-builder) when accessing your application in the Studio. Under the **Voice Bot** section, you can select an available number to receive, send, and manage associated calls.

Once a phone number is configured, incoming calls to that phone number will automatically be parsed as part of a Journey.

For more on how to associate your phone numbers with Airkit apps, see [Connecting Your Twilio Numbers To Airkit](../../sms/connecting-twilio-numbers).

</details>

<details>

<summary>Will a new Journey be triggered every time someone calls this phone number?</summary>

\


No, a new Journey will only be triggered when a call is sent by user who is not already going on an active Journey through the application.

Airkit manages phone conversations through the lens of an Actor. Actors represent users who are in the process of going through an Airkit Journey, and Actors can be identified by their phone numbers. When someone triggers a Journey by calling in, the phone number that they used to call becomes tied with their Journey. Should they call again while their Journey is still ongoing, those calls will not trigger a new Journey and will instead automatically become part of their existing Journey.

For more on Actors, see [Actors](../../concepts/actors). For a more detailed dive into how incoming calls are processed – both when they trigger the start of a Journey and when they don't – see [Conversations with Actors](../../concepts/actors/initializing-the-actor).

</details>

Invoking the **Receive a Call** Trigger is an [Event](../events) capable of triggering an Action Chain. This Action Chain is constructed in the Inspector. Clicking on the '+' icon to the upper right lets you select an Action to add to the Action Chain:

![](https://4185914948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSItjRhbHaLQ4ar3DUljt%2Fuploads%2Fgit-blob-b7a1dd76b4fd6f2967fcf1d8d024f12956859dd1%2Ftriggers-builder-v181-3.png?alt=media)

Most commonly, this Action Chain issued to call upon the [Start Voice Bot](../../actions/the-start-voice-bot-action) Action. This makes it possible to reply to the incoming call that triggered the start of the Journey.

<details>

<summary>Voice Bots cannot be activated unless the Actor is properly initialized, and initializing the Actor is not part of this Action Chain. When was the Actor initialized?</summary>

\


(For more context on initializing Actors, see [Actors](../../concepts/actors) and [Conversations with Actors](../../concepts/actors/initializing-the-actor).)

The **Invoke** Event described here is technically distinct from the application's [Starting Event](../events/starting-events), which comes out of the box tied to the necessary Actions to initialize the Actor. The Action Chain associated with the Starting Event are run immediately before Action Chain associated with this **Invoke** Event, meaning the Actor would be initialized shortly before starting activating a Voice Bot.

Starting Events are Global Events; they are accessible in the Connections Builder.

</details>

### Visit a Link

The **Visit a Link** Trigger begins a Journey when a user navigates to a Starting Link.

> 📘 The **Visit a Link** Trigger can be created in Triggers Builder, but any changes to its behavior must be defined elsewhere. Starting Links are referred to as a "Web URLs" in [Settings](settings), which is where they are configured.

For more on how to conceptualize Starting Links, see [Linking to Journeys](../../concepts/journeys/linking-to-journeys). For more on how to configure a white-label domain that can be used to define a Starting Link, see [Connecting Your Domain](https://docs.airkit.ai/?q=connecting-your-domain).

## App APIs

[App APIs](../../data-and-integrations/connecting-to-external-systems/application-apis) describe custom API endpoints that tie incoming HTTP requests directly to an Airkit application.

New base URLs can be created in the Tree, by clicking on the '+' icon to the right of **App APIs**. New endpoints can be added to a base URL by clicking on the '+' icon to the right of the relevant base URL:

![](https://4185914948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSItjRhbHaLQ4ar3DUljt%2Fuploads%2Fgit-blob-1b33f43d7ae21dc9399cc18e2abf436b27f83427%2Ftriggers-builder-v181-4.png?alt=media)

The details of base URLs and their endpoints are defined in the Stage. For more on how to create custom base URLs and endpoints, see [Building an App API](../../building-apps/integration-guides/building-an-app-api).

## Subscriptions

Subscriptions allow Airkit apps can to receive (and subsequently respond to) data updates from external APIs. For more on how this is done, see [Subscriptions (Web Hooks)](../../data-and-integrations/connecting-to-external-systems/subscriptions).

Within the Triggers Builder, Subscriptions connected to an application by clicking on the '+' icon to the right of **Subscriptions** in the Tree. From there, the interface that appears in the Stage can be used to view and modify the data source and the category of web hook. It can also be used to access the details of Journey Mapping.
