Scheduler Definition
There are two types of schedulables - the shift and the request. Both have very similar definition fingerprint.
Shift Schedulable
The shift schedulable object determines how shifts are drawn on the scheduler and what are restrictions to changes of the shift lifecycle.
Request Schedulable
The request schedulable object determines how availability events are drawn on the scheduler and what are restrictions to changes of the event lifecycle.
Fields, Properties and Definitions
This section will describe the various configuration options available to admins when setting up the schedulable definition. For the purposes of this guide, Shifts and Requests are both referred to as "events". Some properties might be shift specific and the section will confirm this in those cases.
Object Selection (objectType)
The objectType attribute accepts a string and it defines the name of the object that represents a shift. Default value is "b3s__Shift__c" for shift and "b3s__Employee_Request__c" for request.
Start Time (startFieldPath)
The startFieldPath is the field on the event object to be used for identifying the event's start time. It should never be a blank field. Default value is "b3s__Absolute_Start_Time__c"
End Time (endFieldPath)
The startFieldPath is the field on the event object to be used for identifying the event's End time. It should never be a blank field. Default value is "b3s__Absolute_End_Time__c"
Look Back and Look Forward Extension
The lookBackExtendDays and lookForwardExtendDays allows us to load define a few days before/and after the start and end field paths. This is useful when creating compliance rules.
Record Selection (selectionClause)
The selectionClause accepts a string or an array, which should be a salesforce SOQL query filter. The example below is for a shift schedulable with a Job object context, and demonstrates a selection clause which will bring shifts to the scheduler where the contact has an application for the contextual job or the shift has no contact assignment, but the shift is assigned to the context job.
//Example 1
"selectionClause": [
//Get all shifts for the people who have applications for the context job
"Contact__c in (SELECT Contact__c FROM Application__c WHERE Job__c = :contextId)",
//Also get all the shifts which may not have a contact but might be assigned to the context job
"Contact__c = null AND Job__c = :contextId"
]
//Example 2
"selectionClause": "Job__c = :contextId"
Only unique records brought across the multiple queries will be brought to the scheduler.
Shift/Request Object Static Fields
The following fields and field paths are important for the correct configuration of the shift & request scheduling objects:
- contactFieldPath - default value is "b3s__Contact__c" and this is used to identify the relationship between the candidate and the shift
- contactRecordPath - default value is "b3s__Contact__r"
- contactsLoader - the name of the loader responsible for retreiving the contextual contacts
- recordStatusFieldPath - optional field indicating the status of the schedulable
- matchingLoaders: an array of loader names to be used for the matching operation. When you specify a name of a loader, the loader will be made available within the compliance engine. Use this to load additional/auxiliary data.
Shift/Request Object Dynamic Fields
You can specify additional fields to be loaded for the shifts/requests by adding a property “additionalFields” which is an array that accepts objects with a single property “field”. Use this property to load additional fields for search & match and compliance.
"shift":{
"objectType":"b3s__Shift__c",
//...
"additionalFields":[
{
"field":"b3s__Job__r.b3o__Client_Account__c"
},
{
"field":"b3s__Job__r.b3o__Job_Type__c"
},
{
"field":"b3s__Site__r.b3o__Coordinates__Latitude__s"
},
{
"field":"b3s__Site__r.b3o__Coordinates__Longitude__s"
}
],
}
Note that the manualAlertField is a checkbox that allows us to define a flag for alerts that were created manually and not as part of the compliance engine.
Event Log/Alerts Obejct Definition (eventAlerts)
Shfits can attract event alerts - these are lists of records attached against the shift object that list out health and safety alerts, warnings and blockers. Below is an example of the default setup for this property.
"eventAlerts":{
"objectName": "b3s__Event_Alert__c",
"shiftReferenceField": "b3s__Shift__c",
"categoryField": "b3s__Category__c",
"detailsField": "b3s__Details__c",
"severityField": "b3s__Severity__c",
"pointsField": "b3s__Points__c",
"manualAlertField": "b3s__Manually_Created__c",
}
Event Details Popup (eventTooltipFields)
This property allows admins to define fields to be displayed when the user hovers over the event.
The event tooltip object fingerprint is as follows: -- label - the label to be displayed in the pop-up -- fieldPath - the path from the schedulable object to the field, the value of which we want to display -- hideIfNull - a boolean - if set to true but the field path is null, we will hide the field altogether, otherwise we will display "N/A" as the value of the field in the popup -- formatter - an optional formatter on the value returned from the fieldPath
"eventTooltipFields": [
{"label":"Worker", "fieldPath": "b3s__Contact__r.Name", "hideIfNull": false},
{"label":"Start", "fieldPath": "Start_Time__c", "hideIfNull": true, "formatter": "Date"},
...
],
Event Cancellation Status (isCancelled)
This property accepts a selector condition. Only applicable for shift schedulable. This helps the scheduler identify cancelled shfits vs non-cancelled shifts when determining how to render these shifts on the scheduler.
"isCancelled": {
"condition": {
"allOrSome": "some",
"selectors": [
{
"field": "b3s__Status__c",
"operator": "equals",
"value": "Cancelled"
},
{
"field": "b3s__Cancelled_Timestamp__c",
"operator": "isnull",
"value": false
}
]
}
},
Event Readonly Status (isReadOnly)
This property accepts a selector condition. Only applicable for shift schedulable. This helps the scheduler identify when shifts should be rendered in read-only mode (e.g. when the shift is cancelled, blocked, unconfirmed etc)
"isReadOnly": {
"condition": {
"allOrSome": "some",
"selectors": [
{
"field": "b3s__Status__c",
"operator": "equals",
"value": "Cancelled"
},
{
"field": "b3s__Cancelled_Timestamp__c",
"operator": "isnull",
"value": false
}
]
}
},
Even Detail Fields (recordFormFields)
This property accepts an array of field objects that will be used for the record detail forms displayed when editing the shift/request.
Field Object Definition
The field object has the following properties:
- field - this is the API name of the field, directly on the schedulable object. You cannot use field paths. Note: the field type "field-time-range-selector" accepts two fields e.g. "b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c".
- type - this is the field type to render on the form. The options are:
- "field-time-range-selector" - for start-end time rendering. Also pass a prop "hideDate" to show/hide the date component of the time range
- "field-select" - for drop down/lookups, requires a "loader" if used as a lookup
- "field-text" - text inputs
- "field-text-area" - text area inputs
- "field-checkbox" - boolean inputs
- “field-date-input” - date input
- “field-number-input” - number field input
- “field-file-upload” - a file upload component. Not available within the scheduler. Always set the field attribute to “Id” and add labelOverride to give the component a label.
//field-time-range-selector field type
{
field: 'b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c',
props: {
hideDate: true, //hide or show the date component
},
labelOverride: 'Scheduled Times',
type: 'field-time-range-selector',
required: false,
disabled: true,
}
//field-file-upload special field type
{
field: '', //Always empty - do not set!
props: {
placeholder: 'Upload File',
accept: '.jpg, .pdf', //optional file filter
minFileSize: 1000, //1mb
maxFileSize: 20000, //20mb
},
labelOverride: 'Proof', //required label, defaults to "Upload File"
type: 'field-file-upload',
required: true, //state
disabled: false,
}
- props - this is an object of additional attributes to apply to the field type. e.g. hideDate
- views object - the views object controls where the field is going to be rendered. The object's attribues are:
- shiftView - this is the shift editor form
- bulkEditView - this is when multiple events are edited at the same time
- blukCreateView - this is when the user creates events in bulk
- required - this is a boolean flag that indicates whether or not the field is required. You can also pass a condition selector logic to determine the required state of the field.
- disabled - this is a boolean flag that indicates whether or not the field is disabled. You can also pass a condition selector logic to determine the disabled state of the field.
- options - this is an array of label-value obejcts that will be used to render the field options when the field type is "field-select". Do not add "options" if you have "loader" attribute.
- loader - this is the name of the scheduling loader which will provide the records for selection in the event that the field type is "field-select". Do not add "options" if you have "loader" attribute.
- optionLabelField - by default the field's API name (salesforce name) will be used for the field rendering, however you can override this behaviour by passing a string to the optionLabelField
- createAction - this is an object that when used in conjunction with the "field-select" and "loader" attribute (i.e. a lookup selector), it will allow users to create parent records.
- objectName - the name of the object to be created
- fields - an array of strings - the API field names to be requested when the user is creating a new instance of a record
- disabledFields - an array of strings - fields will be disabled for user interaction
- requiredFields - an array of strings - fields will be required
- defaultFieldValues - an array of objects - defaults the value of a fields based on the field value of the contextual record. The default value object has two attributes:
- targetField - this is the field on the context record (shift/event)
- sourceField - this is the field on the new record
- loader - provide the loader's name here. This will update the records in the loader to make sure that the user can use the newly created record on any other instances within the scheduler
- showIf - accepts a conditional selector - if the selector executes to "true", the field will be made visible. Otherwise, the field will be hidden from the form
- default - accepts a string (or boolean if field type is field-checkbox), responsible for setting the default value of the field (when empty, new record). You can use the :contextId to default the value, so for example if the schedule context is a Placement, you can pre-populate the placementId. In addition, you can use :contextDate for the current contextual date.
- autoSelectOnlyOption - a boolean - when the field type is "field-select", you can instruct the form to auto-populate the field with the top option if there is only one option in the list.
- optionsInPopout - a boolean, if set to true and the field type is "field-select", the options will be presented in a modal instead of in a drop down against the select field.
- showOptionIf - an option conditional selector that allows you to filter records displayed in type = "field-select". Useful when you want to create dependent picklists (e.g. Job + Candidate = Placement)
- optionExtendedDetails - accepts an array of objects - this provides further context to a select field's options, enriching the option select details. The attributes in the object passed in this array are:
- label - a string, the label of the field
- targetField - a string, the api name of the field (or path) from the select object type
//Example 1
{
"field":"b3s__Contact__c", //The API name of the field
"type":"field-select", //The type of field
"views":{
"shiftView":true,
"bulkEditView":false,
"blukCreateView":false
},
"required": {
"condition": {
"allOrSome": "all",
"selectors": [
{
"field": "Person_Assigned__c",
"operator": "equals",
"value": true
}
]
}
},
"disabled":false, //Disabled flag
"loader":"contacts",
"optionLabelField":"Name" //Override field label
}
//Example 2
{
"field":"b3s__Individual__c",
"type":"field-select",
"views":{
"shiftView":false,
"bulkEditView":false,
"blukCreateView":false
},
"required":true,
"disabled":false,
"loader":"individuals",
"optionLabelField":"Name",
"createAction":{
"objectName":"Individual",
"fields":[
"FirstName",
"LastName"
],
"disabledFields":[
],
"requiredFields":[
"LastName"
],
"defaultFieldValues":[
{
"targetField": "Placement__c", //Field on Individual
"sourceField": "b3s__Placement__c" //Field on Shift
}
],
"loader":"individuals"
}
}
//Example 3
{
"field":"Day_Type__c",
"type":"field-select",
"views":{
"shiftView":true,
"bulkEditView":true,
"blukCreateView":true
},
"required":true,
"disabled":false,
"showIf":{
"condition":{
"allOrSome":"some",
"selectors":[
{
"field":"Schedule_Type__c",
"operator":"equals",
"value":"Regular"
}
]
}
},
"options":[
{
"label":"Day",
"value":"Day"
},
{
"label":"Night",
"value":"Night"
}
]
},
//Example 4
{
"field":"b3s__Site__c",
"type":"field-select",
"views":{
"shiftView":true,
"bulkEditView":true,
"blukCreateView":true
},
"required":false,
"disabled":false,
"loader":"sites",
"optionLabelField":"Name",
"createAction":{
"objectName":"b3o__Site__c",
"fields":[
"Name",
"b3o__Public_Name__c",
"b3o__Street_Address__c",
"b3o__City__c",
"b3o__Post_Code__c"
],
"disabledFields":[
],
"requiredFields":[
"Name",
"b3o__Public_Name__c"
],
"loader":"sites"
}
},
//Example 5
{
"field":"b3s__Placement__c",
"type":"field-select",
"views":{
"shiftView":true,
"bulkEditView":false,
"blukCreateView":false
},
"required":false,
"disabled":true,
"default": ":contextId", //auto-set the placement id from the contextId
"autoSelectOnlyOption":true, //auto-select the first option in the list
"optionsInPopout":true, //Show options in pop out, not drop down
"loader":"placements",
"optionLabelField":"Name", //Override the field to be used for the field value name
"optionExtendedDetails":[ //Show additioanl options in the select dropdown
{
"label":"Candidate",
"targetField":"b3s__Contact__r.Name"
}
],
"showOptionIf":{ //Show only placements which are matching the Job and Candidate on the shift
"condition":{
"allOrSome":"all",
"selectors":[
{
"field":"b3s__Job__c",
"operator":"equals",
"targetField":"b3o__Job__c"
},
{
"field":"b3s__Contact__c",
"operator":"equals",
"targetField":"b3o__Contact__c"
}
]
}
}
},
//Example 6
{
"field": "b3s__Start_Time__c:b3s__End_Time__c",
"props": {
"hideDate": true
},
"labelOverride": "Scheduled Times",
"type": "field-time-range-selector",
"required": true,
"disabled": false
}
Field Separator Object
You can define a field separator element via the following syntax:
{
"isSeparator":true,
"label":"Separator Label Here",
"views":{
"shiftView":true,
"bulkEditView":false,
"blukCreateView":false
}
},
Simply pass the separator object along the field objects in the recordFormFields attribute for the schedulable, and the system will render the fields and separator sin the order passed.
Context Menu Customization contextMenu
The contextMenu attrbute on the schedulable object allows admins to define the event-click menu (context menu) that appears in the scheduler. The contextMenu attribute accepts an object witht he following properties:
- recordNavigate - an array of objects with label and fieldPath that will cause a new option to appear in the context menu, when clicked, the system will navigate to the specific Id identified in the fieldPath.
- canCut - whether the event can be "cut" - accepts a conditional selector
- canCopy - whether the event can be "copied"
- canCancel - whether the event can be "cancelled" - i.e. to open the cancellation form
- canDelete - whether the event can be "deleted"
- canMatch - whether the event can be matched to relevant candidates using the search & match engine.
"contextMenu":{
"recordNavigate":[
{
"label":"View Placement",
"fieldPath":"b3s__Placement__c"
},
{
"label":"View Shift",
"fieldPath":"Id"
}
],
"canCut":{
"condition":{
"allOrSome":"all",
"selectors":[
{
"field":"Status__c",
"operator":"equals",
"value":"New"
}
]
}
},
"canCopy": null,
"canCancel": null,
"canEdit": null,
"canDelete": null,
},
Event Cancellation Fields cancelFormFields
This is an array of fields to be displayed when the user has invoked the "Request Cancellation" option from the context menu. The input is an array of field objects.
Fields Clearing (Flushing)
Certain actions on the scheduler might benefit from field flushing - i.e. you might want an automatic clearing of the Placement field if the Contact has changed. This is why, we created the following field flushing attributes on the schedulable:
Contact Change (re-assignment) flushing reassignEventFieldsFlush
Accepts an array of objects with a field an value. The field is the API name directly on the schedulable object. The value can be null, string, boolean or date. These are the fields that will be cleared once the contact on the shift has changed (i.e. after re-assignment, matching, and moving)
"reassignEventFieldsFlush": [
{
"field": "b3s__Placement__c",
"value": null
},
{
"field": "b3s__Placement__r",
"value": null
}
]
Shift Match Assignment flushing matchEventFieldsFlush
Accepts an array of objects with a field an value. This flusher is used when we assign a matched shift to a candidate through the “Book” button on an accepted invitation
matchEventFieldsFlush: [
{
field: 'b3s__Status__c',
value: 'New',
},
]
Event Clone cloneEventFieldsFlush
Accepts an array of objects with a field an value. These fields are cleared once we re-create events (e.g. on copy/paste and on cut/paste)
"cloneEventFieldsFlush": [
{
"field": "b3s__Cancelled__c",
"value": false
}
]
Record History Timeline recordHistoryData
The shift and request record details contain a historical audit trail that is useful when you want to show recruiters the status and timeline of events for a specific schedulable. The attribute accepts an array of objects with the following fingerprint:
- dateFieldPath - must be a dete-time field on the schedulable object
- label - the label we will render against the historical record item
- isComplete - accepts a selector that will help us identify if the item is complete or not
"recordHistoryData": [
{
"dateFieldPath": "CreatedDate",
"label": "Created",
"isComplete": {
"selector": {
"field": "Status__c",
"operator": "isnull",
"value": false
}
}
},
{
"dateFieldPath": "Confirmed_Time__c",
"label": "Confirmed",
"isComplete": {
"selector": {
"field": "Confirmed_Time__c",
"operator": "isnull",
"value": false
}
}
},
...
]
Event Restrictions
Event restrictions help us block certain actions on the scheduler and issue an alert to the user to inform them that the action is not allowed.
The basic fingerprint for a restriction object is as follows:
- type - can be warning, error or info - determines the color of the alert message issued
- message - this will be the body of the alert message
- condition - this is a conditional selector determining when the restiction applies
"deleteRestrictions": [
{
"type": "warning",
"message": "Cancelled shifts cannot be deleted",
"condition": {
"allOrSome": "all",
"selectors": [
{
"field": "b3s__Cancelled__c",
"operator": "equals",
"value": true
}
]
}
}
]
Move Restriction (moveRestrictions)
If the condition for this restriction is met, the event will be returned to the original position.
Cancel Restriction (cancelRestrictions)
If the condition for this restriction is met, we will not allow the user to cancel the event.
Edit Restriction (editRestrictions)
If the condition for this restriction is met, the user will not be able to edit the event's details
Clone Restriction (cloneRestrictions)
If the condition for this restriction is met, the user will not be able to copy/cut/paste the event.
Delete Restriction (deleteRestrictions)
If the condition for this restriction is met, the user will not be able to delete the event from the scheduler.
Event Decorations (icons, decorations)
You can define custom icons to be displayed on events. The attribute accepts an array of decoration objects with the following footprint:
- name - must be a unique name across all decorators
- condition - a selector determining when to show the decorator
- icon - an SVG, you can get svgs from tabler.io
- title - accepts an object with either field or literal. You can also define a formatter.
"decorations": [
{
"name": "cancellation-status",
"condition": {
"allOrSome": "all",
"selectors": [
{
"field": "b3s__Cancelled__c",
"operator": "equals",
"value": true
}
]
},
"icon": {
"svg": "<svg>...</svg>"
},
"title": {
"formatter": "", //You can define formatter here
"field": "b3s__Reason_for_Cancellation__c"
}
}
]
Event Background Customization background
Define a matcher which returns a valid tailwind class to be applied to the event box. It will determine the background color of the event based on the condition defined. You can also define a formatter for literal values.
"background": {
"match": {
"field": "Day_Type__c",
"equals": {
"Morning": {
"literal": "bg-green-200"
},
"Afternoon": {
"formatter": "" //you can define a formatter
"literal": "bg-orange-200"
}
},
"otherwise": {
"literal": null
}
}
},
Event Border Customiztion
Define a matcher which returns a valid tailwind class to be applied to the event box. Usually, that will be some type of border-t|b|l|r-color-weight class. You can apply the event border customization to the topBorder leftBorder rightBorder
"topBorder": {
"match": {
"field": "Status__c",
"equals": {
"Cancelled": {
"literal": "border-t-red-500 border-t-5"
},
},
"otherwise": {
"literal": null
}
}
},
Event Tile Customization title
Define which fields/field paths are rendered on the event box based on a defined fieldPath or a matcher. Pass a number of title objects that each can customized when and what is displayed on the event box.
- viewType - an array of view names - this controls when the scheduler will show the requested field/matcher
- fieldPath - define a field path starting from the schedulable
- match - alternatively to fieldPath, you can define a matcher
"title": [
{
"viewType": [
"list"
],
"fieldPath": "Day_Type__c"
},
{
"viewType": [
"byWorker",
"byMonth",
"list"
],
"match": {
"field": "Day_Type__c",
"equals": {
"Morning": {
"literal": "AM"
},
"Afternoon": {
"literal": "PM"
}
},
"otherwise": {
"literal": ""
}
}
}
]
Views Configuration views
The scheduler allows us to configure a view types based on 3 general view renderers:
- resourceTimelineWeek - great for worker, site, job rendering where each row is a resource and each column is a day
- dayGridMonth - renders a monthly view (1-31 days)
The views attribute accepts an array of view objects. The fingerprint is as follows
- type - this is the label of the view
- name - a unique name. This will be used in the title -> viewType array to determine which decorators/title fields should be displayed on a shift box
- active - boolean - whether this is the default displayed view or not
- icon - a required svg icon
- config - an object that requires the following attributes:
- type : resourceTimelineWeek | dayGridMonth | list
- slotDuration : days | months | weeks | years object - view slot (day cell) duration
- eventMaxStack: integer - limits the number of events for the current view
- duration : days | months | weeks | years object - view duration
- increment - an object that controls how we navigate across the view
- next - days | months | weeks | years object
- prev - days | months | weeks | years object
- resources - an object that has a static and dynamic attributes. This definition helps us define how we raster the resources on the scheduler. Only applicable for resourceTimelineWeek type
- static - this is usually the "unassigned" / top-row in resourceTimelineWeek
- Accepts an array of objects with the fingerprint:
- id - usually "*" indicating no ID
- fieldPath - the field path to the pivot field
- recordPath - the field path to the pivot record
- title - the title of the view
- sort - we will sort the rows based on the string added here. "a" will be sorted atop
- type - unique name
- dynamic - this is usually all the other events that don't match the static filters - loader - the name of the loader that we will use to load the rows - fieldPath - the field path to the pivot field - recordPath - the field path to the pivot record - type - unique name - fieldsFlush - a list of fields that will be cleared if an event is moved across dynamic/static resources - resourceId - a matcher helping us identify the field that will be used to assigning a row to an event - title - the title in the resource box - sort - a matcher that will help us sort rows
"views": [
{
"type": "Week",
"name": "byWorker",
"active": true,
"icon": "<svg></svg>"
"config": {
"type": "resourceTimelineWeek",
"slotDuration": {
"days": 1
},
"duration": {
"weeks": 1
}
},
"increment": {
"next": {
"days": 7
},
"prev": {
"days": -7
}
},
"resources": {
"static": [
{
"id": "*",
"fieldPath": "b3s_Contact__c",
"recordPath": "b3s__Contact__r",
"title": "Open",
"sort": "a",
"type": "open-shifts"
}
],
"dynamic": [
{
"loader": "contacts",
"fieldPath": "b3s__Contact__c",
"recordPath": "b3s__Contact__r",
"fieldsFlush": [
{"field":"Placement__c", "value":null},
{"field":"Placement__r", "value":null}
],
"resourceId": {
"match": {
"field": "b3s__Contact__c"
}
},
"title": {
"match": {
"field": "Name"
}
},
"sort": {
"match": {
"field": "Name"
}
}
}
]
}
},
{
"label": "Job",
"name": "byJob",
"icon": "<svg></svg>"
"active": false,
"config": {
"type": "resourceTimelineWeek",
"slotDuration": { "days": 1 },
"duration": { "weeks": 1 },
"eventMaxStack": 5 //This limits how many events can be displayed per event cell
},
"increment": {
"next": { "days": 7 },
"prev": { "days": -7 }
},
"resources": {
"static": [
{
"id": "*",
"fieldPath": "b3s__Job__c",
"recordPath": "b3s__Job__r",
"title": "Unassigned",
"sort": "a",
"type": "unassigned-shifts",
"isExternal": false
}
],
"dynamic": [
{
"loader": "jobs",
"fieldPath": "b3s__Job__c",
"recordPath": "b3s__Job__r",
"resourceId": {
"match": {
"field": "b3s__Job__c"
}
},
"title": {
"match": {
"field": "Name"
}
},
"sort" : {
"match": {
"field": "Name"
}
}
}
]
}
},
{
"type": "Month",
"name": "byMonth",
"icon": "<svg></svg>"
"active": false,
"increment": {
"next": {
"months": 1
},
"prev": {
"months": -1
}
},
"config": {
"type": "dayGridMonth"
}
},
{
"type":"List View",
"name":"byList",
"icon":"<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-list-details'><path stroke='none' d='M0 0h24v24H0z' fill='none'/><path d='M13 5h8' /><path d='M13 9h5' /><path d='M13 15h8' /><path d='M13 19h5' /><path d='M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z' /><path d='M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z' /></svg>",
"active":false,
"increment":{
"next":{
"days":1
},
"prev":{
"days":-1
}
},
"config":{
"type":"listDay",
"slotDuration":{
"days":1
},
"duration":{
"days":1
}
},
"shiftTitle":[
{
"match":{
"field":"b3s__Contact__r.Name"
}
},
{
"match":{
"field":"b3s__Job__r.Name"
}
},
{
"match":{
"field":"b3s__Site__r.Name"
}
}
],
"requestTitle":[
{
"match":{
"field":"b3s__Contact__r.Name"
}
},
{
"match":{
"field":"b3s__Type__c"
}
}
]
}
],
Other Scheduler Definitions
Additional attributes available on the schedule definition are:
- resourceAreaWidth - width of the resource area in resourceTimelineWeek views
- slotLabelFormat - the date/time slot info type
- timeZone - the timezone of the scheduler. Options are local or UTC
- height - the nominal height of the scheduler
- dayMaxEventRows - limits the number of events in monthly view per day cell
"resourceAreaWidth": "20%",
"slotLabelFormat": [
{
"weekday": "short",
"day": "numeric"
}
],
"timeZone": "local",
"height": "100vh"
Invitations
The invitations schema is used to determine how Shift Invites are interpreted within the scheduler.
Footprint
The schedulable defines the object to be scheduled
{
"schedulables":{
"shift":{
...
}
"request": {
...
}
}
}
Below is a complete example of the scheduler's definition
{
"schedulables":{
"request":{
"objectType":"b3s__Employee_Request__c",
"startFieldPath":"b3s__Start__c",
"endFieldPath":"b3s__End__c",
"selectionClause":[
//SOQL selector
],
"contactFieldPath":"b3s__Contact__c",
"contactRecordPath":"b3s__Contact__r",
"contactFirstNameFieldPath":"b3s__Contact__r.FirstName",
"contactLastNameFieldPath":"b3s__Contact__r.LastName",
"contactsLoader":"contacts",
"recordStatusFieldPath":"b3s__Type__c",
"additionalFields":[
//Array of field paths to be loaded
],
"contextMenu":{
//Context menu definition
},
"eventTooltipFields":[
//Fields to display in the event tooltip
],
"recordFormFields":[
//Fields to be displayed when creating/editing records
],
"recordHistoryData":[
//Path component definition
],
"background":null,
"topBorder":null
},
"shift":{
"objectType":"b3s__Shift__c",
"startFieldPath":"b3s__Scheduled_Start_Time__c",
"endFieldPath":"b3s__Scheduled_End_Time__c",
"selectionClause":[
//SOQL selector
],
"additionalFields":[
//Array of field paths to be loaded
],
"contactFieldPath":"b3s__Contact__c",
"contactRecordPath":"b3s__Contact__r",
"contactFirstNameFieldPath":"b3s__Contact__r.FirstName",
"contactLastNameFieldPath":"b3s__Contact__r.LastName",
"contactsLoader":"contacts",
"matchingLoaders":[
//Names of loaders to be passed on to the matching engine
],
"placementFieldPath":"b3s__Placement__c",
"recordStatusFieldPath":"b3s__Status__c",
"cancelledFieldPath":"b3s__Cancelled_Timestamp__c",
"contextMenu":{
"recordNavigate":[
//Context menu definition
],
"canCut":{
//Selector
},
"canCopy":{
//Selector
},
"canCancel":{
//Selector
},
"canEdit":{
//Selector
},
"canClone":{
//Selector
},
"canDelete":{
//Selector
}
},
"eventTooltipFields":[
],
"eventAlerts":{
"objectName":"b3s__Event_Alert__c",
"shiftReferenceField":"b3s__Shift__c",
"categoryField":"b3s__Category__c",
"detailsField":"b3s__Details__c",
"severityField":"b3s__Severity__c",
"pointsField": "b3s__Points__c"
},
"isCancelled":null,
"isReadOnly":null,
"recordFormFields":[
],
"cancelFormFields":[
],
"reassignEventFieldsFlush":[
],
"cloneEventFieldsFlush":[
],
"recordHistoryData":[
],
"moveRestrictions":[
],
"cancelRestrictions":[
],
"editRestrictions":[
],
"cloneRestrictions":[
],
"deleteRestrictions":[
],
"decorations":[
],
"background":null,
"topBorder":null
}
}
}