MEP User Guide
Keywords Overview
You can create multiple keywords for each routing code. Most services require several keywords so that incoming texts from end users are routed to the correct service.
You can also choose to link multiple keywords to the same service. This is useful for:
- Using keywords to identify which advertisements are generating the best traffic to a service
- Reducing the number of services you need to create for doing the same task, such as responding to STOP or HELP messages
Depending on your MEP user permissions, you will be able to set up your own keywords.
Types of keywords
The type of keywords you will need to configure will depend on your region. Some of the common keywords are shown in the table below.
Keyword |
What is it for? |
---|---|
Your campaign keywords |
The keywords that route to your campaign opt-in service and content delivery service, such as YES, MORE, ADD, and CONTINUE. |
A catchall keyword |
For some campaigns, you may want to capture any text that a user has entered that does not match a keyword. A common example of this would be if end users were sending votes in (such as their favorite song or performer for a radio top 100 show). The catchall keyword has the lowest keyword priority so that your other keywords will match first. |
HELP |
This should route to a service that sends the help compliance messages for your region. |
STOP |
This should route to a service that unsubscribes your end user from the correct service. Depending on your region, you may also need to include other stop keywords. For example, US services should also include alternatives such as: END, CANCEL, UNSUBSCRIBE, and QUIT. |
STOPALL and STOP ALL |
This should route to a service that unsubscribes your end user from all of your related services. |
Keyword rules and priority
When setting up a keyword, note that:
- Keywords are case-insensitive.
- If you add any spaces at the beginning or end of the keyword, your end users will need to include these spaces for the routing to work correctly.
- You can use regular expressions in a keyword. Note that if you use a regular expression, you must specify that the keyword is case-insensitive as part of the expression. See Using Regular Expressions in EL.
The order in which keywords are checked for matches is known as the priority of the keyword. Priority is determined by the following order (and explained below):
- Priority number
- Type of keyword
- Network (mobile operator) field
OpenMarket checks against these factors in order until it finds a unique match. For example, you could have two keywords configured with the same priority number, keyword type and name (e.g. “MATCH”), but one could be for end users connected via a specific mobile operator.
Priority number
The priority number is an “Advanced” setting in the keyword. If you set different priority numbers in the Priority field, then keywords are checked in order, based on their priority number. Priority numbers are useful for changing the order normally used to check keywords; for example, to make:
- A regular expression keyword the last keyword checked for a match (rather than the first)
- A short keyword—for example, MUSIC—matched before a long keyword—for example, MUSIC01
Type of keyword
The next check is based on the keyword type, in the following order:
- Regular expression keywords
- Message starts with and Message ends with keywords*
- Message contains keywords
- Catch all keyword
* We check both starts with and ends with simultaneously. However if we find one of each that is the same length, the tie break goes to the Message starts with keyword.
If there are multiple matches for the same type of keyword, then it is next checked against the length of the keyword. For example, if you have two Message starts with keywords called “LONGER and LONG, then MEP checks the LONGER string first.
The exception to this is regular expression keywords, which does not look at the length when looking for matches. If two regular expression keywords can match the sent keyword, then the next check is against the mobile operator (network) field.
Network field
Keywords that are set to specific mobile operators are checked first, in descending alphabetic order.