Shift templates let scheduling users capture a set of shifts as a reusable pattern (for example "Mon-Fri 7-14, at Acme Ltd") and later re-create that pattern starting from any date on the calendar. Templates capture the job, site, location, times and other configured fields - never the person. They are stored per scheduling context, so templates created while scheduling Acme Ltd are only offered when that same context is loaded.
Rules that apply when capturing:
templateRetentionFields are captured (see configuration below). The worker is never captured.The pattern is stored relative to its earliest day. A Monday-to-Friday selection becomes day offsets 0 to 4; the actual calendar dates are discarded. Times are stored as wall-clock values in each shift's site timezone, so a 07:00 start stays a 07:00 start when the pattern is inserted across a daylight-saving change.
The first day of the pattern lands on the clicked date; the remaining shifts follow their stored day offsets. The shifts are created through the scheduler's normal save pipeline, so they appear immediately and show a save error on the tile if the server rejects them.
Rules that apply when inserting:
Templates → Manage Templates (also available from the template icon in the scheduler's right sidebar) lists the current context's templates with their pattern previews. Users can rename and delete templates there, subject to their Edit and Delete permissions on the Scheduling Template object.
If a record referenced by a template (for example a Site or Job) has been deleted since capture, inserting the template fails with a save error on the created tiles. Decide whether to correct the data or delete the template from the manager.
Templates are rows of the packaged custom object Scheduling Template (b3s__Scheduling_Template__c):
| Field | Purpose |
|---|---|
Name |
The template name users search by |
b3s__Template_Data__c |
Long text area (131,072 chars) holding the pattern as JSON. Managed by the scheduler UI - do not hand-edit |
b3s__Context_Id__c |
The scheduler context record Id the template was created under |
b3s__Definition_Key__c |
The scheduler definition key the template was created under |
Both context fields are used when listing templates, which is what scopes templates to the loaded context (a specific Account, Group, Site and so on). All access is enforced with the running user's CRUD permissions - grant the object and its fields on a permission set (the packaged WFM Admin permission set includes full access). Users without Read access on the object simply never see the Templates menu.
Templates are enabled per scheduling definition by adding a templateRetentionFields array to the shift schedulable in the Scheduling Context Provider JSON. Without it, no Templates menu appears. The default shipped configuration:
"templateRetentionFields":[
{"field":"b3s__Scheduled_Start_Time__c","useContextDate":true},
{"field":"b3s__Scheduled_End_Time__c","useContextDate":true},
{"field":"b3s__Required_Staff__c","default":"1","showIf":{"condition":{"allOrSome":"all","selectors":[{"field":"b3s__Contact__c","operator":"isnull","value":true}]}}},
{"field":"b3s__Work_Job__c"},
{"field":"b3s__Work_Site__c"},
{"field":"b3s__Work_Site_Location__c"},
{"field":"b3s__Status__c"},
{"field":"b3s__Comments__c"},
{"field":"b3s__Internal_Comments__c"}
]
Entry options:
| Key | Meaning |
|---|---|
field |
Shift field API name to retain (also accepted as fieldName) |
useContextDate |
For datetime fields: keep the wall-clock time and day offset, recalculate the date from the insertion cell. Fields without this flag are copied verbatim |
default |
Value applied at insert time when the template holds no value for the field. Numeric fields are coerced automatically. The token :contextId resolves to the loaded context record Id |
showIf |
Standard selector condition evaluated against the record being created. When it fails, the field is dropped - the shipped config uses this so Required Staff only applies on the unassigned (demand) lane |
The preview boxes are titled with the shift schedulable's shiftBulkViewTitle field configuration (falling back to the view's shiftTitle), so the same Job/Site labels used elsewhere in the scheduler appear in template previews.
recordFormFields (or another queried field list) so their values are present on the loaded records when capturing.default.