The bulk notification engine lets scheduler users detect shift changes in bulk (using field history), review a queue of per recipient rendered messages, edit them, pick channels, and send. This replaces the pattern of one Flow fired alert per record change. Delivery is native for Email and Push, and every other channel (SMS, WhatsApp, Viber, third party email) is delivered by your Flows or Apex plugins.
This engine ships from package version 10.3 onward. If you are upgrading from an earlier Version 10 release, make sure the post-install checklist below is completed before enabling it for schedulers.
This article is written for org admins and implementation teams setting up or extending the engine after installing or upgrading the WFM package.
Work through these in order. The feature is invisible to users until step 3.
Assign the WFM Admin permission set (or replicate its access) to every scheduling user who should see the Notification Center. It grants CRUD on the three new objects:
| Object | Purpose |
|---|---|
b3s__Outbound_Campaign__c |
One reviewable and sendable batch. |
b3s__Outbound_Notification__c |
One message per recipient (child of the campaign). |
b3s__Notification_Template__c |
Reusable message templates. |
Users without create and edit access on these objects cannot compose or send, because DML is enforced in user mode. That is the permission gate.
Detection reads b3s__Shift__History. The package flags 7 Shift fields for tracking (Status, Contact, Work Job, Work Site, Work Site Location, Scheduled Start Time, Scheduled End Time). After install or upgrade, verify in Setup, Object Manager, Shift, Fields, Set History Tracking that these are active. Salesforce lets subscriber orgs override this, and the org wide limit is 20 tracked fields per object (the package uses 7).
History only records changes made after tracking is active. There is no retroactive detection, so enable this before go live day, not after.
The Notification Center only appears for scheduler definitions (b3s__Scheduling_Context_Provider__mdt JSON) that declare a notifications root key:
{
"timezonePreference": "user",
"schedulables": { },
"notifications": {
"enabled": true,
"defaultChannels": ["Email", "Push"]
}
}
enabled: false disables it while keeping the config in place.defaultChannels (optional) pre-ticks channels in the send dialog, overriding the CMT Default On flags.Because this is per definition, you can enable notifications for the Account scope scheduler but not the Contact scope one.
Setup, Custom Metadata Types, Notification Channel, Manage Records. Packaged rows: Email (sends natively via Salesforce email) and Push (sends via 3B Portals web push). Both ship Active and Default On. Add one row per additional channel you deliver yourself.
Setup, Custom Metadata Types, Notification Rule, Manage Records. Five packaged rules (see below). Each has a subscriber editable Active checkbox, so untick to disable a rule org wide. Upgrades will not overwrite your Active choices.
Five default templates are seeded automatically the first time a user opens the Notification Center. They are normal b3s__Notification_Template__c records, editable or deactivated in the UI's Templates tab. Nothing to do at install time unless you want to pre-brand the copy.
b3p) package (always co-installed), a configured b3p__Google_Service_Auth__mdt record with DeveloperName = 'Push' (FCM service account credentials), and candidates who have opened the portal PWA and accepted push. Delivery detail is logged per device in b3p__Push_Message__c.Entry points inside the scheduler:
Live progress (sent, ready, failed, skipped counts from the campaign roll ups), Stop for a running campaign (remaining rows become Skipped), Cancel for drafts, and per row errors on anything that failed.
A free form message (or template) to the workers of selected shifts, for briefings or availability requests. Same review and send pipeline, campaign Source is Manual.
Some package jobs build and send campaigns on a schedule, with no review step: campaign Source is Scheduled and Rule holds the job's key. They use the same channels, send job and Flow contract, so an SMS or WhatsApp Flow you built for the Notification Center also delivers them. The first one is the timesheet approval reminder (see Timesheet approvers and multi-step approval).
| Campaign | Meaning |
|---|---|
| Draft | Being reviewed, nothing sent. |
| Queued / Processing | Send job running. |
| Stopping / Stopped | Stop requested or completed. |
| Sent | All rows dispatched, none failed. |
| Partially Failed / Failed | Some or all rows failed (see rows' Error). |
| Cancelled | Draft discarded. |
| Notification row | Meaning |
|---|---|
| Draft | In review. |
| Queued | Waiting for the send job. |
| Sent | All package handled channels dispatched. |
| Ready | Package processing done, this is your Flow's trigger point for Flow delivered channels. |
| Failed | A channel failed, message in Error, per channel detail in Send Results. |
| Skipped | Removed by the user or campaign stopped. |
b3s__Notification_Channel__mdt)| Field | Meaning |
|---|---|
DeveloperName / Label |
Channel identity, the string stored in Channels__c (matching is case insensitive). |
Sender_Plugin__c |
Apex class implementing b3s.NotificationSenderPlugin. Blank means Flow delivered (rows flip to Ready and your Flow sends). |
Active__c |
Show in the UI. |
Default_On__c |
Pre-ticked in the send dialog (unless the definition sets defaultChannels). |
Order__c |
UI sort. |
Push is special cased by DeveloperName. It is dispatched synchronously by the package through 3B Portals, so leave its plugin blank and do not build Flows against it.
b3s__Notification_Rule__mdt)Active__c (subscriber editable) toggles the rule. JSON__c defines it:
{
"label": "Shift Cancelled",
"plugin": "b3s.ShiftHistoryAlertPlugin",
"template": "shift_cancelled",
"channels": ["Email", "Push"],
"recipientFieldPath": "b3s__Contact__c",
"fieldPaths": [
"b3s__Contact__r.FirstName", "b3s__Contact__r.LastName",
"b3s__Scheduled_Start_Time__c", "b3s__Scheduled_End_Time__c",
"b3s__Work_Site__r.Name", "b3s__Work_Job__r.Name"
],
"config": {
"watch": [ { "field": "b3s__Status__c", "to": "Cancelled", "oldValueEquals": "Confirmed" } ],
"currentStatusEquals": null,
"requireContact": true,
"suppressWhen": [
{ "fieldPath": "b3s__Work_Job__r.b3s__Account__r.Do_Not_Send_Alerts__c", "equals": true }
]
}
}
Engine read keys: label, plugin, template (a template Key), channels (pre-selected when creating a campaign from this rule), recipientFieldPath, fieldPaths (every field the templates or plugin need, client org custom fields and relationship paths are fine). config is passed verbatim to the plugin.
ShiftHistoryAlertPlugin config keys, watch entries (OR'd, all keys within one entry must hold): field (required), to, from, oldValueEquals, toNonNull, fromNonNull, anyChange. Gates: currentStatusEquals (shift's status now), requireContact. suppressWhen: skip the shift when the path equals the value, which is how you implement for example Client, "Do Not Send Confirmation Alerts" (add your custom field's path, and also add it to fieldPaths).
Packaged rules:
| Rule | Fires when | Gates |
|---|---|---|
| Shift Cancelled | Status changes to Cancelled | previous status was Confirmed, has contact |
| Shift Confirmed | Status changes to Confirmed | has contact |
| Shift Reassigned | Contact changed (non-null to different non-null) | status is Confirmed |
| Shift Definition Changed | Work Job, Site or Site Location changed | status Confirmed, has contact |
| Shift Times Changed | Scheduled Start or End changed | status Confirmed, has contact |
To add a client specific rule, create a new CMT record with your own JSON. Reuse b3s.ShiftHistoryAlertPlugin with different watch and config, or name your own plugin class.
Templates are records, editable in the Notification Center's Templates tab. Key is what rule JSON references. Tokens:
| Token | Renders |
|---|---|
{firstName} / {lastName} |
Recipient contact. |
{contact.<fieldPath>} |
Any recipient contact field. |
{countChanges} |
Number of shifts in this message. |
{record.<fieldPath>} |
Shift field, only meaningful inside <repeat>. |
<repeat> … </repeat> |
Block repeated once per shift. |
Example:
Hi {firstName}, you have been confirmed for {countChanges} shift(s):
<repeat>- {record.b3s__Scheduled_Start_Time__c} at {record.b3s__Work_Site__r.Name} as {record.b3s__Work_Job__r.Name}
</repeat>
Languages. A template can have translations as separate rows whose Key is <key>:<language>, for example timesheet_approval_step_1:fr or timesheet_approval_step_1:fr_ca. Features that support languages pick the closest match for the recipient (exact locale, then the language, then the plain key). Today that is the timesheet approval reminder; Notification Center rules use the plain key.
Notes: plain text only, datetimes format in the sending user's timezone, unknown tokens render as empty, every {record.*} path you use must be in the rule's fieldPaths (or the token renders empty), one repeat block per template.
SMS) and leave Sender_Plugin__c blank.ISCHANGED(b3s__Status__c) && ISPICKVAL(b3s__Status__c, "Ready") && CONTAINS(b3s__Channels__c, "SMS")b3s__Contact__c, b3s__Title__c, b3s__Body__c, b3s__Link__c.b3s__Status__c = 'Sent' (or Failed plus b3s__Error__c) and append to b3s__Send_Results__c so the campaign view reflects true delivery.Bulkification note: a 1,000 recipient send updates rows in chunks of 50, so your Flow fires in interview batches. Use bulk safe actions.
b3s.NotificationSenderPlugin)global class WhatsAppSender implements b3s.NotificationSenderPlugin {
global void send(List<b3s__Outbound_Notification__c> rows) {
for (b3s__Outbound_Notification__c row : rows) {
// callout to your gateway with row.b3s__Contact__c / Title / Body / Link
// on failure: row.b3s__Status__c = 'Failed'; row.b3s__Error__c = '...';
}
}
}
Contract:
System.enqueueJob, because the send job needs its single allowed chained enqueue. Throwing marks the chunk's rows Failed but never kills the campaign.Sender_Plugin__c = 'yourns.WhatsAppSender'.b3s.NotificationRulePlugin)global class MyRule implements b3s.NotificationRulePlugin {
global List<b3s.NotificationDraft> evaluate(b3s.NotificationRuleContext ctx) {
List<b3s.NotificationDraft> drafts = new List<b3s.NotificationDraft>();
for (Id shiftId : ctx.changesByShift.keySet()) {
SObject shift = ctx.shiftsById.get(shiftId); // queried with your fieldPaths
b3s.NotificationDraft d = new b3s.NotificationDraft();
d.recipientContactId = (Id) shift.get('b3s__Contact__c');
d.recordIds = new List<Id>{ shiftId };
d.consumedHistoryIds = new List<Id>{ /* the history rows you acted on */ };
drafts.add(d);
}
return drafts;
}
}
Contract:
consumedHistoryIds, because it powers the already notified dedup. ctx.ruleConfig is your rule JSON's config block.shiftsById already respects the scanning user's access."plugin": "yourns.MyRule".callout('b3s.NotificationService', { endp: ... }), authenticated users only: getConfig, getTemplates, scanChanges, previewTemplate, composeCampaign, sendCampaign, stopCampaign. Campaign and row DML honours the running user's CRUD and FLS.
| Symptom | Check |
|---|---|
| No bell or menu item in the scheduler | Definition JSON has the notifications key, and the user has the permission set. |
| Scan finds nothing | Field history tracking active on the watched fields, and only for changes made after enablement. The change window covers the edits. The shifts are in the user's scheduler scope and date window. |
| Everything shows already notified | Expected when re-scanning a window an earlier campaign covered. Widen deliberately only to re-send. |
| Rows stuck in Ready | That is the Flow handoff state. No Flow (or a broken one) is picking up that channel. |
| Rows Failed | Error on the row, per channel JSON in Send Results. Email failures include the SendEmailResult message (check deliverability and daily limits). |
| Push dispatched but nothing received | Check b3p__Push_Message__c for per device FCM results, that the candidate has an active portal push registration, and that the b3p__Google_Service_Auth__mdt Push record is valid. |
| A rule never fires | Rule CMT Active ticked, gates not filtering it, and the watched field actually history tracked. |
| Template token renders empty | Path missing from the rule's fieldPaths, or a typo. Verify with the Preview button. |