Create a rule¶
A rule decides when offers are eligible at a moment and how they compete with the offers of other rules. This document describes how to create a rule in the console on its offer card, including how to make it a fallback rule. To change a field by writing what you want in your own words, see Write a rule in plain language. For what conditions can express, see Rule conditions.
You can also create rules with the Offer Manager API.
The example on this page is the resort concierge agent from Moments, offers, and rules. The rule shows a spa booking offer after check-in, to guests in the gold tier, on RCS.
Before you begin¶
- Offer Manager must be enabled for your org. See Availability.
- You need the editor, admin, or owner role in the org.
- Create a moment and at least one offer.
Create the rule¶
- In the console, in the Offer Manager section, click Rules.
- Click Create Rule.
- In Rule name, enter a name, such as
Spa for gold guests. Customers never see it. - On the Card tab, under Agent, choose the agent the rule is for. You can't change it later.
- Under Offer, click Edit, click Add an offer, and choose an
offer in the Select offer dialog. Repeat for each offer the rule can
show. With more than one, choose in With several offers:
- Choose the best one per request favors the offers that earn more engagement, and keeps showing every offer some of the time.
- Show them in turn, in this order shows the offers to each customer
in the listed order. It applies only when your agent sends a
subscriberidentifier.
- Under Who sees it, click Edit, and add the conditions on the
customers the rule is for. For gold-tier guests, click Attribute,
choose
tier, and set it to equalgold. Leave it empty to reach everyone. See Rule conditions. - Under When, click Edit, and in Moments your agent reports,
select one or more of the agent's moments, such as
After check-in. - Under Where, select the channels the rule serves on, such as RCS. With none selected, it serves on every channel.
- Optional: Under Not shown to, click Edit, and add the customers to remove, such as anyone who declined this offer in the last 30 days. Click Offer history for a condition on past responses.
- Optional: Under How often, click Limit how often each customer sees it, and set At most N times in a period for each customer.
- Optional: Under Schedule, set Starts and Ends dates, the days of the week, and the hours From and Until, in your org's time zone.
- Under Priority, choose High, Normal, or Low. When several rules qualify for a request, a rule in the highest priority present wins.
- Check Estimated reach at the top of the page. See Read a rule's estimated reach.
- To serve the rule as soon as you save it, turn on the switch beside Rule name, so that it reads Active. A new rule starts Paused.
- Click Add.
Each field's sentence changes as you edit, and reads back what the rule will do. The rule appears on the Rules page.
Set limits, fallback, and test mode¶
The Advanced tab shows the rule field by field, with each part's sentence beside it and the data a save sends. It also holds the settings the card doesn't:
- Delivery limit caps the rule by Total serves or by Share of matching requests (%).
- Use only when no other rule matches makes the rule a fallback rule, considered only when no other rule for the moment qualifies. Fallback rules still apply their own conditions and limits, so you can set different defaults for different customers with one fallback rule for each.
- Test mode (no live SMS sends) marks the rule's responses as tests.
Each response then carries
isTest: true, which your integration can use to avoid sending the offer to customers.
Changes on either tab are part of the same draft, and Add or Save saves both.
To see why a rule did or didn't qualify for a request, send a test request.
See the test parameter in
Request parameters.
What's next¶
- Request an offer from your agent at the moment.
- Change fields in your own words with Write a rule in plain language.
- Read how rules are evaluated in How a request is decided.
- Manage rules with the API's
lineItemcollection in the Offer Manager API.