$ Dispatch · Architecture
The source-driven Salesforce DX/Apex build behind the Partner Community portal.
## NOT_FARPOST_S_REAL_DISPATCH
This is a separate, illustrative system, not Farpost’s real dispatch engine. The actual farpost.ca product has a mature, live, twice-rebuilt dispatch system running on MongoDB, FastAPI, and Twilio. It needs nothing from this piece, and this piece touches none of it — no shared code, no shared data, no shared infrastructure.
## SOURCE_DRIVEN_BUILD
pieces/farpost-dispatch-sf/is a real Salesforce DX project — Apex classes, custom object/field metadata, a permission set, Named Credential metadata, and two Lightning Web Components, all hand-authored, git-tracked source deployed via sf project deploy start, not configuration that only exists by clicking through Setup with nothing committed anywhere. Apex is a genuinely different runtime than every other piece on this site, satisfying this site’s own portfolio-piece isolation convention directly — the second real instance of that trigger, after Farpost Pulse’s Node.js Azure Functions.
A Farpost_Dispatch_Partner permission set scopes exactly what a Partner Community Professional needs: their own Contact self-fields, read-only visibility on Job__c, and the two Apex classes backing the job board and the claim action — nothing broader.
## CONCURRENCY_SAFE_CLAIMING
Claiming a job is concurrency-safe, not a toy: JobClaimService.claimJob row-locks the Job__c record (FOR UPDATE) and re-checks its Status inside that lock before updating it, so two professionals claiming the same job near-simultaneously can never both succeed. That’s the sharper version of the founding story: instead of manual outreach that failed, the system proactively surfaces the job to the best-fit people, who claim it themselves.
## PARTNER_COMMUNITY_PORTAL
Two Lightning Web Components carry the two sides of this story: an ops-side recommendation panel on the Job__crecord page, and a Partner Community portal page showing each Professional their own matching open jobs with a Claim action. The AI ranks and surfaces; it doesn’t assign. Ops sees the ranked, reasoned shortlist on the Job record page; Professionals see it reflected as a recommended flag on their own portal board. Claiming stays a Professional’s own action.
