Hato Hone St John Customer Central

SFDocs Production Runbook

How the Documents tab goes from UAT to Production: what to do before, what is deployed, what to do after, and which jobs run.

  • From HHSJ-UAT to STJOHN-PROD
  • Scope Internal users only: no site, no help, no history load
  • Status as at 01-Dec-26
Contents
  1. Overview
  2. Run order
  3. Pre-deployment
  4. Components
  5. Validate and deploy
  6. Post-deployment
  7. Jobs and batches
  8. History load
  9. Not included
  10. Rollback
  11. Evidence

Overview

This release puts the Documents tab on the Account and Contact pages in Production. It deploys 64 new components and adds 4 access entries to one existing profile. Users see nothing new until the tab is added to the two pages by hand.

  • 65Components64 new, 1 existing profile changed
  • 27Package membersNamed in package.xml
  • 16Pre-deployment steps6 done, 4 in progress, 6 to do
  • 12Post-deployment steps4 change Production

Guardrail (the release lead, 30-Nov-26). No code change, data update or any change in Production without the release lead's confirmation. Every step that changes Production is marked. The release lead runs each one, or confirms it first; one confirmation does not carry to the next step. Claude only reads in Production.

What users get on day one, and known limits

  • A Documents tab on Account and Contact: list, filter, search, open a PDF, download several as one ZIP. Every view and download is logged.
  • History is not loaded. The tab lists only documents filed after the deploy. Production filed 10,321 matching PDFs in the 7 days to 30-Nov-26, about 1,470 a day.
  • Invoices named OrderInvoice_ (Business Central) are not picked up. Production filed none in the 7 days to 30-Nov-26.
  • A certificate is skipped if its PDF is filed while the booking is not yet at Certificate Sent and the status changes later. 2 cases in UAT; none seen in Production in the 21 days to 27-Nov-26.
  • The tab is shown by rule to three profiles: St John General User, System Administrator, St John System Administrator. St John System Administrator - Read Only (2 users) is not covered.

Run order

  1. Finish the UAT proof in the browser. The profile access and the tab rule are deployed in UAT; the three-login check is still open (P-14).
  2. Validate in Production, check only, all local tests. About 1 h 40 min. Gives the Id for the quick deploy (P-11).
  3. Quick deploy in the CAB window. 64 new components and 4 access entries on the profile. Users see nothing new yet (D-01).
  4. Jobs, admin access, first-document check. Documents start to register as new PDFs are filed (D-02 to D-05).
  5. Add the tab, with its profile rule, to the two record pages. The 117 profile users and the admins see the Documents tab (D-07).
  6. Smoke test, monitoring, hand-over (D-08 to D-12).
16 steps

Pre-deployment

Nothing in this section changes Production.

P-01Governance

CAB approval for this scope: Documents tab on the Account and Contact record pages for internal users. Window date and peer reviewer named.

Done whenCAB approved; window date and reviewer written in this row.

Not done
Owner
The release lead
Org
-
When
Before the window
P-02Scope

Scope frozen. In: the 65 components on the Components sheet (64 new, plus 4 access entries on the St John General User profile). Out: DOCS site, portal help, booking handler update (the release lead 27-Nov: "Yes, leave it out"), history load. See Not included.

Done whenComponents and Not included sheets match what is validated in P-11.

Done
Owner
The release lead
Org
-
When
30-Nov-26
P-03Package

Help taken out of the package. The release lead confirmed 30-Nov-26 ("help is only for site"). Three edits applied in a new folder, Workspaces/SFDocs_Prod_Internal_Bundle_2026-11-30: (1) package.xml: member DocsHelpController removed; (2) Documents_Admin: its class access removed (4 lines); (3) DocumentPipeline_Test: test method helpControllerGuardsNonContactUser removed (12 lines), the only code that called the class. The class file itself is not in the new folder. No reference to it is left in any deployable file except one comment line in the test class. The 27-Nov folder (27 members) is kept unchanged.

Done whenDone 30-Nov-26. UAT check-only dry run 0AfAD00000VZHli0AH: Succeeded, CheckOnly true, 64 of 64, no tests.

Done
Owner
The release lead confirmed; Claude applied
Org
Local files
When
30-Nov-26
P-04Package

Documents_Admin can now read every field on the queue (11 fields) and on the access log (6 fields). The release lead confirmed 30-Nov-26. Done by switching on View All Fields for DocumentStaging__c and DocumentAccessLog__c in the set, the same way the set already covers Document__c: two lines changed, read only, no edit access added. New folder: Workspaces/SFDocs_Prod_Internal_Bundle_2026-11-30_v2. This goes beyond the UAT copy, where both are still off, so the read on these two objects has not been seen working in an org yet; the same setting does work on Document__c in UAT.

Done whenDone 30-Nov-26. UAT check-only dry run 0AfAD00000VZIpp0AH: Succeeded, CheckOnly true, 64 of 64, no tests. First real proof of the read is D-05.

Done
Owner
The release lead confirmed; Claude applied
Org
Local files
When
30-Nov-26
P-05Package

Decision (the release lead, 30-Nov-26): keep as UAT. Documents_Admin keeps its read on Sites_Header__c and 7 of its fields (site content object, already in Production). No package change. Checked in Production 30-Nov-26, query only: the object and all 7 fields exist (Background_Colour__c, Image_Link__c, Logo_Asset_Name__c, Logo_Placement__c, Logo_Public_Url__c, Title_Alignment__c, Title__c), so the set will deploy.

Done whenDone 30-Nov-26. Package unchanged (v2 folder).

Done
Owner
The release lead
Org
Local files
When
30-Nov-26
P-06Access

Decision (the release lead, 30-Nov-26): access by profile, not by permission set. The St John General User profile gets the access Documents_Support carries, so all 117 active users on it see the tab and the documents: CSC 37, Service Line Administrator 32, Finance Administrator 28, All 12, Youth 7, Sales 1. Admins (System Administrator 27, St John System Administrator 2) already hold View All Data and Author Apex and need no grant; St John System Administrator - Read Only (2) is not covered. The tab gets a rule by profile so other users of the two pages do not see it (D-07). Package: new folder Workspaces/SFDocs_Prod_Internal_Bundle_2026-11-30_v3 with a profile file of 4 entries. This is the first change to an existing Production component in this release, and the profile route was deployed to UAT on 30-Nov-26 (P-14).

Done whenDone 30-Nov-26. UAT check-only dry run 0AfAD00000VZVVJ0A5: Succeeded, CheckOnly true, 65 of 65, no tests. UAT proof: see P-14.

Done
Owner
The release lead decided; Claude built
Org
Local files
When
30-Nov-26
P-07Baseline

Production state, queries only. Result 30-Nov-26: none of the 64 new components exist; the St John General User profile exists (last changed 25-Nov-26) and holds no Documents access; no trigger on ContentDocumentLink or ContentVersion; no Documents_* permission sets; no Docs% scheduled jobs; static resources jszip (33,954 bytes, 18-Jun-26) and zip only. Unchanged since 27-Nov.

Done whenSame result on the window day.

In progress
Owner
Claude (read only)
Org
STJOHN-PROD
When
30-Nov-26; repeat on the window day
P-08Baseline

Things the package relies on exist in Production: ContactAssetRole__c with Role__c, Type__c, Status__c, Description__c, Service_Start_Date__c, Service_End_Date__c, Contact__c, Lead__c, Asset__c; Asset.OrderItem__c; Account.STJAccountNumber__c; AccountContactRelation; Sites_Header__c with the 7 fields named in Documents_Admin (named by the permission set only; no code in the package reads it; re-checked 30-Nov-26). Asset.SBQQ__OrderProduct__c is absent in UAT and Production; the generator checks before using it.

Done whenAll present (checked 30-Nov-26).

Done
Owner
Claude (read only)
Org
STJOHN-PROD
When
30-Nov-26
P-09Baseline

UAT has not moved since the bundle was built. Fresh retrieve 30-Nov-26: 85 of 86 files identical to the 27-Nov bundle; the one difference is the intended Documents_Admin trim (DocumentService access removed).

Done whenStill identical just before P-11.

In progress
Owner
Claude (read only)
Org
HHSJ-UAT
When
30-Nov-26; repeat before P-11
P-10Backup

Save Production copies before any change: Account_Record_Page (last changed 24-Sep-26 NZ time) and Contact_Record_Page (24-Nov-26) by metadata retrieve, the St John General User profile (retrieved together with the objects and classes it refers to, so the copy is complete), the scheduled job list, and the jszip resource details. Kept in the Bridge for rollback.

Done whenTwo page files, the profile and the job list saved, dated.

Not done
Owner
Claude (read only), on the release lead's word
Org
STJOHN-PROD
When
T-1 day
P-11Tests

Production check-only validation with all local tests (command on the Summary sheet). Production will not validate Apex without tests, and named tests fail the 75% per-class rule (QA 17-Oct-26: DocumentGenerator 58.5%, DocumentReconciliationBatch 69.8%). Allow about 1 h 40 min: the two 3,704-test validations in Production on 26-Nov-26 took 1 h 28 and 1 h 39.

Done whenSucceeded, CheckOnly true, 65 of 65 components, 0 test failures. JSZip reported as Created, not Changed. Validation Id written here.

Not doneNo (check only)
Owner
The release lead
Org
STJOHN-PROD
When
T-2 days
P-12Tests

Keep the quick deploy alive. A validation can be quick-deployed for 10 days, and any other deploy to Production in between cancels it. Check DeployRequest just before the window; if another deploy has landed, repeat P-11.

Done whenNo Production deploy between the validation and the window.

Not done
Owner
The release lead
Org
STJOHN-PROD
When
Window day
P-13Access

Agree the lists. Documents_Support: nobody in this release; access comes with the St John General User profile (117 active users, P-06). Documents_Admin: named admins only, and the list must include whoever runs the checks in D-05 and D-09.

Done whenAdmin list agreed and saved.

Not done
Owner
The release lead
Org
-
When
T-2 days
P-14Sign-off

UAT sign-off by a real CSC user. Proven 26-Nov-26 as a CSC user: the list loads, 44 of 44 documents on Glen Nevin Household. Not yet confirmed in the browser: View opens the PDF, Download, multi-file ZIP, access-log row written. Profile route in UAT, 30-Nov-26, on the release lead's go: the profile file was deployed (0AfAD00000VZVjp0AH) and the profile differs from its before-copy by the 4 entries only (object, field, class, tab and user permissions, layout assignments, record types, apps and login IP ranges compared). By query, three users on the profile with no permission set (CSC, Finance Administrator, Service Line Administrator) can read the document rows and the PDF files; a Telecare user cannot read the rows; an admin with no set can. The tab rule was deployed to both pages (0AfAD00000VZRYA0A5). Still to do in the browser: the tab shows for the three profiles and for no other; list, View, Download and ZIP work for a profile user. The browser check waits for the release lead to sign in to UAT.

Done whenAll four confirmed in the browser by the reviewer; the tab rule and the profile route seen working in the browser.

In progress
Owner
CSC reviewer
Org
HHSJ-UAT
When
Before CAB
P-15Review

Blast radius of the new file trigger. It is the first trigger on ContentDocumentLink in Production, so it runs for every file linked anywhere. Claude's read of the code, 30-Nov-26: after insert only; returns with no query unless the file is linked to an Order or a booking; then one query; starting the background job is guarded by the limit check. One unguarded statement: the insert of the queue rows. If that insert ever failed, the Invoice_ / Cert_ file link itself would fail. Volume: 10,321 matching PDFs filed in Production in the 7 days to 30-Nov-26. Second unguarded statement, found 30-Nov-26: the call that starts the background job (handler line 74). If the org ever used up its daily allowance of background jobs (250,000; about 100,000 in use), that call would be refused and, by a reading of the code that is not tested, the file link would fail too. Day to day SFDocs adds about 1,470 jobs. Open gate since the 23-Nov release plan.

Done whenThe release lead and the developer accept the review, or the insert is guarded in a later package.

In progress
Owner
Release lead + developer
Org
Local
When
Before P-11
P-16Comms

Tell the CSC team before go-live: where the tab is, that it starts empty and fills as new documents are filed (history is not loaded), and who to contact. The CSC guide was published 17-Oct-26.

Done whenMessage sent by the release lead.

Not done
Owner
The release lead + CSC lead
Org
-
When
T-1 day
65 components

Components to deploy

A deploy result shows 65: the 27 members named in package.xml plus the 38 fields inside the three objects.

  • Objects 3
  • Fields 38
  • Page layouts 3
  • Lightning pages 2
  • Trigger 1
  • Apex classes 11
  • Lightning components 3
  • Static resource 1
  • Permission sets 2
  • Profile 1
#TypeAPI nameIn ProductionWhat it does
1ObjectsDocument__cNewThe register: one row per customer document, pointing at the file (no file copy). Private sharing, field history on.
2ObjectsDocumentStaging__cNewProcessing queue: one row per PDF waiting to be registered, with attempt count and failure note.
3ObjectsDocumentAccessLog__cNewAudit: one row each time a staff member views or downloads a document.
4Page layoutsDocument__c-Document LayoutNewRecord layout for a document row.
5Page layoutsDocumentStaging__c-Document Staging LayoutNewRecord layout for a queue row.
6Page layoutsDocumentAccessLog__c-Document Access Log LayoutNewRecord layout for an access-log row.
7Lightning pagesDocument_Record_PageNewLightning record page for a document row.
8Lightning pagesDocument_Access_Log_Record_PageNewLightning record page for an access-log row. Needed: the object's View action points at it.
9TriggerContentDocumentLinkTriggerNewRuns when a file is linked to a record (after insert). First trigger on file links in Production. See P-15.
10Apex classesContentDocumentLinkTriggerHandlerNewKeeps only PDFs linked to an Order (Invoice_, CreditNote_, DonationRcpt_) or a booking (Cert_) and queues them. Does nothing for any other file.
11Apex classesDocumentStagingProcessorNewBackground job that works the queue, one row at a time, up to 3 attempts.
12Apex classesDocumentGeneratorNewBuilds the Document__c row from the Order or the booking. Certificates: Primary + Attendee + status CS only.
13Apex classesDocumentStagingSchedulerNewSchedulable for the 15-minute sweep of the queue.
14Apex classesDocumentReconciliationBatchNewNightly check of the last 7 days. Writes a summary to the debug log only: no email, no data change.
15Apex classesDocumentBackfillBatchNewLoads historical documents. Ships because DocumentPipeline_Test calls it; does nothing until someone runs it. NOT run in this release.
16Apex classesDocumentAdminServiceNewServes the Documents tab (search by Account or Contact, open, download) and writes the access-log rows.
17Apex classesDocumentSearchFiltersNewFilters and paging for the tab (20 rows a page, 200 at most).
18Apex classesDocumentTestFactoryNewTest data builder.
19Apex classesDocumentGenerator_TestNewTests for the generator.
20Apex classesDocumentPipeline_TestProd copyTests for the trigger handler, queue, batches and the tab service. Prod copy: the one help test method removed (P-03, the release lead confirmed 30-Nov-26).
21Lightning componentsdocsAccountDocumentsNewThe Documents tab itself. Exposed for Account, Contact and Order record pages.
22Lightning componentsdocsListColumnsNewColumn definitions used by the tab.
23Lightning componentsdocsEmptyNewEmpty-state panel used by the tab.
24Static resourceJSZipNewJSZip v3.10.1 (JavaScript, 97,630 bytes) for the multi-file ZIP download. Different resource from Production's existing jszip (zip archive, 33,954 bytes); both sit side by side in QA and UAT.
25Permission setsDocuments_SupportNewFor CSC users: classes DocumentAdminService + DocumentSearchFilters; Document__c Read + View All Records; DocumentAccessLog__c Read + Create. Not assigned in this release: the St John General User profile carries the same access (P-06). Kept for a single user outside that profile.
26Permission setsDocuments_AdminProd copyFor admins: 6 classes; full access to Document__c, edit on the queue, read + create on the access log; View All Fields on all three; read on Sites_Header__c. Prod copy: DocumentService access removed (27-Nov); help access removed (P-03, 30-Nov-26); View All Fields added on the queue and the access log (P-04, 30-Nov-26). Sites_Header__c read kept as in UAT (P-05).
27ProfileSt John General UserChanges existingExisting Production profile with 117 active users (CSC 37, Service Line Administrator 32, Finance Administrator 28, All 12, Youth 7, Sales 1). The package file holds 4 entries only: class access to DocumentAdminService and DocumentSearchFilters; Document__c Read + View All Records; DocumentAccessLog__c Read + Create. This is the access Documents_Support carries. Nothing else of the profile is in the file. Production copy last changed 25-Nov-26: back it up first (P-10).

Fields inside the three objects

Document__c  21 fields
FieldLabel and type
Account__cAccount. Lookup(Account). Required.
AttendeeName__cAttendee Name. Text(255).
ContactAssetRole__cContact Asset Role. Lookup(ContactAssetRole__c).
ContentDocumentId__cContent Document Id. Text(18). Required. External ID.
DisplayName__cDisplay Name. Text(255). Required.
DocumentNumber__cDocument Number. Text(40). External ID. Unique.
DocumentType__cDocument Type. Picklist. Required.
ExpiryDate__cExpiry Date. Date.
FileName__cFile Name. Text(255).
IssuedDate__cIssued Date. Date. Required.
OrderNumber__cOrder Number. Text(80).
Order__cOrder. Lookup(Order).
ParentRef__cParent Ref. Text(18). Required.
ProductName__cProduct Name. Text(255).
ServiceRecipientContact__cService Recipient (Contact). Lookup(Contact).
ServiceRecipientLead__cService Recipient (Lead). Lookup(Lead).
SourceBatchRef__cSource Batch Ref. Text(40).
SourceCreatedDate__cSource Created Date. DateTime. Required.
SourceRunType__cSource Run Type. Text(40).
Status__cStatus. Picklist. Required.
SupersededBy__cSuperseded By. Lookup(Document__c).
DocumentStaging__c  11 fields
FieldLabel and type
AttemptCount__cAttempt Count. Number(4,0).
ContentDocumentId__cContent Document Id. Text(18).
ContentVersionId__cContent Version Id. Text(18).
DocumentNumber__cDocument Number. Text(40). External ID.
Document__cDocument. Lookup(Document__c).
ErrorDetail__cError Detail. LongTextArea(32768).
IsBackfill__cIs Backfill. Checkbox.
LinkedEntityId__cLinked Entity Id. Text(18).
ParentType__cParent Type. Picklist.
ProcessingStatus__cProcessing Status. Picklist. Required.
RouteHint__cRoute Hint. Picklist.
DocumentAccessLog__c  6 fields
FieldLabel and type
AccessType__cAccess Type. Picklist.
AccessedAt__cAccessed At. DateTime.
AccessedBy__cAccessed By. Lookup(User).
AccessedFrom__cAccessed From. Text(40).
Document__cDocument. Lookup(Document__c).
IPAddress__cIP Address. Text(45).

Two files differ from UAT on purpose. Documents_Admin has the site and help class access removed, and View All Fields added on the queue and the access log. DocumentPipeline_Test has the help test method removed. The profile file holds 4 entries only; a real deploy of it to UAT on 30-Nov-26 changed those 4 entries and nothing else.

Validate and deploy

The release lead runs these from the bundle folder. The validation and the quick deploy are one package: nothing is rebuilt in between.

Bundle folder
ClaudeDev/_SFDocs/Workspaces/SFDocs_Prod_Internal_Bundle_2026-11-30_v3

27 members, 65 components. The 27-Nov, 30-Nov (first) and v2 folders are superseded: do not deploy from them.

P-11 ValidateSTJOHN-PRODCheck only
sf project deploy validate -x manifest/package.xml -l RunLocalTests -o STJOHN-PROD --wait 240

Production will not validate Apex without tests, and named tests fail the 75% per-class rule. Allow about 1 h 40 min. Expect Succeeded, CheckOnly true, 65 of 65, 0 test failures.

D-01 Quick deploySTJOHN-PRODChanges Production
sf project deploy quick --job-id <validation Id from P-11> -o STJOHN-PROD --wait 60

Or the Quick Deploy button in Setup, Deployment Status. A validation can be quick-deployed for 10 days; any other deploy to Production in between cancels it (P-12).

12 steps

Post-deployment

Steps marked Changes Production are the release lead's to run, or to confirm one at a time.

D-01Deploy

Quick deploy of the validation from P-11, in the CAB window (command on the Summary sheet). Same package, same Id; nothing is rebuilt. After this step users see nothing new: no tab and no jobs. The 117 users on the profile hold the access from this moment but have nowhere to use it until D-07.

Done whenDeployRequest Succeeded, CheckOnly false, 65 of 65 components.

Not doneChanges Production
Owner
The release lead
Org
STJOHN-PROD
When
Window
D-02Verify

Read back the 65 components from Production and compare with the package (retrieve and diff, read only). Also: the St John General User profile differs from its P-10 copy by the 4 entries only; ContentDocumentLinkTrigger is Active; jszip unchanged (33,954 bytes, 18-Jun-26); ContactAssetRoleTriggerHandler still the 25-Nov-26 version.

Done whenRead-back equals the package; nothing else changed.

Not done
Owner
Claude (read only), on the release lead's word
Org
STJOHN-PROD
When
Straight after D-01
D-03Jobs

Run scripts/schedule_jobs.apex once (anonymous Apex). Creates Docs Staging Sweep :00, :15, :30, :45 and Docs Reconciliation Nightly at 02:00. The jobs run as the user who runs the script, in that user's time zone.

Done when5 jobs named Docs% in state WAITING.

Not doneChanges Production
Owner
The release lead
Org
STJOHN-PROD
When
After D-02
D-04Access

Assign Documents_Admin to the named admins (list from P-13).

Done whenAssignments equal the agreed list.

Not doneChanges Production
Owner
The release lead
Org
STJOHN-PROD
When
After D-02
D-05Pipeline check

First real documents, queries only. Production filed about 1,470 matching PDFs a day in the week to 30-Nov-26, so the first should register within minutes in business hours. Check: queue rows are created and go to Done; Document__c rows appear with Number and Order filled; nothing Failed. Reading the queue fields: P-04 (done) gives it to holders of Documents_Admin, so the user who runs this check must be on the D-04 list.

Done whenDocument__c rows present; queue rows Done; 0 Failed.

Not done
Owner
Claude (read only), on the release lead's word
Org
STJOHN-PROD
When
Within 1 hour of D-01
D-06Access

No assignment step. The release lead 30-Nov-26: access comes with the St John General User profile, which the deploy (D-01) has already changed. Documents_Support is deployed but assigned to nobody. Check by query: the profile shows Document__c Read + View All Records, DocumentAccessLog__c Read + Create and the two class accesses.

Done whenProfile shows the 4 entries; 0 assignments of Documents_Support.

Not done
Owner
Claude (read only), on the release lead's word
Org
STJOHN-PROD
When
After D-05
D-07Record pages

Add the Documents tab by hand in Lightning App Builder on Account_Record_Page and on Contact_Record_Page: a custom tab labelled Documents, placed after Related, holding the component docsAccountDocuments (no properties to set). Set visibility on the tab: User, Profile, Name equals St John General User, OR System Administrator, OR St John System Administrator (three filters, logic 1 OR 2 OR 3). Save. Do not deploy the UAT pages: they carry UAT-only content such as smsHistory.

Done whenTab shows on an Account and on a Contact for the three profiles and for no other; the rest of each page equals the P-10 copy.

Not doneChanges Production
Owner
The release lead
Org
STJOHN-PROD
When
After D-06
D-08Smoke

In Production as a CSC user, then as a non-CSC user on the same profile (for example Finance Administrator), then as an admin: open an Account that has a new document (from D-05). The Documents tab lists it; View opens the PDF; Download works; the multi-file ZIP works. Repeat on a Contact. Then check DocumentAccessLog__c holds a row for each action. Last, as a user on another profile (for example Telecare): the tab is not shown.

Done whenAll pass; access-log rows present.

Not doneNo (audit rows are written, as designed)
Owner
CSC user + the release lead
Org
STJOHN-PROD
When
After D-07
D-09Monitoring

Day 1 and day 7, queries only: queue rows by status (Pending drains, Failed is 0); AsyncApexJob errors for DocumentStagingProcessor and the nightly reconciliation; Document__c count against the Invoice_ / CreditNote_ / DonationRcpt_ / Cert_ PDFs filed since D-01; file links by My StJohn still succeeding.

Done when0 Failed; 0 job errors; counts agree.

Not done
Owner
Claude (read only), on the release lead's word
Org
STJOHN-PROD
When
Day 1, day 7
D-10Record

Status log entry in the SFDocs Bridge (deploy Id, times, results). Close the CAB change.

Done whenLog entry written the same day.

Not done
Owner
The release lead + Claude
Org
-
When
Day 0
D-11Handover

Tell the developer what Production holds that their package does not: View All Records on Documents_Support; the Documents_Admin changes; the help test method removed; access on the St John General User profile in place of assignments. Also the skipped-certificate gap (2 cases in UAT). The same changes are missing from QA and from Git; Git only on the release lead's go.

Done whenNote sent by the release lead; the developer confirms for their next package.

Not done
Owner
The release lead
Org
-
When
Week 1
D-12Follow-up

Left for later, each as its own change: history load; DOCS site and help; booking handler update; Business Central (OrderInvoice_) invoices.

Done whenEach has an owner and a decision.

Not done
Owner
The release lead
Org
-
When
After week 1

Jobs and batches

Three things run in the background after go-live. A fourth, the one-off history load, is not part of this release.

JobWhat it doesWhenHow it starts
Queue processor (DocumentStagingProcessor)Registers one document per background job, up to 3 attempts. This is what fills the tab.Within seconds of a matching PDF being filedBy itself, from the file trigger. Nothing to run.
Docs Staging Sweep :00, :15, :30, :45 (4 scheduled jobs)Picks up any queue rows still pending, so nothing is left behind if a job was missed.Every 15 minutesscripts/schedule_jobs.apex, once, step D-03
Docs Reconciliation Nightly (DocumentReconciliationBatch)Checks the last 7 days and writes a summary to the debug log. No email, no data change.02:00 every nightSame script, step D-03
History load (DocumentBackfillBatch)Loads documents filed before go-live. NOT in this release.One-off, later, as its own changeBy hand. See the next section.

Schedule the jobs (D-03)

D-03 Schedule the jobsSTJOHN-PRODChanges Production
sf apex run -f scripts/schedule_jobs.apex -o STJOHN-PROD

Run once. The jobs run as the user who runs the script, in that user's time zone. Expect 5 jobs named Docs% in state WAITING.

What scripts/schedule_jobs.apex contains
// SFDocs: schedule the 5 jobs after the deploy. Run once, in Production, by the release lead.
// 4 staging sweeps (:00 :15 :30 :45) and the nightly reconciliation at 02:00.
DocumentStagingProcessor.scheduleSweeper();
DocumentReconciliationBatch.scheduleNightly();
for (CronTrigger c : [SELECT CronJobDetail.Name, CronExpression, State, NextFireTime FROM CronTrigger WHERE CronJobDetail.Name LIKE 'Docs%']) {
    System.debug(LoggingLevel.ERROR, 'JOB|' + c.CronJobDetail.Name + '|' + c.CronExpression + '|' + c.State + '|' + c.NextFireTime);
}
R2 Stop the jobs (rollback only)STJOHN-PRODChanges Production
sf apex run -f scripts/unschedule_jobs.apex -o STJOHN-PROD

The one-off history load

Not in this release, and not safe to run as built. The class ships, because a test calls it, but nobody runs it. The estimate is from read-only counts in Production on 30-Nov-26 and from two past loads in UAT.

PhaseWhat happensEstimate
Batch, two runs (financial, certificates)Scans the PDFs and writes one queue row per documentAbout 5 to 10 hours
QueueRegisters the documents, one per background jobAbout 11 to 22 days, running continuously
InputFigure
Matching PDFs in Production1,313,220 (727,078 financial, 586,142 certificates)
Linked to an Order or a bookingAbout 1.26 million (samples: 95.5% and 97.2%)
Speed measured in UAT78 a minute (10-Sep-26, 4,396 rows) and 40 a minute (17-Oct-26, 439 rows)
Production daily limit on background jobs250,000, with about 100,000 already in use
Floor set by that limitAbout 9 days
Data storage neededUp to about 4.8 GB of 38.6 GB free. No file storage: files are linked, not copied.
Year filedDocumentsQueue time
2018 to 202088,0001 to 1.5 days
2021135,0001 to 2.5 days
2022148,0001.5 to 2.5 days
2023183,0001.5 to 3 days
2024219,0002 to 4 days
2025210,0002 to 3.5 days
2026 so far282,0002.5 to 5 days

By year is for sizing only. The batch has no date filter today, so it cannot be run in slices without a code change.

Why it is not safe as built

  • It would take most of the spare daily allowance of background jobs for two to three weeks. If the allowance ran out, background jobs would be refused for every team.
  • The file trigger starts its background job with no error handling (ContentDocumentLinkTriggerHandler, lines 73 to 74). By a reading of the code that is not tested, new invoice and certificate files would then fail to attach.
  • Once the batch has written the queue rows there is no throttle and no pause.

What to ask the developer for first

  • More than one document per background job. About 25 a job would cut the jobs from 1.26 million to about 50,000.
  • A date range on the batch, so it can run newest year first and stop between slices.
  • Error handling around the trigger's call that starts the job.

How it would be run, for reference only

// Anonymous Apex. One family at a time. Do not run in this release.
Database.executeBatch(new DocumentBackfillBatch('Financial'), 200);
Database.executeBatch(new DocumentBackfillBatch('Certificate'), 200);

Working: ClaudeDev/_SFDocs/Investigations/SFDocs_Investigation_History-load-duration-Prod_2026-11-30.md

13 items

Not included

AreaTypeItemWhy it is outWhere it stands
SiteExperience siteDOCS site (Network, CustomSite, DigitalExperience bundle and its pages)No external site in this release.QA and UAT only. Production has no DOCS site (checked 30-Nov-26).
SiteApexClassDocumentService, DocumentService_TestPortal back end.QA and UAT only. Not in Production (checked 30-Nov-26).
SiteApexClassAuditWriter, AuditWriter_TestPortal audit writer. The internal tab writes its own audit rows through DocumentAdminService.QA and UAT only. Not in Production (checked 30-Nov-26).
SiteApexClassSignupService, SignupService_TestPortal sign-up.QA and UAT only. Not in Production (checked 30-Nov-26).
SiteLightningComponentBundledocsDocumentList, docsAccountSelector, docsAccountSelectModal, docsHeaderBanner, docsHeaderBarPortal pages.QA and UAT only. Not in Production (checked 30-Nov-26).
SiteFlowSFDocs_Signup_Verify_EmailPortal sign-up email.QA and UAT only. Not in Production (checked 30-Nov-26).
SitePermissionSetDocuments_CustomerAccess for portal customers.QA and UAT only. Not in Production (checked 30-Nov-26).
AccessPermissionSetAssignmentDocuments_Support assignmentsThe release lead 30-Nov-26: access by profile instead. The set ships, assigned to nobody.Available later for a single user outside the profile.
HelpApexClassDocsHelpControllerPortal help cases. Taken out of the package by the three edits in P-03 (the release lead confirmed 30-Nov-26).QA and UAT only. Not in Production (checked 30-Nov-26).
HelpLightningComponentBundledocsHelpDrawerPortal help panel.QA and UAT only. Not in Production (checked 30-Nov-26).
AutomationApexClassContactAssetRoleTriggerHandler (certificate block)The release lead 27-Nov-26: leave it out. In Production the file trigger has always queued the PDF first, so the block would add nothing.Production keeps its 25-Nov-26 version.
DataBatch runHistory load (DocumentBackfillBatch runs)Separate change. Production holds 1,313,220 matching PDFs (30-Nov-26), about 1.26 million of them linked to an Order or a booking. Estimate: batch 5 to 10 hours, then the queue 11 to 22 days, because one document is registered per background job. Not safe to run as built (daily allowance of background jobs). Working: Investigations/SFDocs_Investigation_History-load-duration-Prod_2026-11-30.md. The class ships but is not run.Tab starts empty.
PagesFlexiPageAccount_Record_Page, Contact_Record_PageNot deployed: the UAT copies carry UAT-only content. The tab is added by hand (D-07).Production copies stay; saved first in P-10.

Rollback

Least disruptive first. Every step that changes Production is the release lead's, or needs their confirmation for that step.

StepActionOwnerChanges ProductionCheck
When to roll backAny of: files fail to attach in Production with an error naming ContentDocumentLinkTrigger; My StJohn invoice or certificate filing starts failing; repeated Apex errors from the Documents tab for CSC users.The release lead-Decision is the release lead's.
R1 Hide the tab (minutes)Remove the Documents tab from the two record pages in Lightning App Builder, or restore the copies saved in P-10. Users lose the tab; nothing else changes.The release leadYesPages equal the P-10 copies.
R2 Stop the jobs (minutes)Run scripts/unschedule_jobs.apex: aborts the 5 jobs named Docs%.The release leadYesNo Docs% jobs left.
R3 Remove access (minutes)Remove the Documents_Admin assignments. For the 117 profile users, take the access off the profile: in Setup clear Read on Document__c and DocumentAccessLog__c and the two Apex class accesses on St John General User, or restore the P-10 copy. Hiding the tab (R1) already stops normal use.The release leadYesNo assignments left; profile equals the P-10 copy.
R4 Stop the file triggerDeploy ContentDocumentLinkTrigger as Inactive. This is an Apex deploy to Production, so it needs a test run: allow about 1 h 40 min with all local tests. If a faster stop is wanted, validate the Inactive copy before the window.The release leadYesTrigger Inactive; file links succeed.
R5 Full removal (later)Destructive deploy of the 64 components as its own change. The three objects hold links to files, not copies, so removing them loses no documents.Release lead + developerYesSeparate change with its own plan.

Evidence and open items

Proven

  • UAT check-only dry run of the v3 bundle: 0AfAD00000VZVVJ0A5, 30-Nov-26, Succeeded, CheckOnly true, 65 of 65, no tests. This proves the packaging, not Production.
  • Real UAT deploy of the profile file: 0AfAD00000VZVjp0AH, 30-Nov-26. Before and after compare: the 4 entries changed and nothing else.
  • Tab rule deployed to both UAT pages: 0AfAD00000VZRYA0A5. UAT reads back equal to the deployed files.
  • By query in UAT, three users on the profile with no permission set (CSC, Finance Administrator, Service Line Administrator) can read the document rows and the PDF files; a Telecare user cannot read the rows.
  • Production, queries only, 30-Nov-26: none of the 64 new components exist; the profile exists and holds no Documents access; everything the package relies on is present.

Still open

  • Production has not been validated (P-11).
  • The browser check in UAT with three logins is not confirmed (P-14).
  • The file trigger review is not signed off by the release lead and the developer (P-15).
  • CAB approval, window date and peer reviewer (P-01).
  • The Production changes are not in QA, Git or the developer's package (D-11).