Available in **12.5.0 **.
Compliance restrictions control what a scheduler user can do with a shift around its compliance check:
lockWhileChecking are unavailable on the changed shift. The worker's other shifts are not affected. If the user changes the shift anyway (for example moves it), the running check is cancelled and starts again for the new values.These restrictions apply in the scheduler only. They do not stop changes made on the record page, through the API or by Flows. Add a validation rule or Flow in your org if you need that.
A blocking result is any EvaluationResult with isBlocking: true (see Scheduling compliance rules). Its event alert is saved with Is Blocking checked (b3s__Event_Alert_V2__c.b3s__Is_Blocking__c) and severity High. The shift field Blocking Alerts (b3s__Shift__c.b3s__Blocking_Alerts__c, a roll-up summary) counts these alerts, and the scheduler reads it to decide whether a shift is blocked.
If the check cannot run (a rule throws an error, the compliance data fails to load, or the alerts cannot be saved), the scheduler attempts to save a blocking Compliance check failed alert for each affected shift. Once saved, that alert keeps restrictions on until a re-run succeeds: right-click the worker and choose Re-Calculate Compliance, or use Re-run Compliance in the right sidebar. This only happens when complianceRestrictions lists at least one field.
Users with the custom permission Override Compliance Restrictions (Override_Compliance_Restrictions, included in the WFM Admin permission set) are never restricted: every value stays available and every quick action stays visible. The scheduler reads the permission when it loads, so reload the page after granting it. The lockWhileChecking actions still wait for the compliance check.
blockingField to schedulables.shift.eventAlerts, and add a complianceRestrictions key to schedulables.shift:"eventAlerts": {
"objectName": "b3s__Event_Alert_V2__c",
"countFieldPath": "b3s__Event_Penalties__c",
"blockingField": "b3s__Is_Blocking__c"
},
"complianceRestrictions": {
"blockingCountFieldPath": "b3s__Blocking_Alerts__c",
"fields": [
{ "field": "b3s__Status__c", "values": ["Confirmed", "Published"] },
{ "field": "b3s__Pay_Rate__c" }
],
"lockWhileChecking": ["edit", "cancel", "delete", "quickActions"]
}
| Key | Effect |
|---|---|
eventAlerts.blockingField |
Saves the blocking flag on each alert and marks blocking alerts Blocking in the alerts popover. Defaults to b3s__Is_Blocking__c when complianceRestrictions lists fields. |
complianceRestrictions.blockingCountFieldPath |
The shift field that counts blocking alerts. A shift is blocked when it is above 0. |
complianceRestrictions.fields[].field |
A shift field to restrict. |
complianceRestrictions.fields[].values |
The values the user cannot pick while the shift is blocked. Leave it out to disable the whole field. |
complianceRestrictions.lockWhileChecking |
The actions that are unavailable on a shift while its compliance check runs. The names match the contextMenu can* permissions: copy, cut, move (dragging a demand), edit (editor, double-click, bulk edit), cancel, delete, match, quickActions and templates (add to template). Leave it out to lock nothing. Plain shifts can always be dragged. |
The sample providers WFM_Account, WFM_Group, WFM_Job and WFM_Contact (release samples) restrict Status Confirmed, disable Work Job, Work Site and Rate Group, and lock edit, cancel, delete and quick actions while a check runs. Copy, cut, paste and move stay available. The settings live on each provider: a scheduler opened on a Group reads WFM_Group, so a provider without them saves every alert as not blocking.
| Surface | Behaviour on a blocked shift |
|---|---|
| Shift editor | A restricted value is removed from the field's options, and a field listed without values is disabled. Hovering over the field shows why, for example Not available (Confirmed): this shift has blocking compliance alerts. |
| Bulk edit | The same restrictions apply when any selected shift is blocked. |
| Quick actions | An action is hidden when its updateFields set a restricted field to a restricted value. For example, a Confirm action with { "field": "b3s__Status__c", "value": "Confirmed" } is hidden. |
A blocked shift with no penalty alerts shows a red ! badge. Hover over it to see the blocking alerts.
values filters picklist options from the field describe, or the field's own options list. A field whose options come from a loader, or a text or number field, is disabled entirely instead.complianceRestrictions lists no field, leaves the existing alerts in place. With complianceRestrictions configured, a shift that could not be checked gets a blocking Compliance check failed alert instead when the fallback save succeeds.| Symptom | Cause / fix |
|---|---|
| Confirmed is still offered on a shift with blocking alerts | blockingField is missing from the provider the scheduler opened with, for example a Group context reads WFM_Group (Blocking Alerts stays 0), the user cannot read Blocking Alerts, or the shift is already Confirmed. |
| A shift shows a Compliance check failed alert | A rule errored or the compliance data failed to load. Check the browser console, fix the rule, then use Re-Calculate Compliance. |
| A quick action is still shown | Its updateFields value doesn't exactly match a value in values. Matching is case-sensitive. |
If both the alert save and the fallback alert save fail, the Scheduler shows an error and cannot confirm the stored compliance result. Correct the save error and rerun compliance before relying on the blocking count.