Every WFM and VMS app is driven by a single JSON document called the App Definition. It tells the app which Salesforce objects to read, how to query them, how to render each record, which actions a user may take, and how records are styled. Nothing about an app's behaviour is hard-coded to your org: you shape it entirely through this JSON.
Where the JSON lives depends on the app:
| App surface | Custom Metadata type | Field holding the JSON |
|---|---|---|
| Portable apps (Clock, Timesheeting, Client Shift Manager, Vendor Portal, Terminal) | b3s__Component_Configuration__mdt |
b3s__JSON__c |
| Scheduler (internal, per object / sharing group) | b3s__Scheduling_Context_Provider__mdt |
b3s__JSON__c |
Both records use the same JSON grammar described here. A Component Configuration also carries a b3s__Type__c value (for example Clock In / Out Component) that names the app the definition belongs to.
The examples in this article are taken verbatim from the shipped sample definitions. Field API names keep their b3s__ namespace prefix exactly as they appear in your org.
Related references:
type values usable in recordFormFields.loader.apexFilter plugin class.These keys sit at the root of the JSON, alongside schedulables. They configure locale, the calendar frame, and which capabilities the app exposes. Set only the ones your app needs; unknown keys are ignored.
{
"timezonePreference": "client",
"defaultLanguage": "en-GB",
"availableLanguages": ["en-GB", "es-ES"],
"firstDay": 0,
"is24Hour": true,
"syncTimeout": 10000,
"canAddBreaks": true,
"canAddExpenses": true,
"canSeeExpenses": true,
"canSearchShifts": true,
"canAddShifts": true,
"canAddAvailability": true,
"isGPSRequired": true,
"canClockInOut": true,
"canStartAdhocShifts": true,
"currentShiftSearchRange": 120,
"navMenuItems": [
{
"label": "Timesheets",
"translationKey": "menuTimesheets",
"href": "#Timesheet_Submission?contactId=:userId"
},
{
"label": "Documents",
"href": "#Compliance"
}
],
"schedulables": {}
}
| Key | Type | Purpose |
|---|---|---|
timezonePreference |
"user" | "client" |
Which timezone stored UTC datetimes render in when a record has no site timezone of its own. "user" uses the viewing user's timezone; "client" (also written "local") uses the app / site timezone. See Timezoning. |
defaultLanguage |
string | Locale used when the user has no matching preference, for example "en-GB". |
availableLanguages |
string array | Locales the app offers in its language switcher. Each locale must have matching translation metadata. |
firstDay |
number | First day of the calendar week. 0 = Sunday, 1 = Monday. |
defaultView |
"daily" | "weekly" | "monthly" |
Timesheet Submission and Timesheet Approval: the period the date navigation opens on. Blank = "weekly". |
is24Hour |
boolean | Render times in 24-hour (true) or 12-hour (false) format. |
syncTimeout |
number | Interval between background refreshes that pull other users' changes. The unit is per app, see each app article. The Scheduler reads seconds (default 15). |
currentShiftSearchRange |
number | Minutes either side of "now" used to detect the shift a worker is currently on. |
navMenuItems |
array | Extra items in the app's navigation menu. Each has label, optional translationKey, and an href (which may embed merge tags such as :userId). |
notifications |
boolean | (Scheduler) Enables the bulk notification centre. |
disablePooling |
boolean | (Scheduler) Turns off live sync of other users' changes. See Scheduler saving and live sync. |
disableEventSaveRefresh |
boolean | (Scheduler) Skips re-reading saved records after a calendar save. |
slotMinWidth |
number | (Scheduler) Minimum pixel width of a calendar time slot. |
lists |
object | (Client Shift Manager, Vendor Portal) Server-paged lists, keyed by list name: requests drives the CSM Requests tab, invites the Vendor Portal Invites tab. Each declares pageSize, sources (schedulable, base clause set, sort field paths, search fields), scopes (clauses per source, sort, optional period) and related loaders. Leave it out to keep client-side paging. See Data loaders, server-paged lists. |
vmsWorkflowMode |
"autonomous" | "mediated" |
(Client Shift Manager) VMS routing mode. Its presence, with any value, also makes access profiles mandatory for the app (as does a proposal schedulable). See VMS access profiles. |
Removed keys. userApproverFieldPath and userRequiresApprovalFieldPath (Client Shift Manager) are no longer read. Requisition approval comes from the User Profile checkboxes Approve_Requisitions__c and Requires_Requisition_Approval__c. Delete the keys from existing definitions.
Feature toggles. The can… and is… keys switch whole capabilities on or off for the app as a whole. They are plain booleans:
| Toggle | Enables |
|---|---|
canAddBreaks |
Adding break records to a shift. |
canAddExpenses / canSeeExpenses |
Creating / viewing expense records. |
canSearchShifts |
The self-service shift marketplace search. |
canAddShifts |
Creating ad-hoc shifts. |
canAddAvailability |
Submitting availability / unavailability. |
canClockInOut |
Clock in / out actions. |
canStartAdhocShifts |
Starting a shift not scheduled in advance. |
isGPSRequired |
Requiring a location fix for clock actions. |
These app-wide toggles are separate from the per-record permissions described in section 7, which are evaluated against each record.
schedulables: the coreschedulables is the heart of the definition. It is an object whose keys are logical roles the app understands, and whose values map each role to a Salesforce object and describe how to work with it.
"schedulables": {
"shift": { "objectType": "b3s__Shift__c", "...": "..." },
"break": { "objectType": "b3s__Break__c" },
"task": { "objectType": "b3s__Shift_Task__c" },
"expense": { "objectType": "b3s__Expense__c", "...": "..." },
"request": { "objectType": "b3s__Employee_Request__c","...": "..." },
"invitation": { "objectType": "b3s__Invitation__c", "...": "..." },
"geoTag": { "objectType": "b3s__Geo_Tag__c", "...": "..." },
"placement": { "objectType": "b3s__Working_Pattern__c", "...": "..." }
}
The role name (shift, break, invitation, and so on) tells the app what part the object plays; objectType tells it which object in your org fills that part. This is what lets the same app run against differently named objects in different orgs: only objectType and the field paths change.
To add or repoint a schedulable, add its key with at least an objectType, then supply the field paths and behaviour keys it needs. A minimal entry is just { "objectType": "b3s__Break__c" }; the object is then available to the app but has no independent query or rendering.
Some roles belong to one app only and are documented with their feature. For example the Vendor Portal's onboardingTemplate and workerOnboarding roles (with the onboardingTemplates and workerOnboardings loaders) drive guided worker onboarding; see Worker onboarding templates.
Vendor Portal schedulables.invite.bookingStartFieldPath (for example b3s__Booking_Request__r.b3s__Start__c) turns on the View schedule button of booking request invites, a read-only preview of the request's working pattern. It reads bookingRequestFieldPath and bookingEndFieldPath from the same schedulable and the shift schedulable's startFieldPath, endFieldPath, siteTimezoneFieldPath, rateBasis.field and shiftBulkViewTitle for the previewed shifts. The Client Shift Manager wizard Preview step reads bookingRequest.startFieldPath / endFieldPath and the same shift keys. See View schedule on booking invites and Custom schedule.
In Vendor Portal, schedulables.worker.templateRequired requires at least one template on the onboarding template step whenever the vendor has templates. schedulables.worker.photoRequired requires a saved, displayable photo on the Photo step. Both default to false. Existing Files and migrated Attachments qualify as photos. Worker onboarding templates and Worker photos
In Client Shift Manager, schedulables.ticket.reviewFields takes a title-style field list for a proposal's attached credentials. Include those fields in the vmsTickets loader. Configure proposal credential fields
Most keys are field paths - dot-separated relationship paths rooted on the schedulable's object (b3s__Work_Site__r.b3s__Timezone__c). This is how the app locates a value without knowing your field names in advance.
| Key | Type | Purpose |
|---|---|---|
objectType |
API name | The Salesforce object this role maps to. Required. |
startFieldPath / endFieldPath |
field path | The record's start and end datetime, used for placing it on the timeline and for the date-window query. |
absoluteStartFieldPath / absoluteEndFieldPath |
field path | An "absolute" (timezone-anchored) start/end used when the record must sort or window independently of display timezone. |
scheduledStartFieldPath / scheduledEndFieldPath |
field path | The planned start/end of a shift. |
actualStartFieldPath / actualEndFieldPath |
field path | The clocked start/end of a shift. |
isFieldPathDateType |
boolean | Set true when the start/end paths are Date fields rather than Datetime, so the date-window query treats them correctly. |
siteTimezoneFieldPath |
field path | Where to read the record's own timezone from (for example b3s__Work_Site__r.b3s__Timezone__c). Overrides timezonePreference for that record. |
contactFieldPath |
field path | The lookup to the person the record belongs to. |
typeFieldPath |
field path | A category/type field, used by matchers and decorations. |
statusFieldPath |
field path | The status field, used by conditions, matchers and quick actions. |
shiftFieldPath |
field path | The lookup back to the parent shift (on breaks, tasks, geo tags, invitations). |
additionalFields |
array | Extra fields to include in the query so they are available to titles, filters and conditions. Accepts either { "field": "…" } objects or bare strings. Scheduler only: { "field": "…", "readOnly": true } loads and shows the field but never sends it back on save (use it for engine-stamped values such as b3s__Total_Pay__c, so a stale snapshot never overwrites the engine). |
lookBackLimitDays / lookForwardLimitDays |
number | Hard limits on how far back / forward the app will load records for this role. |
lookBackExtendDays / lookForwardExtendDays |
number | (Scheduler) Days added to the visible window so records overlapping the edges are still loaded. |
dateFilterMode |
"overlap" |
Loads any record whose window overlaps the requested range, not only those that start inside it. |
useListView |
boolean | Whether the role is presented as a list rather than a calendar. |
oneOffPatternFieldPath |
field path | (Client Shift Manager bookingRequest) Path from the request to its pattern type's One Off flag, for example b3s__Working_Pattern_Type__r.b3s__One_Off__c. When it reads true the request has a custom schedule: the edit form drops the field named by patternTypeFieldPath and the Request Detail modal offers Edit schedule. Never hide the Pattern Type field with showIf instead: hidden fields are saved blank. See Client Shift Manager. |
timeEntryMode / rateBasis |
"times" | "rateBasis" / object |
(shift: bulk creator; bookingRequest: Client Shift Manager custom schedule step) rateBasis mode asks for a Rate Basis per day; rateBasis ({ field, loader, jobField, accountField, jobLoader }) names the field and template loader. On the shift schedulable rateBasis.field is also where the booking schedule preview writes each day's value (Client Shift Manager and Vendor Portal). See Rate basis templates and Custom booking schedules. |
accountFieldPaths |
field path array | (Client Shift Manager, Vendor Portal, Timesheet Approval) Paths from the record to the account or accounts it belongs to, for example ["b3s__Work_Job__r.b3s__Account__c", "b3s__Work_Site__r.b3s__Account__c"]. The apps check access profile permissions against these accounts. The paths are queried automatically. On the requirement schedulable the key keeps its older map shape ({ "shift": [...], "bookingRequest": [...] }) used by credential auto resolution. See VMS access profiles. |
Example - the expense role mapping to b3s__Expense__c with Date-typed windowing:
"expense": {
"objectType": "b3s__Expense__c",
"startFieldPath": "b3s__Date_of_Expense__c",
"endFieldPath": "b3s__Date_of_Expense__c",
"isFieldPathDateType": true,
"contactFieldPath": "b3s__Contact__c",
"selectionClause": [
"b3s__Contact__c = :contactUserId AND b3s__Contact__c != null"
]
}
Example - the shift role with a full set of time paths and limits:
"shift": {
"objectType": "b3s__Shift__c",
"startFieldPath": "b3s__Scheduled_Start_Time__c",
"endFieldPath": "b3s__Scheduled_End_Time__c",
"scheduledStartFieldPath": "b3s__Scheduled_Start_Time__c",
"scheduledEndFieldPath": "b3s__Scheduled_End_Time__c",
"actualStartFieldPath": "b3s__Actual_Start_Time__c",
"actualEndFieldPath": "b3s__Actual_End_Time__c",
"absoluteStartFieldPath": "b3s__Absolute_Start_Time__c",
"absoluteEndFieldPath": "b3s__Absolute_End_Time__c",
"siteTimezoneFieldPath": "b3s__Work_Site__r.b3s__Timezone__c",
"contactFieldPath": "b3s__Contact__c",
"lookBackLimitDays": 14,
"lookForwardLimitDays": 14
}
selectionClause and matchSelectionClauseselectionClause is the query filter for a schedulable. You write it as a SOQL WHERE fragment (or an array of fragments), and the server runs it - the app never builds queries on the client. When you supply an array, the fragments are combined and each contributes rows; use this to express alternatives that a single clause cannot.
"selectionClause": [
"b3s__Contact__c = :contactUserId"
]
"selectionClause": [
"b3s__Work_Job__r.b3s__Account__c =:contextId OR b3s__Work_Site__r.b3s__Account__c =:contextId",
"b3s__Contact__c IN (SELECT b3s__Contact__c FROM b3s__Working_Pattern__c WHERE Id != null AND (b3s__Job__r.b3s__Account__c =:contextId OR b3s__Site__r.b3s__Account__c =:contextId))"
]
matchSelectionClause is a second, independent clause set used when the app is matching - finding candidate records rather than the user's own. For example, the shift marketplace search runs matchSelectionClause to find open shifts a worker could claim:
"matchSelectionClause": [
"Id NOT IN (SELECT b3s__Shift__c FROM b3s__Invitation__c WHERE b3s__Contact__c = :contactUserId) AND b3s__Contact__c = null AND b3s__Status__c = 'Confirmed'"
]
requestSelectionClause is a third clause set. On the Client Shift Manager shift schedulable the VMS tabs use it to select the client's shift requests independently of the calendar week (see Client Shift Manager). A server-paged list source names it with clauseField: "requestSelectionClause" as its base filter: the sample sets it on the CSM shift and bookingRequest schedulables and on the Vendor Portal invite schedulable. The schedulable's apexFilter applies to it as it does to selectionClause.
"bookingRequest": {
"requestSelectionClause": ["(b3s__Job__r.b3s__Account__c IN :accountIds OR b3s__Site__r.b3s__Account__c IN :accountIds) AND b3s__VMS__c = true"]
},
"invite": {
"requestSelectionClause": ["b3s__Vendor_Account__c IN :accountIds AND (b3s__Available_From__c = null OR b3s__Available_From__c <= :now)"]
}
Merge tags are placeholders that the server resolves and safely binds or escapes before the query runs. You never quote or format them yourself, and no client-supplied value is ever concatenated raw - this keeps the queries injection-safe.
| Tag | Resolves to |
|---|---|
:contextId |
The Id of the record the app is opened against (for the scheduler, the account/context record). |
:contactUserId |
The Id of the Contact the running user maps to. |
:userId |
The running user's Id. |
:contextUser.<path> |
A field on the running user, for example :contextUser.AccountId. |
:accountIds |
A quoted list of every account the contact acts for, for use with IN. For a contact without an access profile it is their own Account; for a governed contact, their Account Membership accounts. Narrowed to the accounts picked in the app's account selector, when one is shown. |
:accountIds(<checkbox>) |
The same list, limited to accounts whose User Profile ticks that checkbox, for example :accountIds(b3s__Tab_Costs__c). An unknown checkbox name fails the query. Account tokens are merged before :contextUser. and :contextRecord.. |
:contextRecord.<path> |
A field on the context record, resolved server-side and escaped by type. |
:contextStart |
The start of the currently requested date window (a datetime literal). |
:contextEnd |
The end of the currently requested date window. |
:contextDate |
The currently focused date. |
:now |
The server time of the request (a GMT datetime literal). Datetime fields only; use TODAY / LAST_N_DAYS:n on Date fields. Accepts a day offset: :now-90d, :now+7d. |
When a tag cannot be resolved it becomes an empty-string literal rather than null, so a clause never accidentally becomes = null. An empty :accountIds list becomes a list holding one impossible Id, so the clause matches nothing.
"selectionClause": [
"b3s__Work_Job__r.b3s__Account__c IN :accountIds(b3s__Tab_Requests__c) OR b3s__Work_Site__r.b3s__Account__c IN :accountIds(b3s__Tab_Requests__c)"
]
Day-offset form. :contextStart and :contextEnd accept a day offset so you can widen or shift the window edge inside the clause. The offset is applied as whole days and emitted as a datetime literal:
"selectionClause": [
"b3s__Start__c >= :contextStart-7d AND b3s__End__c <= :contextEnd+14d"
]
:contextStart-7d is the window start moved back seven days; :contextEnd+14d is the window end moved forward fourteen days.
Date form. :contextStartDate and :contextEndDate emit the window edges as SOQL dates (GMT), for comparing Date fields:
"b3s__Start__c <= :contextEndDate AND (b3s__End__c = null OR b3s__End__c >= :contextStartDate)"
apexFilter and matchApexFilterSome filters cannot be written as a single SOQL clause - typically multi-level semi-joins such as "shifts whose job's account is in the same sharing group as the context account". For these, point the schedulable (or loader) at a named Apex class instead:
"shift": {
"objectType": "b3s__Shift__c",
"apexFilter": "b3s.GroupShiftLoader"
}
{
"name": "vendors",
"objectName": "b3s__VMS_Sharing_Group_Assignment__c",
"apexFilter": "b3s.VmsVendorPoolFilter"
}
The named class computes a set of record Ids server-side; that set is then ANDed into the query as an Id IN (…) bind, so there is no query-length limit and the plugin can even stand alone with no selectionClause at all. matchApexFilter is the matching-mode counterpart, applied when matchSelectionClause would run.
The class name is supplied by an admin through Custom Metadata, and the same value works whether or not your org uses a namespace: a namespaced name such as b3s.GroupShiftLoader falls back to the local name in an un-namespaced org, and a bare name falls back to your org's default namespace, so orgs can ship their own plugins.
The plugin receives a context with these keys:
| Context key | Value |
|---|---|
contextId |
The Id of the context record. |
contactId |
The Contact the running user maps to. |
contextStart / contextEnd |
The requested window as datetimes. |
contextDate |
The focused date as a string. |
accountIds |
The accounts the contact acts for (the :accountIds set, narrowed by the account selector). |
See Apex filters for how to build one.
background, topBorder and other value mapsA matcher styles a record by mapping one field's value to a literal. It is used by background, topBorder, and any decoration colour. The structure is always the same: a match with a field, an equals map of value → { "literal": … }, and an otherwise fallback.
"background": {
"match": {
"field": "b3s__Type__c",
"equals": {
"Unavailable": { "literal": "bg-[#fdf2f8] text-red-600 hover:bg-[%fce7f3]" },
"Flexible Schedule": { "literal": "bg-[#f3f4f6] hover:bg-[%e5e7eb]" },
"Available": { "literal": "bg-[#d9ffda] text-green-600 hover:bg-[%dbeafe]" }
},
"otherwise": { "literal": "bg-[#fdf2f8] text-red-600 hover:bg-[%fce7f3]" }
}
}
"topBorder": {
"match": {
"field": "b3s__Status__c",
"equals": {
"New": { "literal": "border-t-amber-600 border-t-4 border-t-solid" },
"Cancelled": { "literal": "border-t-red-500 border-t-4 border-t-solid" },
"Confirmed": { "literal": "border-t-green-500 border-t-4 border-t-solid" }
},
"otherwise": { "literal": "" }
}
}
| Key | Meaning |
|---|---|
match.field |
The field whose value drives the styling. |
match.equals |
A map of exact field value → { "literal": … }. The literal is a utility class string applied when the value matches. |
match.otherwise |
The { "literal": … } used when no equals entry matches. Use { "literal": "" } for no styling. |
The literals are utility class strings applied to the rendered record; you can use any classes your styling supports.
A condition is a reusable boolean test evaluated against a single record. Conditions power almost every dynamic behaviour in the definition: canEdit, canDelete, canAccept, showIf, disabled, visibleIf, showOptionIf, decoration condition, and more. The shape is always:
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "b3s__Type__c", "operator": "equals", "value": "Unavailable" }
]
}
| Key | Meaning |
|---|---|
allOrSome |
"all" = every selector must pass (logical AND). "some" = at least one must pass (logical OR). |
selectors |
The list of individual tests. |
Each selector compares a field to a value, or to another field:
| Selector key | Meaning |
|---|---|
field |
The field path being tested. |
operator |
Case-insensitive: equals, notEquals, isNull, in / notIn (value is a list), lessThan, greaterThan, lessOrEqual, greaterOrEqual (numeric: blank and non-numbers count as 0), contains / startsWith (case-insensitive text; a blank side never matches). equals is strict: 2 does not equal "2", true does not equal "true". |
value |
The comparison value. For isnull, use true (field must be empty) or false (field must be populated). |
targetField |
Instead of value, compare field to the value of another field on the same record. In showOptionIf, targetField reads from the option's record instead. |
fieldLoader / fieldLoaderField |
Resolve the left-hand value through a loader instead of the record itself. field must hold a record Id; the app finds that record in the named loader and reads fieldLoaderField off it. Use this to reach relationship fields the in-memory record does not carry, such as the selected job's account. Both keys are required together, and the loader must list fieldLoaderField in its fieldToLoad. |
Server-side (rate cards). Rate card sheet, line and modifier conditions use the same grammar, evaluated server side against the Shift (paths allow up to 5 relationship hops, written with or without b3s__; $ fields read engine runtime values such as $dayType, $localStartTime). Differences from the client: a blank condition, {} or an empty selector list is true; a malformed condition is an error rather than false; fieldLoader is not supported; Date / Datetime / Time fields accept ISO literals ("2026-03-02", "2026-03-02T09:00:00Z", "09:30") or epoch millis, and a blank side in such a comparison is false; two ISO-shaped strings (e.g. $localStartTime vs "20:00") compare as text for the ordering operators.
Example - allow editing only when the record is unapproved, rejected, or queried (any one of three):
"canEdit": {
"condition": {
"allOrSome": "some",
"selectors": [
{ "field": "b3s__Approval_Status__c", "operator": "isnull", "value": true },
{ "field": "b3s__Approval_Status__c", "operator": "equals", "value": "Rejected" },
{ "field": "b3s__Approval_Status__c", "operator": "equals", "value": "Queried" }
]
}
}
Example - a field-to-field comparison using targetField, used to only offer placements whose contact and job match the shift:
"showOptionIf": {
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "b3s__Contact__c", "operator": "equals", "targetField": "b3s__Contact__c" },
{ "field": "b3s__Work_Job__c", "operator": "equals", "targetField": "b3s__Job__c" }
]
}
}
Example - a loader-resolved comparison using fieldLoader, used to only offer sites belonging to the same account as the selected job. The shift record only carries the job Id, so the job's account is looked up in the jobs loader (whose fieldToLoad must include b3s__Account__c, as must the sites loader feeding the options):
"showOptionIf": {
"condition": {
"allOrSome": "all",
"selectors": [
{
"field": "b3s__Work_Job__c",
"fieldLoader": "jobs",
"fieldLoaderField": "b3s__Account__c",
"operator": "equals",
"targetField": "b3s__Account__c"
}
]
}
}
Note that while a job is unselected the resolved value is null, so no options pass the equals test - the site list stays empty until a job is chosen.
Runtime keys. A selector field that starts with $ reads a runtime value the app places on the form record, not a Salesforce field. Such paths are never queried and never saved. The Client Shift Manager request wizard sets $accountId to the account chosen on its Account step; the shipped Job and Site selects only offer that account's options, and every option when no account was chosen:
"showOptionIf": {
"condition": {
"allOrSome": "some",
"selectors": [
{ "field": "$accountId", "operator": "isnull", "value": true },
{ "field": "$accountId", "operator": "equals", "targetField": "b3s__Account__c" }
]
}
}
The same wizard sets $customSchedule to true while a booking request is ordered with a custom schedule. The shipped booking request Rate Basis select hides itself with it, so the request level value stays blank and each schedule day's Rate Basis reaches the generated shifts:
"showIf": {
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "$customSchedule", "operator": "notEquals", "value": true },
{ "field": "b3s__Working_Pattern_Type__r.b3s__One_Off__c", "operator": "notEquals", "value": true }
]
}
}
Permissions decide whether an action is offered on a given record. They appear at the schedulable level (canEdit, canCreate, canDelete, canAccept, canReject, canReschedule, canStartShift, canFinishShift) and, in the same shape, at the field level (disabled, required, hidden, showIf).
Each accepts one of three forms:
A boolean - always or never allowed.
"canDelete": false,
"canStartShift": true
null - unset; the app uses its default for that action.
"canEdit": null,
"canReschedule": null
A condition object - allowed only when the condition passes.
"canFinishShift": {
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "Id", "operator": "isnull", "value": false }
]
}
}
The three forms behave identically in every app, including the scheduler contextMenu flags (canEdit, canDelete, canCopy, canCut, canCancel, canMatch), invitation flags (canAssign, canSelect, canCancelInvite, canAssignInvite), timesheet canApprove / canReject / canSubmitForApproval, and the default-off flags isReadOnly / isCancelled (unset = false). An unset can* permission means allowed; with no record loaded, every permission is false.
The same three forms drive field-level behaviour inside recordFormFields. Here a field is disabled unless the shift is still New, and only shown when the status is Cancelled:
{
"field": "b3s__Internal_Comments__c",
"type": "field-signature",
"disabled": {
"condition": {
"allOrSome": "some",
"selectors": [
{ "field": "b3s__Status__c", "operator": "notequals", "value": "New" }
]
}
}
},
{
"field": "b3s__Cancellation_Reason__c",
"type": "field-select",
"showIf": {
"condition": {
"allOrSome": "some",
"selectors": [
{ "field": "b3s__Status__c", "operator": "equals", "value": "Cancelled" }
]
}
}
}
For the complete list of field type values and their props, see the record form field reference.
title and openShiftTitle: rendering a recordA title is an array of parts. Each part reads one field and renders it as a labelled line. The app concatenates the parts to build the record's display. openShiftTitle is the same structure used specifically for unassigned ("open") shifts.
"title": [
{
"label": "Scheduled Times",
"fieldPath": "b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c",
"formatter": "startEnd",
"siteTimezoneFieldPath": "b3s__Work_Site__r.b3s__Timezone__c",
"hideIfNull": false
},
{
"label": "Job",
"fieldPath": "b3s__Work_Job__r.Name",
"hideIfNull": true
},
{
"label": "Date Invited",
"fieldPath": "CreatedDate",
"formatter": "dateTime",
"hideIfNull": false
}
]
| Part key | Meaning |
|---|---|
label |
The caption shown before the value. Leave empty ("") for no caption. |
fieldPath |
The field to read. A composite start:end form (two paths joined with :) supplies both ends to the range formatters. |
formatter |
How to render the value (see below). Omit for a plain field value. |
hideIfNull |
When true, the whole part is dropped if the value is empty. |
translationKey |
Translation key for the label. |
siteTimezoneFieldPath |
The record's timezone source for this part, overriding the app default. |
currencyFieldPath |
ISO currency code source for the currency formatter (for example b3s__Currency__c). |
| Formatter | Renders |
|---|---|
string |
The raw text value. |
date |
A date. |
dateTime |
A date and time. |
time |
A time only. |
startEnd |
A start–end time range. Use with the composite start:end fieldPath. |
startEndWithDate |
A start–end range that also shows the date. |
currency |
Money in the record's currency (currencyFieldPath, for example £123.46). Without a code it shows a plain 2-decimal number. |
startEndDate |
A date range on one line (1/2/2026 – 3/4/2026) for two Date fields. A blank side is dropped; equal dates show once. Use with the composite start:end fieldPath. |
Composite range example, using the start:end field path:
{
"label": "Shift Times With Date",
"fieldPath": "b3s__Shift__r.b3s__Scheduled_Start_Time__c:b3s__Shift__r.b3s__Scheduled_End_Time__c",
"formatter": "startEndWithDate",
"siteTimezoneFieldPath": "b3s__Shift__r.b3s__Work_Site__r.b3s__Timezone__c",
"hideIfNull": false
}
Datetimes are stored in UTC and rendered in a resolved display timezone. The rule for each title part:
siteTimezoneFieldPath, the value from that field wins.timezonePreference (user = the viewer's timezone, client/local = the app/site timezone).Always set siteTimezoneFieldPath on time parts of records that carry their own site timezone, so a worker in one timezone sees a shift in the site's local time.
A title part can render a child collection instead of a field, by declaring a type and the child relationship. This is how a shift's breaks, tasks and alerts appear inside its title. Each child gets its own nested title array.
{
"label": "Breaks",
"type": "break",
"childObjectName": "b3s__Break__c",
"childField": "b3s__Shift__c",
"parentFieldPath": "Id",
"title": [
{
"label": "Break Times",
"fieldPath": "b3s__Start__c:b3s__End__c",
"formatter": "startEnd",
"siteTimezoneFieldPath": "b3s__Shift__r.b3s__Work_Site__r.b3s__Timezone__c",
"hideIfNull": false
}
]
}
| Child part key | Meaning |
|---|---|
type |
The child role: break, task, alerts. |
childObjectName |
The child object API name. |
childField |
The child's lookup back to the parent. |
parentFieldPath |
The parent field the child's lookup matches (usually Id). |
title |
The nested title array rendering each child record. |
decorations: badges and iconsdecorations is an array of badges that appear on a record when a condition matches. Each decoration carries an inline icon and a title.
"decorations": [
{
"name": "shift-clocked-in",
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "b3s__Actual_Start_Time__c", "operator": "isnull", "value": false }
]
},
"icon": {
"svg": "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' ...></svg>"
},
"title": { "literal": "Shift Started" }
}
]
| Key | Meaning |
|---|---|
name |
A stable identifier for the decoration. |
condition |
When to show it. |
icon.svg |
The inline icon markup. |
title.literal |
The badge tooltip / label text. |
quickActions: one-tap record updatesA quick action is a one-tap button that updates a record and shows a result message. Each action is visible only when its visibleIf condition passes, and on tap writes the fields listed in updateFields.
"quickActions": [
{
"label": "Accept",
"icon": "<svg xmlns='http://www.w3.org/2000/svg' ...></svg>",
"successMessage": "Shift accepted",
"errorMessage": "Failed to accept shift. Error: {0}",
"confirmationMessage": "Are you sure?",
"visibleIf": {
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "b3s__Status__c", "operator": "notequals", "value": "Accepted" }
]
}
},
"updateFields": [
{ "field": "b3s__Status__c", "value": "Accepted" }
]
}
]
| Key | Meaning |
|---|---|
label |
Button caption. |
icon |
Inline icon markup. |
successMessage |
Toast on success. |
errorMessage |
Toast on failure. {0} is replaced with the error detail. |
confirmationMessage |
Optional confirmation prompt shown before running. |
visibleIf |
Condition controlling whether the button appears. |
updateFields |
List of { field, value } writes applied to the record. |
filters: per-schedulable filter chipsfilters defines the filter chips a user can apply to a schedulable's records. Two chip types exist: select (a fixed option list) and reference (a lookup driven by the records already loaded).
Select chip - a fixed value list read from one field:
"filters": [
{
"label": "Category",
"translationKey": "filterCategory",
"type": "select",
"value": {
"valueField": "b3s__Category__c",
"options": [
{ "label": "Accommodation", "value": "Accommodation" },
{ "label": "Meals", "value": "Meals" },
{ "label": "Travel", "value": "Travel" }
]
}
}
]
Reference chip - options derived from a related record's Id and name:
"filters": [
{
"label": "Job",
"type": "reference",
"value": {
"labelField": "b3s__Shift__r.b3s__Work_Job__r.Name",
"valueField": "b3s__Shift__r.b3s__Work_Job__c"
}
}
]
| Key | Meaning |
|---|---|
label / translationKey |
Chip caption and its translation key. |
type |
select or reference. |
value.valueField |
The field the filter matches on. |
value.labelField |
(reference) The field shown as each option's label. |
value.options |
(select) The fixed list of { label, value } options. |
Filter fields load server side: every labelField and valueField is added to the query of the schedulable or loader that feeds the list, so a filter works even when its fields are not in the card title. A path that does not exist on the object now fails the load with a SOQL error, so check new filters on a sandbox first.
loader references in form fieldsInside recordFormFields, a field-select can source its options from a loader - a named, reusable data source defined separately in Custom Metadata - instead of a static option list. Reference it by name with loader, and tell the field which field to display:
{
"field": "b3s__Work_Job__c",
"labelOverride": "Job",
"type": "field-select",
"loader": "jobs",
"optionLabelField": "Name",
"optionExtendedDetails": [
{ "label": "Account", "targetField": "b3s__Account__r.Name" },
{ "label": "Position", "targetField": "b3s__Job_Group__r.Name" }
],
"showOptionIf": {
"condition": {
"allOrSome": "all",
"selectors": [
{
"field": "b3s__Contact__c",
"operator": "equals",
"targetField": "b3s__Contact__c"
},
{
"field": "b3s__Work_Job__c",
"operator": "equals",
"targetField": "b3s__Job__c"
}
]
}
}
}
| Key | Meaning |
|---|---|
loader |
The loader name providing the options. |
optionLabelField |
The field shown as each option's label. |
optionValueField |
The field stored as the value (default Id), for example Name for a text field. |
optionExtendedDetails |
Extra { label, targetField } lines shown under each option. |
showOptionIf |
A condition (evaluated per option) that filters which options appear. |
Loaders are documented fully in the loaders reference.
Form fields can be pre-filled from the current context using the same merge tags as selection clauses. Use default for single-value fields, and valueStart / valueEnd for a time-range field.
{
"field": "b3s__Shift__c",
"type": "field-text",
"default": ":contextId",
"hidden": true
}
{
"field": "b3s__Date_of_Expense__c",
"type": "field-date-input",
"default": ":contextDate"
}
{
"field": "b3s__Start__c:b3s__End__c",
"type": "field-time-range-selector",
"valueStart": ":contextStart",
"valueEnd": ":contextEnd"
}
| Tag | Pre-fills with |
|---|---|
:contextId |
The context record's Id (for example the parent shift). |
:userId |
The running user's Id. |
:contactUserId |
The Contact the running user maps to. |
:contextDate |
The focused date. |
:contextStart / :contextEnd |
The current window start / end, typically into valueStart / valueEnd. |
Combined with a repeat-enabled range field (enableRepeatPattern: true), these defaults let a user create a record already anchored to the date and time they are looking at. See the record form field reference for the field types that consume these keys.
A single schedulable typically combines most of these blocks: field paths and a selectionClause to load the right records, title / openShiftTitle to render them, background / topBorder / decorations to style them, canEdit / canDelete and friends to gate actions, quickActions for one-tap updates, filters for the chip bar, and recordFormFields (with loader references and merge-tag defaults) for create and edit. Start from a shipped sample, change objectType and the field paths to your org's schema, and layer behaviour on from there.
When an app starts, it parses every admin-authored JSON value it receives: the app definition (b3s__JSON__c on the Component Configuration or Scheduling Context Provider), each App Translation, and each matching rule's b3s__Configuration__c. A syntax error names the record and the exact position:
Invalid JSON in definition [Clock In / Out Component] at line 3, column 16: unexpected "}" near: ck", "loaders": [ ⟶} }
| Part | Meaning |
|---|---|
definition [<type>] or definition [<type> / <group>] |
The app definition for that Component Configuration type, or the Scheduling Context Provider for that sharing group. |
translation [<type> / <language>] |
An App Translation record. A broken translation does not stop the app; it falls back to English and logs the error in the browser console. |
matching rule [<DeveloperName>] |
A Scheduling Compliance Rule's configuration. Shown as a toast when the matching panel opens. |
line, column |
Position of the first invalid character, counted in the raw field value. |
⟶ |
Marks that character inside the surrounding text. |
unexpected end of text |
The value stops early, usually a missing } or ], or a value cut off at the field's length limit. |
Common causes: a trailing comma before } or ], single quotes instead of double quotes, comments, and HTML-escaped quotes (") introduced by copying the value through a rich text editor. Paste the field value into any JSON validator to confirm the fix before saving it back.
Loader JSON (b3s__Loaders__c and legacy loader records) is parsed on the server instead and fails with the Malformed b3s__Loaders__c or Parsing loader [...] messages described in the loaders guide.