CERP messaging guide
SMS, the Bale messenger, templates, scenario writing and customer-club incentives — which message is sent, when, and under what condition.
1. How is a message sent?
Every system message is built from a template. Each event has a topic (for example “Sales invoice recorded”), and you choose one template for each topic. There is no free, hand-written text.
Conditions for every send
- A template is chosen for that topic under “Template settings”. If the organisation has not chosen one, the system administrator's default template is used.
- For SMS, the template is active and carries the text code approved by the SMS provider.
- The organisation has SMS credit (not needed when sending through Bale).
- The customer has a mobile number.
Links never appear in full in the text; the system makes a short code for each link and the template text only takes that code (such as https://3rp.ir/#ReceiptCode#).
2. Sending channel: SMS or Bale
Under Settings → Bale messenger → “Channel for template messages” you decide in one place which channel all automatic messages use:
| Option | Behaviour | Suited to |
|---|---|---|
| SMS only | As before; the default for every organisation | When Bale has not been set up |
| SMS and Bale together | Both are sent | Important messages that must be seen |
| Bale first, SMS as fallback | If Bale delivers, no SMS is sent; otherwise SMS is sent | Saving SMS credit |
| Bale only | No SMS is sent | Organisations that work only with Bale members |
Who receives Bale messages?
- Always: a customer who has messaged the organisation's Bale account and become a “Bale member”.
- Other numbers: only when “Send to unknown users” is turned on in the Bale settings.
The Bale text is the template text with its variables filled in. Bale does not need the SMS provider's text code; choosing a template is enough. Every Bale message is logged in the Bale report as a “template message”.
3. Message map
Automatic sent without a scenario · Manual by a button or campaign · Scenario only from scenario writing
Sales and orders
| Topic | Type | When | Condition |
|---|---|---|---|
| Sales invoice recorded | Automatic | Immediately after the invoice is recorded | “Invoice SMS” is ticked; the invoice has a customer |
| Order recorded | Automatic | When an order/quotation is created (not edited) | “Order SMS” is ticked |
| Online invoice link | Manual | From the transaction list | — |
| Table guest welcome | Automatic | As soon as a customer is added to an open table | See open tables |
Membership and profile
| Topic | Type | When | Condition |
|---|---|---|---|
| Membership notification | Automatic | When a new customer is created | “Membership SMS” is ticked |
| Invitation to complete profile | Automatic | When a new customer is created | “Automatic profile-completion invitation” is ticked |
| Profile completion reminder | Manual | Profile-completion invitation campaign | — |
| Survey landing page | Manual | The “Send survey” button | A survey is active |
Club incentives
| Topic | Type | When | Condition |
|---|---|---|---|
| Points incentive | Automatic | After every invoice that earns points | Points incentive active and “SMS notification” on |
| Cashback (days/weeks/months/no expiry) | Automatic | When cashback is paid into the wallet (instantly or when due) | Cashback active |
| Discount code (24 variants) | Automatic Scenario | At the “SMS send time” for targeted codes, plus reminders | Code active and unexpired; has a target segment |
| Gift credit (with or without expiry) | Automatic | When the gift is finalised, plus reminders | — |
| Dynamic tier: gold, silver, bronze | Automatic | When the customer is promoted | Dynamic tiers active |
| Dynamic tier: down to silver, bronze, regular | Automatic | When the customer is demoted (daily check) | Dynamic tiers active |
Reservations, sports clubs and buildings
| Topic | Type | When |
|---|---|---|
| Table reservation: confirmed / rejected | Automatic | When the operator confirms or rejects |
| Table reservation: reminder | Automatic | About one hour before the reservation |
| Club sessions: top-up / use | Automatic | Buying a package / each session used |
| Club sessions: low balance / used up / near expiry | Automatic | Reaching the threshold / reaching zero / close to the end of validity |
| Court booking: confirmed / rejected / reminder | Automatic | Booking status changes; reminder about two hours before |
| Building: charge issued / monthly charge / payment received | Automatic | Recording a debt, monthly issue, recording a receipt |
| Building: shared-space booking confirmed / rejected | Automatic | Booking status changes |
| Building: shared-space booking reminder | Automatic | The morning of the booking, for confirmed bookings |
| Building: unit debt reminder | Automatic | Once a month, ten days after the monthly charge day (or the 15th), only for units in debt |
| Building: building notice | Automatic | When reminders marked “Send SMS” fall due, to every unit in that building |
Other
| Topic | Type | Description |
|---|---|---|
| One-time password | Automatic | Mobile sign-in, customer verification, reservations, the online store, the order kiosk; always SMS |
| Promotional message (general / offer / event) | Manual | From “SMS management” |
| Scenario writing: SMS action (16 topics) | Scenario | If no topic is chosen for the “Send SMS” action, the topic for that behaviour is sent automatically (for example birthday → “SMS action for birthday”) |
| Scenario writing: incentive header (15 topics) | Scenario | When a scenario grants credit, points or a prize for a behaviour and a template is chosen for that behaviour's “incentive header”, that text is sent |
4. Scenario writing
Every scenario means: when this behaviour happens, take this action. Path: Customer club → Scenario writing.
Behaviours (what starts a scenario)
| Behaviour | When it happens | Repetition |
|---|---|---|
| Joining the club | A customer is created | Once per customer |
| Completing the profile | The customer's details become complete | Once |
| First order | The customer's first order/quotation | Once |
| Order recorded / sales invoice issued | Every order or invoice with a customer | Every time |
| Buying a product / buying from a product group | The target item or group is on the invoice | Every time |
| Birthday / membership anniversary | The birthday or anniversary | Once a year |
| Dynamic tier promotion or demotion | A change between gold/silver/bronze/regular | Every change |
| Commercial class (champion, loyal, regular, needs attention, dormant, lost) and moving up or down a class | A class change in the periodic review | Every change |
| Joining a customer segment | The customer enters the target segment | Every new membership |
| Receiving a custom tag | A tag is given to the customer | Every time |
| Survey sent / answer recorded / positive, neutral or negative feedback | A survey is sent or answered (score 4 and above is positive, 2 and below negative, in between neutral) | Every time |
| Webhook received | A call from an external system | Every time |
Actions
| Action | What it does | Message to the customer |
|---|---|---|
| Send SMS | A message with the topic you choose | Yes |
| Discount code | Sends a prepared discount code to the customer | Yes; the template matching the code type |
| Gift credit | Tops up the customer's wallet | Yes; the gift-credit template or the chosen template |
| Award points | Adds to the customer's points | Yes; the points-incentive template or the chosen template |
| Special prize | Makes the customer a prize winner | Optional |
| Give a custom tag | Gives the customer a tag | No |
| Send a webhook | Notifies an external system | No |
Settings for each scenario
- Execution delay: run the action immediately or after a number of minutes, hours or days.
- Maximum runs per customer: for example at most 3 times.
- Minimum interval between runs: for example at most once every 30 days per customer.
- Combined condition: run the scenario only for customers with a given dynamic tier, commercial class and custom tag. All chosen conditions must hold at the same time.
- Follow-up steps (chain): up to 5 more actions, each with its own delay.
Main action: give the tag “Returned” · Step 2 (1 hour later): thank-you SMS · Step 3 (3 days later): discount code
5. Scenario engine settings
On the scenario writing page, the “Scenario engine settings” button:
| Setting | Default | Use |
|---|---|---|
| Blacklist also stops the club's separate messages | On | Blacklisted customers also get no invoice, membership, cashback and similar messages |
| Suppress the separate message only if the scenario sent an SMS | On | Prevents a customer getting no message at all when the scenario has no SMS |
| Scenario SMS cap per customer | Unlimited | For example at most 2 messages in 7 days |
| Fire on the first calculation | Off | The first commercial class/segment calculation also triggers scenarios |
| Always scan commercial class and segments | Off | Keeps customers' status up to date even without an active scenario |
6. Incentives
Points incentive
When the points incentive is active, the points for each purchase are added to the customer after every sales invoice. If “SMS notification” is on, a points message is sent too. The “Recalculate” button still recalculates everyone's points from scratch.
Cashback
Cashback is paid into the wallet either immediately or on the set date, and a message is sent at that moment. The message topic depends on how long the cashback can be used: up to 31 days “days”, up to 120 days “weeks”, and longer “months”.
Targeted discount codes
- Sent at the “SMS send date and time” to members of the target segments.
- The template topic is derived automatically from the code type: percentage or fixed amount, single or multiple use, with or without expiry, with or without a minimum, with or without a cap.
- Reminders go only to customers who have not used the code yet.
- If no template is chosen for that code type, it waits up to 48 hours for one to be chosen and is not sent after that.
Gift credit
When a gift is finalised, the credit is paid into the target customers' wallets and a message is sent. Automatic reminders go only to those who have not used the gift, and continue until the gift expires.
Dynamic tiers
Promotions are sent with a congratulation text for that level, and demotions with a separate “demotion” text. Choose a separate template for each of the six cases.
Birthdays and anniversaries
Birthday and membership-anniversary gifts and messages are configured only through scenario writing: the “Birthday” or “Membership anniversary” behaviour with a gift-credit, discount-code or SMS action. The old birthday-gift settings have been removed from the settings page.
7. Open tables and live bills
As soon as a customer (with a mobile number) is added to an open table, a welcome message with a short link is sent to them.
- Opening the link shows the table's live bill: items, total, deposit and each person's share (split).
- The page updates automatically and works while the table is open; once the table is settled, the link stops working.
- Only one message is sent per open table. If the table's customer changes, the same link is also sent to the new number.
- Held receipts (other than tables) do not receive this message.
To enable it: choose a template for the “Guest welcome + live table bill” topic and make sure the link shortener is active. Without a template this feature is off.
8. Blacklist
- A blacklisted customer is excluded from every scenario: messages, credit, points and prizes.
- With the default setting, they also receive none of the club's separate messages (invoice, order, membership, cashback, gift, tier, promotions).
- Service messages are always sent: one-time passwords, table reservations, open tables and buildings.
- Scheduled sends and discount-code and gift-credit reminders are not sent to the blacklist either.
9. Template text variables
Variables are written in the template text as #Name#. Each topic accepts only its own variables; the allowed list for each topic is shown on the template creation page.
| Variable | Value | Topics |
|---|---|---|
| #CustomerFullName# | Customer name | Almost all |
| #StoreName# | Organisation/store name (filled in automatically if empty) | Almost all |
| #OTP# | One-time password | One-time password |
| #InvoiceNumber# #InvoiceDate# #InvoiceTime# #InvoiceAmount# | Invoice number, date, time and amount | Sales invoice recorded |
| #OrderCode# #OrderDate# #OrderTime# | Order code, date and time | Order recorded |
| #DiscountCode# #DiscountPercent# #DiscountAmount# | Discount code and amount | Discount code |
| #DiscountRangeFrom# #DiscountRangeEnd# #MinimumReqTotal# #MaximumDiscount# | Validity period, minimum purchase, discount cap | Discount code (depending on type) |
| #CreditAmount# #CashbackAmount# #WalletBalance# | Gift amount, cashback amount, wallet balance | Gift credit, cashback, scenarios |
| #ExpiryDate# #ExpiryDuration# | Expiry date, validity period number | Gifts, cashback, club sessions |
| #Points# #TotalPoints# | Points this time, total points | Points incentive, dynamic tiers, scenarios |
| #ReceiptCode# #SurveyCode# #ProfileCode# #LiveBillCode# | Short link code for the invoice, survey, profile, live table bill | Each in its own topic |
| #TableNumber# #GuestCount# #ReservationDate# #ReservationTime# | Table, number of guests, reservation date and time | Table reservations, open tables |
| #PackageName# #UsedSessions# #ChargedSessions# #RemainingSessions# #CourtName# | Package, sessions used/charged/remaining, court name | Club facilities |
| #ResidentFullName# #BuildingName# #UnitTitle# #ChargeTitle# #ChargeAmount# #ChargeDate# #ReceiptAmount# #ReceiptDate# #AmenityName# | Resident, building, unit, charge, receipt, shared space | Buildings |
10. Setup checklist
- Top up the organisation's SMS credit.
- Under “Template settings”, choose a template for every topic you want to send. Default templates do not work for SMS until the system administrator records the approved text code and activates the template.
- Turn on the automatic sending options: membership SMS, order recorded, invoice recorded, profile-completion invitation.
- If you use Bale: set up the Bale connection and choose the “Channel for template messages”.
- Configure incentives: points, cashback, dynamic tiers.
- Build your scenarios and test them once with a test customer.
- Check the “Scenario execution log” and the SMS/Bale reports.
11. Why wasn't the message sent?
| Symptom | Likely cause | Fix |
|---|---|---|
| No message is sent for an event | No template is chosen for that topic | Choose a template under “Template settings” |
| There is a template but no SMS is sent | The template is inactive or has no provider text code | Ask the system administrator to approve and activate the template |
| Credit error | SMS credit has run out | Top up credit, or use the “Bale first, SMS as fallback” channel |
| No invoice/order/membership message | The automatic sending option is off or the customer has no number | Turn the option on and record the customer's number |
| Only some customers get nothing | The customer is blacklisted | Check the blacklist or the scenario engine settings |
| The scenario shows “failed” in the log | No template chosen, no number, or the SMS cap is reached | Read the error text in the execution log |
| The scenario never runs | The combined condition is not met, the run cap is reached, or a one-time behaviour already ran | Check that scenario's settings |
| Bale messages are not sent | The customer is not a Bale member and “Send to unknown users” is off, or the Bale connection is down | Check the Bale settings and “Test connection” |
| The table welcome message is not sent | No template chosen, the customer has no number, or the link shortener is off | See open tables |
12. Referral code status and topics without an event
The status of the following topics reflects the current version of the software:
- Active Referral code: a customer's mobile number is their referral code. When a referrer is recorded and the referred customer reaches the set number of purchases, both receive a gift. The referral invitation is sent with the configured delay and the topic's template. Complete referral code guide
- No automatic sending “Taking part in refinement” (SMS action and incentive header): there is no matching behaviour in the system.
13. Messaging in the offline edition (OfflineCerp)
In the offline edition (a store running on the local service), the cloud edition's SMS, WhatsApp and Bale pages are not shown. Instead there is one page: Settings → Store messaging.
| Channel | How it works | What it needs |
|---|---|---|
| SMS | Sent through the Yasna server; each SMS uses one unit of the store's credit | An active licence, internet access, SMS credit |
| Bale messenger | The local service connects directly to the Bale gateway | The store's own API key |
| The local service connects directly to the WhatsApp gateway | The store's own API key |
SMS credit
- The remaining credit and the number of SMS sent are shown at the top of that page.
- “Request SMS credit” sends the number you need to support; once approved, the credit is topped up.
- Support tops up credit from the OfflineCerp licence management section (“Store SMS credit”).
Automatic messages
- A sales invoice message to the customer.
- A welcome message when a new customer is created.
Each automatic message is sent through every active channel. The message text is the server's approved template and cannot be changed in the store.
