The Candidate Availability Manager is a small, self service app in which a worker declares when they can and cannot work on a month calendar. It solves a single problem well: capturing availability at the source so scheduling staff and the matching engine can respect it before offering shifts. A worker taps days to mark themselves Available or Unavailable, or opens a full editor to log a specific time window or a recurring pattern. The app writes availability records for that one worker and does no scheduling or matching itself. The value is realised elsewhere: the scheduler reads those records and the availability compliance rule scores or blocks shift offers against them.
It is portable. The same build runs on a hosted Visualforce page and, unchanged, inside a 3B Portals guest page.
The app closes the loop between the people who know their availability (the workers) and the systems that need it (scheduling and matching), without a manual re export or a spreadsheet.
Candidate Availability, which is a session app. A guest needs a valid session key that identifies one Contact. The guest is confined server side to the worker's own records: their availability rows and their Contact.Because the session key identifies the worker, the scoping in the app definition (see selectionClause below) resolves to the signed in worker automatically.
The app is driven entirely by a Custom Metadata record included as sample configuration with the package: a b3s__Component_Configuration__mdt record with b3s__Type__c = "Candidate Availability". Its b3s__JSON__c field holds the full app definition. Everything below is editable there without a code change. For the shared grammar of this JSON, see the App definition JSON reference.
| Key | Type | Controls |
|---|---|---|
timezonePreference |
string | How times are displayed. client uses the browser timezone; user uses the running user timezone. |
defaultLanguage |
string | Initial UI language, for example en-GB. |
availableLanguages |
string[] | Languages offered in the switcher, for example ["en-GB", "en-US", "bg-BG", "gr-GR"]. |
firstDay |
number | First day of the week for the month grid. 1 is Monday. |
is24Hour |
boolean | 24 hour versus 12 hour time display. |
canAddAvailability |
boolean | Whether the worker may create availability entries, versus a read only calendar. |
syncTimeout |
number | Background silent refresh interval, in seconds. Default is 15. |
canSearchShifts |
boolean | Whether the shift search surface is offered alongside availability (used when the same build is extended into a companion experience). |
showInvitations |
boolean | Whether invitation surfaces are shown alongside availability. |
schedulables.request |
object | The single object definition, the availability record. See below. |
request schedulableAvailability is stored as an availability request record, b3s__Employee_Request__c. The one schedulables.request entry defines how the app reads, colours, edits and titles those records.
| Key | Value in the sample | Purpose |
|---|---|---|
objectType |
b3s__Employee_Request__c |
The object holding availability. |
startFieldPath / endFieldPath |
b3s__Start__c / b3s__End__c |
The availability window. |
typeFieldPath |
b3s__Type__c |
The availability status field (Available / Unavailable / Flexible Schedule). |
contactFieldPath |
b3s__Contact__c |
The worker the record belongs to. |
siteTimezoneFieldPath |
b3s__Contact__r.b3s__Timezone__c |
The timezone used for date cell math and for the title formatter, resolved through the contact. |
selectionClause |
["b3s__Contact__c = :contactUserId"] |
Scopes every read to the signed in worker. :contactUserId resolves server side to the contact behind the session key. |
lookBackLimitDays / lookForwardLimitDays |
31 / 31 |
The window either side of the visible month that is pre fetched in the background. |
canEdit |
null |
Whether records can be edited. null leaves the default behaviour. |
canDelete |
true |
Whether records can be deleted. |
background |
object | Conditional row and cell colouring keyed on the type. See below. |
decorations |
array | Conditional icons and titles keyed on the type. See below. |
recordFormFields |
array | The editor form definition. See below. |
title |
array | The read only detail rows shown when viewing a record. See below. |
background maps each b3s__Type__c value to a style token, with an otherwise fallback. The keys under equals are the picklist values; the literal is applied when a day carries that type:
"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]" }
}
}
To recolour availability, edit these tokens. To support a new status, add a key here matching a new picklist value.
decorations adds an icon and a hover title to a day when a condition matches. Each entry has a name, a condition (one or more field selectors joined by allOrSome), an icon, and a title. The sample ships two, one for Unavailable and one for Available:
"decorations": [
{
"name": "request-available",
"condition": {
"allOrSome": "all",
"selectors": [
{ "field": "b3s__Type__c", "operator": "equals", "value": "Available" }
]
},
"icon": { "svg": "<svg ...>...</svg>" },
"title": { "literal": "Available" }
}
]
recordFormFieldsrecordFormFields is the editor shown on long press or when a day cannot be quick toggled. Each entry follows the Record form field reference. The sample form is:
| Field | Type | Notes |
|---|---|---|
| (separator) | isSeparator |
A "Times" section header. |
b3s__Start__c:b3s__End__c |
field-time-range-selector |
The window. required: true, labelOverride: "Start/End Time", valueStart: ":contextStart", valueEnd: ":contextEnd" seed it from the tapped day, props.hideDate: false shows the date, and enableRepeatPattern: true turns on the recurring picker (new records only). |
b3s__Contact__c |
field-select |
disabled: true, default: ":contactUserId", loaded from the contacts loader, labelled by Name. Locks the record to the worker. |
b3s__Type__c |
field-select |
labelOverride: "Availability", default: "Available", required: true, optionsInPopout: true. |
b3s__Comments__c |
field-text |
Optional free text. |
The composite b3s__Start__c:b3s__End__c field is split on the colon: those two API names are the ones re anchored when the repeat pattern expands into multiple records; every other field on the form is preserved verbatim on each occurrence.
titletitle defines the read only rows shown when a record is opened for viewing. The sample renders the formatted window and any comments:
"title": [
{
"label": "Times",
"fieldPath": "b3s__Start__c:b3s__End__c",
"formatter": "startEndWithDate",
"siteTimezoneFieldPath": "b3s__Contact__r.b3s__Timezone__c",
"hideIfNull": false
},
{ "label": "Comments", "fieldPath": "b3s__Comments__c", "hideIfNull": true }
]
There is no dedicated availability object. Availability is one b3s__Employee_Request__c row per worker per day or time range:
| Field | Purpose |
|---|---|
b3s__Start__c / b3s__End__c |
The window. An all day entry runs from local midnight to end of day. |
b3s__Type__c |
Available, Unavailable or Flexible Schedule (a restricted picklist). |
b3s__Contact__c |
The worker, locked to self. |
b3s__Comments__c |
Free text. |
firstDay.enableRepeatPattern): a picker lets the worker choose weekdays and a repeat until date. On save the single insert is expanded into the picked date plus one record per matching weekday up to the repeat until date. Each occurrence's time of day is re anchored in the site timezone, so daylight saving shifts are respected rather than drifting by an hour. Editing an existing record is always a single update.One loader, contacts, backs the locked Contact select. It is an entry in this configuration's b3s__Loaders__c JSON array that fetches the worker's own Contact by Id = :contextId:
{
"name": "contacts",
"objectName": "Contact",
"filterRecordsBy": ["Id =:contextId"],
"groupRecordsBy": "Id",
"fieldToLoad": ["Name", "LastName", "FirstName", "Title", "Description", "MailingLatitude", "MailingLongitude", "MobilePhone", "Email", "CreatedDate"]
}
The query definition never reaches the browser; only the resulting records do. See Data loaders. Add more entries to this configuration's b3s__Loaders__c array if a customised form needs additional lookups.
The Candidate Availability Manager only captures data. The internal scheduler turns it into decisions through an availability compliance rule (a b3s__Scheduling_Compliance_Rule__mdt record of type Scheduling). When a shift is evaluated for a worker, the rule scans the loaded availability request records for that same contact and looks for any whose window overlaps the shift, then scores the shift by the request type:
b3s__Type__c |
Outcome |
|---|---|
Unavailable |
Blocking conflict. A strong negative score and, in the sample rule, a hard block on allocation. |
Available |
Preferred. A positive score confirming verified availability. |
Flexible Schedule |
A neutral notice prompting the scheduler to review constraints before matching. |
The rule matches on the same three picklist values used by the background and decorations matchers in the app definition, and it filters to the evaluated contact, so one worker's declarations never affect another's. If you add a new availability status, add a matching branch to the compliance rule (and to the app's colour and decoration rules) so the new status has a defined scheduling effect. For the full rule contract, evaluation results and scoring, see Scheduling compliance rules.
availableLanguages, change defaultLanguage.firstDay and is24Hour.canAddAvailability for a read only calendar, and canSearchShifts / showInvitations for the companion surfaces.syncTimeout and the lookBackLimitDays / lookForwardLimitDays pre fetch window.recordFormFields, change required / disabled, or toggle enableRepeatPattern.background tokens or edit the decorations icons and titles per type.b3s__Type__c picklist for statuses beyond the three shipped, then update the background, decorations and the scheduler's availability compliance rule to match.b3s__Loaders__c array if the form needs new lookups.