Contact shift map

Contact shift map

The Contact Shift Map component gives schedulers a visual summary of a worker's booked shifts directly on the Contact record. It groups shifts by day, distinguishes each status with a consistent colour, and shows the selected shift's work-site location on a map.

The component supports workers who have multiple shifts on the same day, shifts across a week, repeated bookings at one site, and bookings at different sites.

Add the component

  1. Open a Contact record.
  2. Select Setup > Edit Page.
  3. Drag Contact Shift Map from the Custom components section onto the page.
  4. Review the field mappings in the component properties.
  5. Click Save, then activate the page if required.

The supplied defaults use the standard 3B WFM+VMS Shift, Site, and Job relationships.

Select a horizon

Users can switch the component between these horizons:

Horizon Included dates
Today Today
Tomorrow Tomorrow
Yesterday Yesterday
Next 7 days Today and the following six days
Last 7 days The previous six days and today
This week The current locale-aware week
Next week The following locale-aware week
Last week The previous locale-aware week

A shift is included according to the date of its configured start field. The weekly horizons use the running Salesforce user's locale when determining the first day of the week.

Read the schedule

The summary shows the number of booked shifts, scheduled hours, distinct named sites, and shifts with a mapped location.

Each day contains all shifts that start on that date. A shift card shows:

Status colours follow the active value order returned by the configured status picklist. This means custom active values appear automatically without changing the component.

Select a shift card to show that shift's location. Coordinates are used when available. If coordinates are empty, the component uses the configured site address paths. Select Open shift to navigate to the Shift record.

Configure field mappings

All relationship-dependent mappings are configurable in Lightning App Builder. The server validates every object, field, and relationship path with Salesforce describe information before it runs the query.

Property Default Description
Card title Booked shifts Heading displayed on the Lightning card.
Default horizon TODAY Horizon selected when the component loads.
Shift object API name b3s__Shift__c Object queried for the worker's shifts.
Shift Contact lookup field b3s__Contact__c Direct lookup field that relates the Shift to Contact.
Shift start field b3s__Scheduled_Start_Time__c Date/Time field used for horizon selection and sorting.
Shift end field b3s__Scheduled_End_Time__c Date/Time field used for time and duration display.
Shift status field b3s__Status__c Picklist field used for status labels, colours, and the legend.
Site name path b3s__Work_Site__r.Name Relationship path used for the Site name.
Job name path b3s__Work_Job__r.Name Relationship path used for the Job name.
Site latitude path b3s__Work_Site__r.b3s__Location__Latitude__s Relationship path used for map latitude.
Site longitude path b3s__Work_Site__r.b3s__Location__Longitude__s Relationship path used for map longitude.
Site address paths See the component default Comma-separated relationship paths used as the map fallback address.
Map zoom 14 Zoom level used for a selected shift location, from 1 to 22.

To use alternative Site or Job relationships, change the paths rather than modifying the component. A relationship path starts at the Shift object and uses relationship API names between each field, for example:

b3s__Work_Site__r.Name
b3s__Work_Job__r.Name

Permissions and result limits

The component respects record sharing and field permissions. A user only sees shifts and mapped values they are allowed to read.

The component returns up to 500 shifts for one horizon. If more records match, it displays a result-limit warning and asks the user to choose a narrower horizon.

Troubleshooting

The component reports a field path error

Open the Lightning record page in App Builder and check the configured API name. Use relationship API names, not field labels. Confirm that each path begins on the configured Shift object.

A shift says no location

Confirm that the Shift has a related Site and that either:

A status is missing from the legend

Confirm that the configured status field is a picklist and that the value is active. The legend is built from active picklist entries returned by field describe.

A shift is not shown

Confirm that the configured Contact lookup points to the current Contact and that the Shift start Date/Time falls inside the selected horizon. Shifts are selected by start time, not by overlap with the horizon.