By default a client timesheet is approved once, by any reviewer at the client account who can see it in Timesheet Approval (see Timesheeting app). Many clients need more control than that:
Timesheet Approvers add all three. An admin lists, per Job or per Site, which client contacts approve at step 1 and (optionally) step 2. The shift and expense triggers work out which list applies to each record, record it there, and enforce the order of approval on the server. A scheduled job sends each approver one message listing the timesheets and expenses waiting for them.
Expenses follow the same process. An expense on a placement uses the approvers of the placement's job (else its site), with the same steps, rules and restarts as a shift. See Expenses.
Without any Timesheet Approver rows nothing changes: shifts and expenses are approved once, account-wide, exactly as before. Two org-wide switches turn the features off: see Org switches.
approvalReminders block to the Timesheet Approval configuration and schedule the reminders on the Scheduled Jobs tab (see Reminders).That is all. Existing unapproved shifts of that job or site pick up the new route within minutes (a background batch re-stamps them).
Object b3s__Timesheet_Approver__c, tab Timesheet Approvers (in the 3B WFM and 3B VMS apps), related lists on the Job and Site page layouts. Records are numbered TA-00001. Sharing: Public Read/Write internally, Private externally.
| Field | API name | Type | Notes |
|---|---|---|---|
| Contact | b3s__Contact__c |
Lookup(Contact) | The approving client contact. Required (validation rule Contact_Required). |
| Job | b3s__Job__c |
Lookup(Job) | Set for a job-level approver. |
| Site | b3s__Site__c |
Lookup(Site) | Set for a site-level approver. Exactly one of Job or Site (validation rule Job_Or_Site). |
| Step | b3s__Step__c |
Picklist 1, 2 |
Required. Step 1 approves first, step 2 after step 1. |
| Active | b3s__Active__c |
Checkbox, default true | Inactive rows are ignored: they neither approve nor receive reminders. |
| Last Notified | b3s__Last_Notified__c |
DateTime | Stamped by the reminder job each time it messages this approver. Read only in practice. |
A pool is the set of active rows for one Job (or one Site) and one step. Any one member of a pool completes that step for the shift.
All five fields are set by the server. They are read only on the Shift page layout and in the shipped permission sets (WFM Admin can edit them, for data repair only).
| Field | API name | Type | Meaning |
|---|---|---|---|
| Approver Level | b3s__Approver_Level__c |
Picklist Job, Site |
Which pool applies. Blank = no approvers, legacy single account-wide approval. |
| Approval Steps Required | b3s__Approval_Steps_Required__c |
Number | The highest active Step in that pool (1 or 2). Blank when Approver Level is blank. |
| Approval Step | b3s__Approval_Step__c |
Number | The step currently waiting for approval. Blank when no approvers apply. |
| First Approved By Contact | b3s__First_Approved_By_Contact__c |
Lookup(Contact) | Who completed step 1 of a two-step chain. |
| First Approved Date | b3s__First_Approved_Date__c |
DateTime | When step 1 was completed. |
The same five fields exist on Expense (see Expenses).
The final approval keeps using the existing approval stamps (Approved By Contact, Approved Date, Approval Source; see Shift management studio, Approval audit).
| The shift's Job has active approver rows | The shift's Site has active approver rows | Approver Level | Who approves |
|---|---|---|---|
| Yes | Yes or no | Job | The Job's pools only |
| No | Yes | Site | The Site's pools |
| No | No | blank | Anyone allowed today (account-wide, single step, unchanged) |
Job approvers win over site approvers completely: a job with only a step 1 row is a one-step job, even if its site has two steps.
The route is stamped on the shift when:
When the re-stamp batch moves a shift to another pool, or to fewer steps than the step it was waiting at, its chain restarts at step 1. When no approvers are left, the shift falls back to legacy approval.
A shift with Approval Steps Required = 1 is approved once, but only by a member of the step 1 pool. Anyone else at the account who tries to approve it gets You are not an approver for approval step 1 of this shift.
Submitted, Approval Step 1.Rules enforced on the server for portal and community approvals:
You are not an approver for approval step {n} of this shift.You approved step 1 of this shift; step 2 needs a different approver.| Event | Result |
|---|---|
| Reject, Query, Resubmit or Unapprove (any Approval Status change other than an approval) | Approval Step back to 1, First Approved By / Date cleared |
| Job or Site changed | Route re-stamped, chain restarts |
| Actual Start or Actual End changed while the shift waits at step 2 | Chain restarts: the step 1 approver must see the new times |
| Re-stamp batch moved the shift to another pool or below its current step | Chain restarts |
Internal (Standard licence) users, for example finance in the Shift management studio, approve a pooled shift in one action, at any step, without being in a pool. This is the override and escalation path when an approver is away. The approval is stamped with Approval Source Internal (or Internal on behalf of Client from the studio's on-behalf action), so reports can tell it apart from a client approval.
Automation with no acting contact (a Flow or Apex running as an internal or integration user) also approves in one go.
The shipped configuration scopes each approver to their own pools:
outstandingClause) follow the same split, for Submitted and Queried shifts at the approver's step.Each card in a two-step chain shows an Approval row: Step 1 of 2, or Awaiting 2nd approval at step 2. Approved shifts show none. The shipped card also lists First approved by. After every approve or reject the list is reloaded from the server, because an approval at step 1 leaves the shift Submitted.
Bulk approve runs record by record. If one record fails (for example a step the contact is not in), the error is shown and the records saved before it are reloaded behind the modal.
An expense (b3s__Expense__c) runs the same chain, with the same pools, the same five fields and the same error messages.
b3s__Working_Pattern__c). Two lookups on Expense, Job (b3s__Job__c) and Site (b3s__Site__c), are stamped from the placement on every save and can't be set by hand. An expense with no placement has no job or site, so it has no route and is approved once, account-wide, as before. A shift-only expense (Shift set, no placement) is treated the same way.Approver_Level__c = null), and the expense cards show the same Approval step row (approvalStepFieldPath / approvalStepsRequiredFieldPath on the expense schedulable).Ceiling: when a placement's own Job or Site changes later, its existing expenses keep the old values until they are saved again.
Two checkboxes on the Scheduler hierarchy custom setting (b3s__Scheduler__c, Setup > Custom Settings > Scheduler > Manage), both off by default. They are read once per transaction for the running user (getInstance()), so a profile- or user-level value overrides the org default.
| Field | When ticked |
|---|---|
Disable Timesheet Approval Chain (b3s__Disable_Timesheet_Approval_Chain__c) |
Timesheet Approvers are ignored. There are no pool checks and no re-stamp, and one approval from anyone allowed to approve timesheets for the account is final. Every shift or expense saved while it is ticked has its five chain fields cleared (unless it was already Approved, which keeps its history), so the legacy Approver_Level__c = null portal clauses show it to account reviewers again. Open records nobody saves keep their old stamps (and stay hidden from account reviewers) until they are next saved, so save them (for example a mass edit of the open shifts and expenses) after ticking it. Untick it to go back: routes are stamped again when a record is next submitted or moved, or when an approver row changes. |
Disable Timesheet Auto-Submit (b3s__Disable_Timesheet_Auto_Submit__c) |
Recording a shift's Actual End no longer submits it (Auto-submit). |
Both are shown, read only, on the Workflow settings card.
When Actual End is set on a shift for the first time and the shift has no Approval Status yet, the server submits it automatically if its job:
Requires Client Approval = Yes, or blank and the Account's checkbox ticked), andRequires Worker Submission = No, or blank and the Account's checkbox unticked).The shift goes straight to Submitted (and into the step 1 queue when approvers apply), so the client can approve without waiting for a submission nobody will make.
Behaviour change. This applies to every org with that combination of settings, with or without Timesheet Approvers. Actual End is set by a Clock app clock-out, a Terminal clock-out, a third-party clock (Time capture integration), a Timesheet Submission save, an import, or an internal user editing times. From this release those shifts arrive in Timesheet Approval already Submitted (the worker can no longer edit them from Timesheet Submission, whose sample gates allow edits only while Approval Status is blank). Orgs that relied on a blank status until someone acted should turn on Requires Worker Submission for those jobs or accounts.
Shifts with no Job, shifts that already have an Approval Status, and later edits to an Actual End that was already set are not auto-submitted. Tick Disable Timesheet Auto-Submit on the Scheduler custom setting to turn auto-submit off for the org (see Org switches).
b3s.TimesheetApprovalReminderJob sends each approver one message listing the shifts and expenses waiting for their step. It is a global, schedulable class: you schedule it once per step at the times you want.
Source__c = Scheduled, Rule__c = timesheet_approval_step_<n> or timesheet_approval_ready_step_2) with one Outbound Notification per approver, and hands it to the Bulk Notification Engine's send job. Push is dispatched straight away.Because delivery goes through the Bulk Notification Engine, every channel your org has set up works: native Email, Push, and Flow or Apex plugin channels such as SMS, WhatsApp or SendGrid (see Scheduling notifications). Campaigns and notifications are ordinary records: report on them, or open them to see what was sent.
Shifts with no approvers (legacy account-wide approval) never produce reminders. When nobody is waiting, the run creates nothing.
| Mode | Constructor | Who is messaged |
|---|---|---|
| Reminder | new b3s.TimesheetApprovalReminderJob(1) or (2) |
Every active approver of that step whose pool has Submitted shifts waiting at that step. Sent every time the schedule fires. |
| Ready (step 2 only) | new b3s.TimesheetApprovalReminderJob(2, true) |
Step 2 approvers of a pool that has no Submitted step 1 shifts or expenses left, and only when at least one of its records had step 1 approved after the approver's Last Notified. Each batch of step 1 approvals is announced once. |
Ready mode lets you schedule an hourly check that says "step 1 is done, your turn" as soon as the line manager finishes, instead of waiting for the next fixed reminder. Any step 2 message (reminder or ready) moves Last Notified, so a ready notice is not repeated for step 1 approvals already covered by a reminder. Ready mode uses the step 2 template.
Schedule the reminders from the Scheduled Jobs tab (3B WFM or 3B VMS app; needs the WFM Manage Scheduled Jobs custom permission, granted by WFM Admin). See Scheduled jobs for the full guide.
The list on the same tab shows the next and last run of each reminder job and has a Stop button. Run once now sends one round immediately (real messages) to test your setup.
Scripted setups can still schedule the class from Developer Console, Execute Anonymous, as the admin who should own the job. Jobs scheduled this way also appear on the tab:
// Step 1 approvers every Monday at 12:00
System.schedule('TS approval step 1', '0 0 12 ? * MON', new b3s.TimesheetApprovalReminderJob(1));
// Step 2 approvers every Tuesday at 10:00
System.schedule('TS approval step 2', '0 0 10 ? * TUE', new b3s.TimesheetApprovalReminderJob(2));
// Optional: hourly "step 1 is done" notice to step 2 approvers
System.schedule('TS approval ready', '0 0 * * * ?', new b3s.TimesheetApprovalReminderJob(2, true));
Add a root approvalReminders block to the Timesheet Approval Component Configuration (b3s__Component_Configuration__mdt, field b3s__JSON__c). The shipped sample:
"approvalReminders": {
"channels": ["Email"],
"templateKeys": { "1": "timesheet_approval_step_1", "2": "timesheet_approval_step_2" },
"link": "",
"languageFieldPath": null,
"maxShiftsPerMessage": 50
}
| Key | Required | Notes |
|---|---|---|
channels |
Yes | Notification Channel developer names, for example ["Email", "Push", "SMS"]. Every message goes out on all of them. |
templateKeys |
Yes | Notification Template Key per step ("1", "2"). The plain key must exist and be active; it is the fallback language. |
link |
No | Deep link on every message (push click action, available to Flow channels as Link__c), for example your Timesheet Approval portal page. Max 255 characters. |
languageFieldPath |
No | A Contact field holding the recipient's language, for example b3s__Language__c. Leave it out (or null) to use the contact's active portal user language. |
maxShiftsPerMessage |
No | How many shifts the <repeat> block lists, and separately how many expenses <repeatExpenses> lists (default 50 each). The count tokens still report the full numbers. |
Templates are Notification Template records (b3s__Notification_Template__c), the same object the scheduler's Notification Center uses. Create one template per step, keyed as below, plus a row per language you support.
Translations are separate template rows whose Key is <key>:<language>:
| Key | Used for |
|---|---|
timesheet_approval_step_1 |
Default (any language without its own row) |
timesheet_approval_step_1:fr |
French, and any French locale (fr_CA, fr_FR) without its own row |
timesheet_approval_step_1:fr_ca |
Canadian French only |
The recipient's language is the Contact field named by languageFieldPath, else the LanguageLocaleKey of the contact's active portal user, else the plain key. Matching ignores case and treats - and _ alike, then falls back from fr_CA to fr, then to the plain key. A language row must be Active to be used.
Tokens (plain text, no HTML):
| Token | Value |
|---|---|
{firstName}, {lastName} |
The approver contact |
{contact.<fieldPath>} |
Any field of the approver contact, for example {contact.Account.Name} |
{countShifts} |
All shifts waiting for this approver |
{countChanges} |
Shifts listed in this message (capped by maxShiftsPerMessage) |
<repeat> ... </repeat> |
Repeated once per listed shift |
{record.<fieldPath>} |
Inside <repeat>: any shift field, for example {record.b3s__Contact__r.Name} |
{countExpenses} |
All expenses waiting for this approver |
<repeatExpenses> ... </repeatExpenses> |
Repeated once per listed expense (reminders only; the engine's single <repeat> stays for shifts) |
{expense.<fieldPath>} |
Inside <repeatExpenses>: any expense field, for example {expense.b3s__Category__c}, {expense.b3s__Total_Value__c} |
Example step 1 body (from the seed script):
Hi {firstName},
{countShifts} timesheet(s) are waiting for your approval:
<repeat>- {record.b3s__Contact__r.Name}, {record.b3s__Work_Site__r.Name}, {record.b3s__Absolute_Start_Time__c}
</repeat>
Please review them in the portal.
To list expenses as well, add a second block (an empty one renders nothing when no expense waits):
{countExpenses} expense(s) are waiting too:
<repeatExpenses>- {expense.b3s__Contact__r.Name}, {expense.b3s__Category__c}, {expense.b3s__Total_Value__c}
</repeatExpenses>
Date and time fields render in the timezone of the user who scheduled the job. To show the site's local time instead, use the site-local stamps, for example {record.b3s__Site_Scheduled_Start_Date__c} {record.b3s__Site_Scheduled_Start_Time__c} (see Shift site-local times).
The studio shows the chain under the status badge of every multi-step shift: Step 2 of 2 ยท 1st: Jane Doe, 7 Jul while open, just the first approver once finished (hover for the full date and the pool level). The Awaiting final approval exception (awaitingFinalApproval) lists shifts where step 1 is done and step 2 is outstanding. An internal approval from the studio completes the chain in one go. See Shift management studio.
b3s__Timesheet_Approver__c in a sub-query, and the object is Private externally, so share the rows with those users (a sharing set or sharing rule on the Contact or the job's account). Session-key portal users are not affected.| Symptom | Cause |
|---|---|
You are not an approver for approval step 1 of this shift. |
The contact is not an active member of that pool (check the Job first: job rows win over site rows). A step 2 approver also gets this on a shift not yet submitted, because it is still at step 1. |
You approved step 1 of this shift; step 2 needs a different approver. |
The contact is in both pools. Another step 2 member, or an internal user, must approve. |
| Approved, but the shift is still Submitted | Step 1 was approved; the shift waits at step 2. |
| A reviewer no longer sees some timesheets | Their jobs or sites now have approvers and they are in no pool. Add them, or remove the rows. |
| Approver Level stays blank after adding rows | The re-stamp batch has not run yet, failed, or the row is inactive or missing a Contact or Step. Check Setup > Apex Jobs. |
| No reminder arrived | The approver row is inactive, no Submitted shift waits at that step, the shift has no worker, the channel is not set up, or the scheduled run failed (Setup > Apex Jobs). |
| Reminder in the wrong language | No active <key>:<language> row matches, or the language field / portal user language is blank. |
| Shifts arrive already Submitted | Auto-submit: the job requires client approval and not worker submission. Tick Disable Timesheet Auto-Submit to stop it org-wide. |
| An expense has no Approver Level | It has no placement, or the placement's job and site have no approvers. |