LOOPandaLOOPanda
ENTRY 01 / 05SALESFORCETYPE: INTERNAL BUILD

Meridian

A service-request engine that turns a five-day approval trail into a forty-minute one.

STACK — Salesforce Flow · Apex · LWC · Platform Events · REST API

TRIGGER · UPDATEGATEAPEX · SERVICEQUEUE · ASYNCAPPROVAL · STEPAUDIT · FIELD HISTORYFLOW.ORCHESTRATIONCOVERAGE 92%

FIG. 01.0 — SYSTEM COMPOSITION, DRAWN IN CODE

SEC. 01BRIEF

THE PROBLEM, PLAINLY

Enterprise service teams lose days to approval trails: a request is created, forwarded, re-keyed, escalated, and finally signed off by someone who saw it four days late. Meridian was built to prove a different pattern — orchestrate the whole trail on-platform, and let humans touch it only where their judgment matters.

The build is our own R&D org, treated like a client engagement: a written spec, a data model review, a test plan before the first line of Apex, and a hard rule that every automated decision leaves an audit trail a compliance officer could reconstruct.

SEC. 02APPROACH
01

Flow-first orchestration

Record-triggered flows own the happy path: entitlement checks, routing, SLA timers. Declarative where declarative is honest — no Apex for what a flow states more clearly.

02

Apex where it counts

The approval matrix — amount bands, role hierarchies, delegation windows — lives in one bulkified Apex service with a single entry point, unit-tested against forty scenarios before the first deploy.

03

An operator console in LWC

Approvers work a queue, not their inbox: a Lightning Web Component console with keyboard actions, optimistic updates, and platform-event refreshes when a peer claims a record.

04

Test scenarios as the spec

The dev-test matrix is the contract: every business rule became a named scenario first, then code. When coverage reads 92%, it measures rules proven, not lines touched.

SEC. 03ARCHITECTURE
RECORD TRIGGERFLOW · ORCHESTRATORENTITLEMENT GATEAPEX · APPROVAL MATRIXQUEUEABLE · ASYNCAPPROVAL · STEPAUDIT · FIELD HISTORYLWC · CONSOLE
FIG. — Record trigger → flow orchestration → Apex approval matrix, with async work queued and every step written to field history.
SEC. 04ARTIFACTS
>_ APEX TEST RUN
$ sf apex run test --code-coverage --result-format human
 
=== Test Results
VoucherServiceTest.approvalMatrix_routesByAmount Pass
VoucherServiceTest.entitlementGate_blocksExpired Pass
VoucherServiceTest.delegation_windowExpiresCleanly Pass
FlowOrchestrationTest.endToEnd_fortyMinutePath Pass
…36 more Pass
 
=== Apex Code Coverage
VoucherService 94%
ApprovalMatrixHandler 91%
Overall 92% (org target 85%)
§ OBJECT MODEL
Service_Request__c
Master record · 14 fields · full field history
Approval_Step__c
Child · one row per decision, immutable
Entitlement__c
Lookup · gates the flow before any routing
Platform Event
Console refresh + downstream ERP notification

ENGINEERING NOTE

The fastest approval is the one that never waits in an inbox. Meridian’s matrix auto-approves the low-risk band and reserves humans for the two bands where discretion is real — that single decision produced most of the 5.4× gain.

SEC. 05OUTCOME

0%

APEX TEST COVERAGE

0+

NAMED TEST SCENARIOS

0.0×

FASTER APPROVAL PATH

00

UNAUDITED DECISIONS

NEXT ON THE LEDGER — ENTRY 02 / 05Atlas