Compliance dates: effective dating, grace periods, post-hire due dates, renewals and action fields

Compliance dates: effective dating, grace periods, post-hire due dates, renewals and action fields

What it is

Every Compliance Item (b3o__Compliance_Item__c) carries real, reportable dates that the engine calculates from settings on its Compliance Requirement (b3o__Compliance_Requirement__c). They answer four questions:

Question Item field
When was the credential obtained? b3o__Acquired_Date__c
When does it stop being valid? b3o__Expiry_Date__c
From when does an unfinished item break compliance? b3o__Enforcement_Date__c
What date do we show the candidate, and when do we remind them? b3o__Due_Date__c, b3o__Reminder_Date__c, b3o__Is_Due__c

Because they are fields, not calculations on screen, they can drive reports, list views, flows and reminders.

The problem it solves

Requirement settings

Set these in the Compliance Matrix Manager. The requirement editor is split into sections, top to bottom:

  1. Requirement: name, type, category, order, weight, expiry warning days (plus the Auto-Check Rule button for a Checklist Item).
  2. Evidence (Record Check only): evidence object, conditions and the expiry / acquired / title fields.
  3. Mandatory and approval: Is Mandatory and Approval Required. For a Record Check, ticking Approval Required reveals Approval Mode (Item, the default, or Field) and, in Item mode, Auto-Approve When / Auto-Reject When. Unticked, no approval settings are saved. Opening a requirement whose evidence configuration already sets an approval mode shows the box ticked, because the engine already requires approval for it.
  4. Visibility: Candidate Visible, Client Visible.
  5. Applicability: the Applicability Rule button. Applies on Successful Rule Evaluation and Hide When Not Applicable appear once a rule exists.
  6. Guidance: Guidance and Guidance Extended Details.
  7. Two collapsible sections, closed by default, each showing a one-line summary of what is configured: "Dates and renewal" (effective date and grace period, due after, renewal, due date rule) and "Approval Action Forms" (fields to complete on approve, reject and waive). A new requirement starts with Verification Notes (the console's comment box) required on all three actions.

The date and action settings can also be set directly on the requirement record. All are optional. A requirement with none of them behaves exactly as before.

Field Type What it does
b3o__Effective_Date__c Date The requirement is Not Applicable before this date.
b3o__Grace_Period_Days__c Number Calendar days after the Effective Date that existing contacts get before the requirement is enforced.
b3o__Grace_Date_Field__c Text Contact date field that decides who is "existing": a value before the Effective Date means existing. Blank uses b3o__Hire_Date__c.
b3o__Due_Anchor_Field__c Text Contact date field the requirement is due relative to, for example b3o__Hire_Date__c, b3o__Start_Date__c or your own first billable shift date field.
b3o__Due_Offset__c Number Days after the anchor date when the requirement becomes enforced.
b3o__Due_Offset_Unit__c Picklist Calendar Days (default) or Business Days.
b3o__Renewal_Frequency__c Number The item expires this long after its Acquired Date, when the evidence has no expiry date of its own.
b3o__Renewal_Unit__c Picklist Days, Months or Years.
b3o__Due_Date_Rule__c Text API name of a Compliance Due Date Rule (custom metadata) that calculates the candidate-facing Due Date of a finished item. Blank = the Expiry Date. See "Due date rules".
b3o__Action_Fields__c Long text (JSON) Compliance Item fields the specialist must complete on approve, reject or waive. See "Fields completed on an action".
b3o__Expiry_Warning_Days__c Number (default 30) Existing field. Also sets how many days before the Due Date the Reminder Date falls.

The package adds three Contact fields you can use as anchors or in rules: b3o__Hire_Date__c, b3o__Start_Date__c and b3o__Candidate_Status__c (New, In Progress, Active, Inactive, Terminated, Do Not Use). Any other Contact date or date/time field works, including fields from your own org. Relationship paths such as Account.Go_Live_Date__c are accepted.

Acquired date from the evidence

For Record Check requirements, the Evidence Configuration JSON accepts acquiredField next to expiryField:

{
  "object": "b3o__Certificate__c",
  "contactField": "b3o__Contact__c",
  "titleField": "Name",
  "acquiredField": "b3o__Start_Date__c",
  "expiryField": "b3o__End_Date__c"
}

Use the date the evidence was really obtained: the certificate issue date, or CreatedDate for a form, quiz or signed document. When the configuration has no expiryField, the newest evidence record is the match.

How each date is calculated

Acquired date

  1. The evidence acquiredField, when configured.
  2. Otherwise the date the specialist entered on approval.
  3. Checklist items: the day the item was ticked in the console.
  4. Manual items approved without date entry: the day of approval.

Expiry date

  1. The evidence expiryField, when configured. It always wins.
  2. Otherwise the expiry date the specialist entered on approval (Expiry Date is one of the requirement's approve action fields).
  3. Otherwise Acquired Date plus the Renewal Frequency.

An item whose Expiry Date has passed becomes Expired. This now applies to every requirement type, including Manual and Checklist items.

Enforcement date

The later of:

Until the Enforcement Date is reached the item keeps its normal status (usually Outstanding) but b3o__Is_Blocking__c is false. The assignment's b3o__Mandatory_Outstanding_Items__c and b3o__Is_Fully_Compliant__c therefore ignore it: the contact is compliant with an outstanding item. Once the date passes, the item blocks.

When a Due Anchor Field is set and the contact's date is still blank (not hired or started yet), the Enforcement Date is blank and the item is not enforced. It is still visible and can be completed early. To hide it until the date exists, add an applicability rule "anchor field is not blank" and tick Hide When Not Applicable.

Business days are defined per org, see "Business days and holidays".

Due date, reminder date and Is Due

Item status Due Date
Outstanding, Pending Review, Rejected The Enforcement Date.
Compliant, Expired The Expiry Date, or the result of the requirement's Due Date Rule.
Waived, Not Applicable Blank.

b3o__Reminder_Date__c is the Due Date minus Expiry Warning Days. b3o__Is_Due__c is true once the Due Date is today or earlier.

A Due Date Rule never changes the Expiry Date or the status. In the console a candidate sees a compliant item as "Renewal due" once its Due Date arrives and can submit again; the specialist still sees it as Compliant until the real expiry.

Business days and holidays

Business day offsets and due date rule adjustments use one calendar per org, defined in two places:

What Where Notes
Working days of the week Setup, Business Hours, the record marked Default A day with hours is a working day; a day with no hours is not. The hours themselves are not used.
Holidays Setup, Custom Metadata Types, Compliance Holiday (b3o__Compliance_Holiday__mdt), Manage Records One record per holiday.

Compliance Holiday fields:

Field Type What it does
Label / Name Text For example "Thanksgiving 2026".
b3o__Date__c Date The holiday.
b3o__Recurs_Annually__c Checkbox Same day and month every year (the year of Date is ignored), for example 25 December.

Important: a new Salesforce org ships with default Business Hours of 24 hours, 7 days a week. Until you clear the hours for Saturday and Sunday (or whichever days the client does not work), every day counts as a business day. The Holidays under Setup, Business Hours are not used by compliance.

Holidays are deployable metadata: move them between orgs with change sets or the Metadata API. The engine reads them once per transaction.

Due date rules

A Compliance Due Date Rule (b3o__Compliance_Due_Date_Rule__mdt) calculates the Due Date the candidate sees for a finished (Compliant or Expired) item. Create one record per rule under Setup, Custom Metadata Types, Compliance Due Date Rule. Every record appears in the requirement editor's Due date rule dropdown automatically.

Field Type What it does
Label / Name Text The Name (API name) is what requirements reference.
b3o__Description__c Text Plain-language explanation shown under the Due date rule dropdown in the requirement editor. Write it for the admin choosing the rule.
b3o__Formula__c Long text A Salesforce formula returning a Date, evaluated against the Compliance Item.
b3o__Business_Day_Adjustment__c Picklist None, Previous Business Day or Next Business Day. Moves the formula result when it lands on a non-working day or a Compliance Holiday.

Formula rules:

The package ships one rule, which you can edit:

Name Formula Adjustment Result
Last_Business_Day_Of_Previous_Month DATE(YEAR(b3o__Expiry_Date__c), MONTH(b3o__Expiry_Date__c), 1) - 1 Previous Business Day The last working day of the month before the expiry.

More examples:

Goal Formula Adjustment
30 days before expiry b3o__Expiry_Date__c - 30 None
First working day of the expiry month DATE(YEAR(b3o__Expiry_Date__c), MONTH(b3o__Expiry_Date__c), 1) Next Business Day
Two months before expiry, on a working day ADDMONTHS(b3o__Expiry_Date__c, -2) Previous Business Day
11 months after it was acquired ADDMONTHS(b3o__Acquired_Date__c, 11) None

Worked examples

Scenario Settings
Seizures training, due 3 business days after start, then every 2 years Due Anchor Field b3o__Start_Date__c, Due Offset 3, Unit Business Days, Renewal Frequency 2, Unit Years, evidence acquiredField = completion date
New state requirement from 1 January 2027, existing staff have until 1 April Effective Date 2027-01-01, Grace Period 90
New requirement for net new hires only Effective Date, plus an applicability rule "Hire Date on or after the effective date" (existing staff are then Not Applicable)
Annual credential shown as due on the last working day of the previous month Renewal Frequency 1, Unit Years, Due Date Rule Last_Business_Day_Of_Previous_Month
HR background check run in an external system Type Manual, Action Fields: Acquired Date and Expiry Date on approve
Paper I-9 documents to be seen within 30 days of hire (internal) Type Checklist Item, Candidate Visible off, Due Anchor Field b3o__Hire_Date__c, Due Offset 30

Fields completed on an action

b3o__Action_Fields__c lists, per console action, the Compliance Item fields the specialist must complete. In the Compliance Matrix Manager this is the "Approval Action Forms" section with one multi-select per action (On Approve, On Reject, On Waive).

{
  "approve": ["b3o__Acquired_Date__c", "b3o__Expiry_Date__c"],
  "reject": ["b3o__Verification_Notes__c"],
  "waive": ["Waiver_Reason__c"]
}

applyAction request:

{
  "endp": "applyAction",
  "itemId": "a1B...",
  "action": "approve",
  "fields": {
    "b3o__Acquired_Date__c": "2026-11-17",
    "b3o__Expiry_Date__c": "2027-11-17"
  }
}

Value formats: dates yyyy-MM-dd, date/times ISO 8601, checkboxes true or false, numbers as numeric strings, picklists by API value, multi-select values joined with ;.

Response: the standard success wrapper with the updated item, or an error wrapper such as Acquired Date is required.

Keeping the dates current

System.schedule('3B Compliance Daily Sweep', '0 0 2 * * ?', new b3o.ComplianceMatrixScheduler());
Database.executeBatch(new b3o.ComplianceMatrixRecalcBatch(
    'SELECT Id FROM b3o__Compliance_Assignment__c WHERE b3o__Active__c = true'), 5);

Reports and reminders

Need Filter on Compliance Items
Candidate reminders b3o__Reminder_Date__c = TODAY and b3o__Status__c not Waived / Not Applicable
Due or overdue for the provider b3o__Is_Due__c = true
Outstanding but not enforced yet (post-hire, grace period) b3o__Status__c = Outstanding, b3o__Is_Blocking__c = false, b3o__Is_Mandatory_Copy__c = true
Becoming enforced in the next 14 days b3o__Enforcement_Date__c = NEXT 14 DAYS and status not Compliant
Next renewal per credential b3o__Expiry_Date__c, grouped by requirement
Requirements that renew every 6 months Requirement b3o__Renewal_Frequency__c = 6 and b3o__Renewal_Unit__c = Months

Record-triggered flows on Compliance Item can use b3o__Reminder_Date__c, b3o__Due_Date__c and b3o__Enforcement_Date__c as scheduled path dates.

Permissions

All new fields are included in the Onboarding_Admin_Full_Permission permission set. Grant read access to the item date fields to any other permission set whose users report on them.

Known limits