L
Leaphealth - OSDocs

Notification rules

How notification rules decide which events send messages, to whom, on which channel and with which template, at organisation or centre level.

LeapHealthOS sends WhatsApp messages and emails when things happen: a booking is confirmed, a bill is paid, a token is called, an alert fires. Nothing is sent unless an administrator has set up a notification rule for that event. This page explains how rules work and how to create and edit them. It is for administrators.

How rules are organised

A rule always belongs to:

  • one event, such as "Appointment Paid Confirmed" or "Bill Paid";
  • one audience: Staff (people in your organisation) or Patient (the patient the event is about);
  • one level: Organisation (applies at every centre) or Centre (applies at one centre).

So one event can have up to two rules at organisation level (Staff and Patient), and two more at each centre. Staff and Patient rules are independent: a patient message can go out with no staff message, or the other way round.

Each rule carries its own settings:

Setting

What it decides

Channels

WhatsApp and Email. Push and SMS can be picked but send nothing from this screen (see the channel table below).

Strategy and target

Which staff receive a Staff message. Ignored for Patient rules, which always go to the patient.

Templates

Which WhatsApp template, email template and sender are used.

Template names

How event values are matched to the names the template expects.

Only send when

Conditions that must all be true for anything to be sent.

Send somewhere else when

Overrides that send particular events to other staff or on other channels (Staff rules only).

Dates, amounts & wording

How dates, amounts and codes appear in the message.

Org Overlap

For a centre rule: whether it replaces, defers to or adds to the organisation rule.

The details of recipients are in Notification events and recipient strategies. Templates, values, conditions and formatting are in Templates and variables.

Open the Notification Rules screen

Go to SettingsPlatform ConfigurationNotification Rules. The screen is available to administrators. It is designed for desktop screens and is not shown on phones.

The screen has two tabs:

  • Organization: rules that apply at every centre.
  • Centre: rules for one centre. Pick the centre in Select Centre first; until then the tab says "Select a centre to view and configure its routing rules."

Events are listed in groups: Appointments, Appointment Emergency & Admin, Walk In, Medical, Appointment Payment Options, Billing & Invoices, Packages and Operational Alerts. Each event row shows a Staff line and a Patient line with their channels and priority. A Not configured chip means neither rule exists at this level. Operational Alerts are for staff only, so they have no Patient line.

Create or edit a rule

Choose the level

Administrator

Settings > Platform Configuration > Notification Rules

Use the Organization tab for a rule that applies everywhere, or the Centre tab and a centre for a local rule.

Open the event

Find the event and click the edit icon (Edit).

Expected result: The Staff and Patient sections open side by side. A section that already has a rule is marked Configured.

Set up the Staff section

Choose the Strategy and, where asked, the Staff Type, Department or Store Role. Pick the Channels and the templates for each channel.

Set up the Patient section

Pick the Channels and templates. Leave the channels empty if the patient should not be told.

Fix anything shown in red

Problems that would stop the rule working are listed in red above Save, for example "ROLE needs a staff type, or nobody is notified". Warnings in amber, such as a template value nobody fills in, do not block saving but usually mean the message will not send.

Save

Click Save.

Expected result: "Rules saved". Staff and Patient are saved together.

A section with no channels is not created. If you fill in templates or other settings but pick no channel, you see "pick at least one channel, otherwise its message settings are not saved."

Turning a rule off

There is no delete button. To stop a rule sending, edit it, remove all its channels and save. The row then shows "Channels: None".

The fields in a section

Field

Notes

Strategy

Who receives a Staff message. See Notification events and recipient strategies.

Staff Type / Department / Store Role

Appears for the ROLE, DEPARTMENT and STORE_ASSIGNED strategies. Department can only be set on the Centre tab.

Channels

One or more of WHATSAPP, EMAIL, PUSH, SMS.

WhatsApp Template ID

The numeric ID of an approved WhatsApp template.

Email Template and Email Identity

The email template and the verified sender address. Both are needed.

Org Overlap

Centre tab only, and only when an organisation rule exists for the same event and audience.

Priority

LOW, NORMAL, HIGH or URGENT. See the limitation below.

Staff Types

A list of staff types. See the limitation below.

Priority and Staff Types have no effect

Priority is saved and shown on the list, but it does not change how or when a message is sent. Staff Types is saved but not used to choose recipients. To send to a staff type, use the ROLE strategy and pick the Staff Type instead.

Channels

Channel

What is needed for a message to go out

WHATSAPP

A WhatsApp template ID on the rule, and a phone number for the recipient.

EMAIL

An email template and a sender identity on the rule, and an email address for the recipient. If the event has a PDF (for example an invoice), it is attached.

PUSH

A push template, which cannot be chosen on this screen.

SMS

Not available.

SMS is not sent

SMS can be picked in Channels, but LeapHealthOS has no SMS sending. A rule with SMS sends nothing on that channel. Use WhatsApp or Email.

Push cannot be set up here

There is no field for the push template on this screen, so a rule with PUSH picked here sends nothing on that channel. Ask your implementation team if you need push notifications.

WhatsApp templates, email templates and sender identities are created outside LeapHealthOS. Ask your implementation team for the template ID or to add a template or sender.

Organisation rules and centre rules

When an event happens at a centre, LeapHealthOS looks for an active rule at that centre and an active organisation rule, for the same event and audience:

  • If only one exists, that one is used.
  • If both exist, the centre rule's Org Overlap decides.

Org Overlap

What is sent at this centre

OVERRIDE (default)

Only the centre rule.

DEFER

Only the organisation rule. The centre rule is kept but not used.

UNION

Both rules. Recipients may get two messages.

For example, your organisation rule sends booking confirmations to patients on WhatsApp. One centre also wants an email: create a centre rule with Email and set Org Overlap to UNION. Another centre wants no confirmations at all: create a centre rule with any channel and Org Overlap OVERRIDE, save it, then edit it again, remove its channels and save.

Events that are not tied to a centre, such as organisation-wide alerts, only use organisation rules.

Good to know

  • Rules send straight away. Notification rules do not respect quiet hours.
  • Journeys send separately. Messages sent by Journeys do not go through notification rules. If a journey and a rule both message the patient about the same thing, the patient gets both.
  • LeapHealthOS does not show whether a message was delivered. If a message does not arrive, check the rule, the templates, the recipient's phone or email, and the conditions. See Templates and variables.
notificationsnotification ruleswhatsappemailchannelsadmin

Was this page helpful?

Last updated on

On this page