Skip to main content

Triggers & Delivery

An alert's settings decide when it notifies and who hears about it.

{
"mode": "threshold",
"interval": "1h",
"minimum": 5,
"percentage": 0.3,
"cooldown": "6h",
"staff": ["staff_…"],
"teams": ["team_…"],
"recipients": ["ops@example.com"],
"channels": ["mail", "whatsapp"]
}

Instant​

"mode": "instant" (the default) notifies as soon as one entity matches. Each notification is about that one entity.

Use it for things someone should act on straight away: a one-star review, a food poisoning complaint, a VIP customer's bad experience.

Threshold​

"mode": "threshold" looks for a burst of matches. Every minute, Harlyy looks at the entities that came into the alert's scope within the last interval, and notifies when:

  • at least minimum of them match the conditions and haven't been notified yet, and
  • the matches are at least percentage (0 to 1) of all the in-scope entities in that window.
SettingRequiredDescription
intervalYesThe window: 15m, 30m, 1h, 6h, 12h or 1d.
minimumYesThe fewest matches that notify, at least 1.
percentageNoThe smallest share of in-scope entities that must match. Defaults to 0, i.e. any share.

For example, with the scope "submissions to the Dine-in survey", the conditions "lowest rating ≤ 2", interval 1h, minimum 5 and percentage 0.3:

  • 6 bad submissions out of 10 in the last hour notifies (6 ≥ 5 and 60% ≥ 30%).
  • 6 bad submissions out of 40 doesn't (only 15%): a busy lunch, not a problem.
  • 3 bad out of 3 doesn't (fewer than 5).

That's why the scope matters for thresholds: the percentage is a share of the entities in scope.

Once a threshold alert notifies, the matches it included won't count again. If more bad submissions arrive, it can notify again as soon as they reach the threshold, unless a cooldown is set.

note

Competitor reviews and competitor ratings can only use instant alerts.

Cooldown​

cooldown (15m to 1d) is the least time between two notifications. Use it to keep a noisy alert, such as every Instagram mention, to a manageable rhythm. Leave it out to allow every match to notify.

  • Instant alerts drop matches that arrive during the cooldown. They're recorded but never notify.
  • Threshold alerts keep counting during the cooldown. If the threshold is still met when it ends, the next check notifies with every match still in the window.

Recipients​

SettingDescription
staffStaff member IDs to notify.
teamsTeam IDs. Every staff member in each team is notified.
recipientsExtra email addresses, for people who don't have a Harlyy account.

Channels​

ChannelWhat's sent
mailA full email with a card per entity (ratings, text, the customer's answers, engagement) and "Why you're seeing this".
mobileA push notification to the Harlyy app, which opens the details.
whatsappA WhatsApp message from Harlyy summarising each entity on one line, with a button that opens them in the dashboard. Staff only receive it once they've connected their phone number.

Leave channels empty to use all three. recipients only receive email.

History​

Every notification is recorded as an activation, shown under History on the alert's page. Each one records:

  • when it was sent
  • how many entities matched, and for a threshold alert how many were in scope
  • each entity (up to 20) with the reasons it matched
  • the channels used
  • whether sending failed

Through the API: GET /v2/businesses/{business}/alerts/{alert}/activations.

Status​

status is active or inactive. Inactive alerts keep their settings and history but don't check anything. Matches that arrive while an alert is inactive are never notified, even after it's switched back on. Use the Active toggle on the alert's page, or PATCH the alert with { "status": "inactive" }.

Updating an alert​

PATCH /v2/businesses/{business}/alerts/{alert} changes only what you send:

  • name, conditions and status replace the current values.
  • scope replaces the scope; send null to remove it.
  • Inside settings, only the fields sent change. Send "cooldown": null to remove the cooldown.

An alert's type can't change. Create a new alert instead.

Changes apply to entities that arrive afterwards. Entities already checked keep their earlier result until they're updated again.