Keyword
Set up a Keyword Automation to send an automated response when users text a predefined keyword through SMS, WhatsApp, or RCS.
A shortcode (a 4–6 digit number) supports SMS promotions, alerts, and two-factor authentication. Use a shortcode for:
- Marketing promotions, such as ads, coupons, sales alerts, and other promotional information. US-based businesses require a shortcode to send marketing texts.
- Two-factor authentication, where SMS shortcodes can provide faster message delivery.
For example:
Send 'Mammoth' to 12345 and receive an alert for Mammoth Resort.
Keyword: Mammoth
Short-code: 12345

A long code (a 10-digit standard phone number) sends and receives voice calls and text messages. Courier companies, banks, airlines, and other service providers commonly use long codes for customer service communications, such as:
- Notifying a customer that a package is out for delivery.
- Sending a monthly account balance.
- Responding to a passenger’s seat-preference request.
Complete the following steps to create a Keyword Automation:
- Delivery
- Keyword
- Summary
Delivery
Choose the delivery channel and recipients for the automation.
Keyword Automations support the following delivery channels:
For channel and recipient settings, see Delivery.
Keyword
Create interactions that match predefined keywords and send response messages. You can also add a webhook to an interaction to send participant events to your application.

To create an interaction:
-
Interaction Label: Enter a name that identifies the interaction, such as FreeTrialOffer or NewsletterSignup.
-
Keywords: Enter one or more keywords that trigger this interaction’s automated response. Use multiple keywords to compare engagement across offers or entry points.
Keep keywords short, simple, and relevant to the automation. For example, use TRIAL for a free-trial offer. Avoid special characters such as
!,@,#, and$, which can make a keyword difficult to enter.Keywords are not case-sensitive, so Trial and TRIAL are equivalent. Keywords used by other automations appear in red.
A keyword must be unique for the same shortcode. For example, if one automation uses
TRIALwith a shortcode, another automation cannot useTRIALwith that shortcode.
NOTEA keyword and its corresponding platform engagement entity are unique. For example, say the 12345 shortcode is being used in a automation with the keyword "TRIAL". Creating a different automation with the shortcode 12345 and the "TRIAL" keyword would create a conflict with the existing automation. Hence, this condition is not allowed.
You can have up to 30 keywords, and each keyword accepts up to 29 characters. To keep track of the number of keywords in use, at the bottom right corner of the Keywords section is a keyword counter.
The Message section will be aligned with the channel type used in the automation, SMS, RCS, or WhatsApp, and with the features allowed in each of them.
Keyword Automations support regular expressions (regex, patterns that match text) for validating user input. Use a regex keyword when an interaction must match a specific format, such as an ID number or phone number.
Example: Validate a national ID

To require an ID that starts with an uppercase
Cfollowed by seven digits, enter the following regex in the Keywords field:^C\d{7}$This pattern contains:
^, which requires the input to start at this position.C, the uppercase letterC.\d{7}, exactly seven digits.$, which prevents additional characters after the seven digits.
A message such as
C1234567matches this pattern and triggers the automation. The user then receives the configured response, for example, "Thanks for sharing your ID." Messages that do not match the pattern do not trigger an interaction. -
Message: Enter the response message that users receive after they text a matching keyword.
For example, use JOIN as an invitation keyword and send deals and news to users who join your contact list.

Participants see the following after sending the keyword JOIN.

Define a webhook to send an interaction event to your application.
The Response Message supports Markdown text formatting, including bold, italics, strikethrough, and monospace.
Markdown syntaxMarkdown syntax is a powerful tool that can help you make your messages stand out and capture the attention of your recipients. You can create visually appealing and easy-to-understand messages. making your messages more readable. In the world of short attention spans, properly formatted messages can help ensure that your content is understood and remembered. Therefore, markdown is a lightweight markup language that you can use to add formatting elements to plain text text.
WhatsApp only supports a limited set of basic formatting options, such as bold, italics, and strikethrough:
- Bold Text: To make text bold, place asterisks
*around the text. (e.g.,*this text is bold*). - Italic Text: To italicize text, use underscores
_around the text. (e.g.,_this text is italic_). - Strikethrough Text: To strike through text, place tildes
~around the text. (e.g.,~this text is Strikethrough~).
Markdown syntax is supported exclusively for WhatsApp messages and is not available for SMS and RCS.
- Bold Text: To make text bold, place asterisks
-
Use external webhook: Select the webhook checkbox to send interaction events to your application in real time. The webhook forwards the event data for further processing.
NOTEif you opt for WhatsApp as delivery channel and set a Webhook URL go to the Keyword (Webhook WhatsApp) section to know the data displayed on the JSON Payloads that is sent from the platform to your webhook URL.
-
Webhook name: Enter a name that identifies the webhook.
-
POST Method: Select
POST, which the platform uses to send event data to your application. -
Webhook URL: Enter the URL in your application that receives and processes the webhook payload.
Each user who sends the
TRIALkeyword generates an event. Your webhook URL receives the event data in JSON format:{ "date": "2020-10-22T20:29:57.453673Z", "owner": "[email protected]", "origin": "8641", "callback": "http://www.mycallback.com/", "externalId": 8, "id": "1abc2def3ghi4jkl", "text": "TRIAL", "user": "+580000000005" }The payload is a JSON object—a collection of key-value pairs. For example,
"text": "TRIAL"identifies the keyword that triggered the event.Key Value date User participation date. The date is represented in UTC timezone. owner Automation owner. origin Code where the user comes from. callback Signature of the invoked method. externalId Process identifier. id User identifier generated by the operator. text The keyword the user sent to participate in the automation. user User mobile number who participated in the automation. Use the
textanduservalues to identify the keyword that triggered the event and the participating user.
-
-
Add Interaction: Select Add Interaction to add another interaction.
-
Delete Interaction: Select Delete Interaction below the external webhook checkbox to remove the interaction.
After you complete the Keyword configuration, select Next to continue to Summary.
Summary
Review the automation settings before you activate it.

The Summary step includes:
- Delivery Channel: The channel used to send the automation: SMS, WhatsApp, or RCS.
- Sender: The sender selected during setup. Each delivery channel uses its own sender type, such as a sender number, WhatsApp Business Account, or RCS sender.
- Components: The automation type and its components.
- Automation Activation: Choose when to activate the automation: Live (available for SMS, WhatsApp, and RCS) or Save as Draft.
For additional settings, see Summary.
Updated 11 days ago
