Osy#betaRun it on Osyrin: osyrin.com

Kits · Service desk

Inbox notifications — who the inbox names, told

The inbox's people told in their bell — an item offered to them, work handed to them while its holder is away, a promise at risk or missed on what they hold, and a queue's leads when nobody picks an item up — in their own words and language, and never about an item they may not read; the leads are whoever the app's LeadsInbox policy says.

Package
Osysharp.Inbox.Notifications
Install
use Osysharp.Inbox.Notifications@0;
Group
Service desk
Tests
6 in the kit’s own suite
Builds on
Identity, Inbox, Notifications

The people Osysharp.Inbox says should know, told in their Osysharp.Notifications bell: the one an item is offered to, the cover it is handed to while its holder is away, whoever holds it when its policy says a promise is at risk or missed, and a queue's leads when nobody picks an item up. Each reads it in their own language, in the second person.

Use case. A request is offered to Ines as her account's owner. Her bell says "Offered to you — it is yours if you take it within 15 minutes." She goes on leave, and her open work is handed to Rahul as cover; his bell says "Handed to you — Ines is away until Mon 8 Jun 06:00 UTC." The first reply on one of them goes at risk, and its policy says to tell the holder; his bell says "First reply is at risk." Nobody wrote a line of code for any of it.

osy

use Osysharp.Inbox@0;
use Osysharp.Notifications@1;
// Osysharp.Inbox.Notifications is not written: it arrives by itself, because the app uses what it completes (`osy lock` says so)

The leads are whoever you say, once. Two of the inbox's events are for a queue's leads, PickupOverdue and PromiseToldToLeads. You already tell the inbox who leads it, and that is all it takes: the queue's members who satisfy your policy are told, in the same words — or, when nobody in that queue leads, everybody who leads in any queue.

osy

policy LeadsInbox => IsLead;            // the one line about your leads, which the inbox needs anyway

Never about an item they may not read. Every notification is about the item. It is delivered, shown and mailed only if the recipient may read that item under their own rules. The inbox may name somebody who may not read it, such as an offer on a restricted item, and that person's bell stays empty.

One unread notification per item and kind of event: a second "at risk" on the same item moves the unread one to the top instead of adding another.

Get it

Add the kit to your app’s manifest:

osy

app MyApp {
  use Osysharp.Inbox.Notifications@0;
}

Then run osy lock: it downloads the release, verifies it by its content address and pins that version in osyrin.lock. osy kits Osysharp.Inbox.Notifications shows what the kit is for, from inside your app.

Reference: osy docs workflow-inbox-notifications-kit.