Architecture

Delivery Hub is a Salesforce-native managed package backed by a lightweight client portal. The core platform runs entirely on Salesforce using custom objects, Apex, and Lightning Web Components. An external portal at cloudnimbusllc.com provides authenticated client access without requiring Salesforce licenses.

Package at a Glance

183

Apex Classes

93 production + 90 test

66

LWC Components

Full Lightning UI

15

Custom Objects

Core data model

11

Custom Metadata Types

Declarative config

89%+

Test Coverage

CI/CD with PMD scanner

25+

REST Endpoints

Public + Sync + Task + Bounty API v1

Data Model

Delivery Hub uses 15 core custom objects. All objects are namespaced under the delivery managed package prefix.

ObjectPurposeKey Relationships
WorkItem__cThe core unit of work. Represents a task, feature, or bug fix that moves through the delivery pipeline.Parent of WorkLog, Comment, File attachments
WorkRequest__cBridge linking a WorkItem to a vendor NetworkEntity for downstream sync. Tracks remote work item ID and sync status.Lookup to WorkItem__c and NetworkEntity__c
WorkItemComment__cComments and discussions on work items. Supports author tracking, source tagging (Salesforce, Client, Sync, Portal), and bidirectional sync.Child of WorkItem__c
WorkLog__cTime entries logged against work items. Supports Draft/Approved/Rejected approval workflow and syncs to connected orgs when approved.Child of WorkItem__c
WorkItemDependency__cDefines blocking relationships between work items (e.g., "Task B cannot start until Task A is done").Junction: WorkItem to WorkItem
NetworkEntity__cRepresents a vendor, client, or partner organization. Stores endpoint URL, API key, org ID, and connection status. Anchors the multi-tenant sync and billing model. New billing fields: EnableBillingDateTime__c and BillingFrequencyPk__c for automated invoice scheduling per entity.Parent of WorkRequest__c, PortalAccess__c, DeliveryDocument__c
SyncItem__cAudit ledger for every sync event. Tracks direction (Inbound/Outbound), status, payload, GlobalSourceId for echo suppression, and retry count.Lookup to WorkItem__c
DeliveryHubSettings__cOrg-level hierarchy custom setting for configuration: AI toggles, scheduling, polling intervals, document CC email, WorkLog approval dates, feature flags, invoice automation (EnableInvoiceGenerationDateTime__c, LastInvoiceGenerationDate__c), and four configurable operational settings (Reconciliation Hour, Sync Retry Limit, Activity Log Retention Days, Escalation Cooldown Hours). Six Bool-to-DateTime field conversions (ActivatedDateTime, BountyEnabledDateTime, etc.) provide full audit trail for feature enablement.Hierarchy Custom Setting (org/profile/user)
ActivityLog__cRecords user activity events including page navigation, stage changes, and field edits. Powers the Activity Feed and data lineage views.Lookup to WorkItem__c and NetworkEntity__c
DeliveryDocument__cGenerated documents (invoices, status reports, agreements). Stores an immutable JSON snapshot of hours, rates, and work items. Supports versioning (VersionNumber__c, PreviousVersionId__c for version chains), approval/dispute flow (DisputeReasonTxt__c), and public token access for portal viewing.Master-Detail to NetworkEntity__c
DeliveryTransaction__cFinancial transactions recorded against documents. Five types: Payment, Credit, Refund, Adjustment, Write-Off. Auto-marks invoices as Paid when fully covered.Master-Detail to DeliveryDocument__c
PortalAccess__cControls portal user access. Links an email address to a NetworkEntity with a role, enabling authenticated access to the client portal without a Salesforce license. AccessTokenTxt__c stores a 128-bit token for self-service auth provisioning.Master-Detail to NetworkEntity__c
BountyClaim__cTracks developer claims against bounty work items. Stores the approach, NTE estimate, timeline, and claim status. Supports multi-developer competitive claims on the same bounty.Lookup to WorkItem__c
NotificationPreference__cUser-level notification opt-in preferences. Controls which bell notification types each user receives: escalations, comment replies, stage changes, and SLA breaches.Lookup to User
DeliverySavedFilter__cStores named board filter configurations per user. Captures assignee, priority, status, date range, and workflow type criteria so users can recall their favorite board views with one click. Filters are private to each user.Lookup to User

Custom Metadata Types

Delivery Hub uses 11 Custom Metadata Types to store declarative configuration that deploys with the package and is always readable without permission sets.

Metadata TypePurpose
WorkflowType__mdtDefines available workflow types (e.g., Software Delivery, Loan Approval). Fields: IconName, SortOrder, IsDefault, UseSimplifiedView
WorkflowStage__mdtStage definitions per workflow: API value, display name, card/header colors, phase, persona, terminal/blocked/attention flags, forward and backtrack transitions
WorkflowPersonaView__mdtMaps which stages each persona sees on their board view. 90+ records defining Developer, Client, PM, and Admin column groupings
WorkflowStageRequirement__mdtRequired fields per stage for stage gate enforcement. Blocks transitions when required fields are missing
WorkflowEscalationRule__mdtRule-based escalation conditions and actions. Auto-alerts on SLA breaches, stuck items, or missing assignees
CloudNimbusGlobalSettings__mdtGlobal configuration defaults for mothership endpoint and vendor settings
DocumentTemplate__mdtRegistry of document templates: Invoice, Status Report, Client Agreement, Contractor Agreement, Proposal, Executive Summary, Meeting Brief, Weekly Digest
OpenAIConfiguration__mdtAI provider settings: API key, model, endpoint configuration
SLARule__mdtService-level agreement thresholds with 20+ records. Priority-based targets (Critical/High/Medium/Low) with workflow-specific variants
DeveloperCapacity__mdtPer-developer capacity configuration for velocity and capacity planning. Fields: WeeklyCapacityHoursNumber, AllocationPercentNumber, WorkflowTypeNameTxt. Powers the Velocity Dashboard projections
TrackedField__mdtDeclares which fields are tracked for change history in ActivityLog. Ships with WorkItem Developer, Priority, Stage, and Status tracking

Platform Events

Delivery Hub publishes 4 Platform Events that enable real-time communication between components, orgs, and external subscribers.

Platform EventPurpose
DeliveryWorkItemChange__eFired on stage changes, priority updates, and assignee changes. The Kanban board subscribes to auto-refresh when another user moves a card.
DeliveryEscalation__ePublished when an escalation rule triggers. Drives bell notifications, email alerts, and external integrations for SLA breaches.
DeliverySync__eFired on sync completions and failures. Enables real-time sync health monitoring and external system integration.
DeliveryDocEvent__ePublished on document status transitions (Draft, Sent, Approved, Disputed, Paid). Powers portal notifications and audit logging.

Key Apex Classes

The 225 Apex classes are organized by domain. Notable services include:

ClassPurpose
DeliveryInboundEmailHandlerParses inbound emails, matches subject to work items, creates comments with email body and links attachments as files
DeliveryEmailServiceOutbound email composition and delivery for invoices, notifications, and escalation alerts with configurable CC
DeliveryTimelineControllerPowers the Timeline tab on the Kanban board, querying work items with date ranges for horizontal timeline visualization
DeliverySavedFilterControllerCRUD operations for DeliverySavedFilter__c records, enabling users to save, load, and delete board filter presets
DeliveryDocumentController770+ lines, 8 @AuraEnabled methods for document generation, versioning, approval/dispute flow, PDF email, and payment recording
DeliveryWorkflowConfigService5 methods that resolve workflow types, stages, transitions, and persona views from Custom Metadata at runtime
DeliveryEscalationServiceEvaluates escalation rules against work items, publishes DeliveryEscalation__e events, and manages cooldown periods
DeliveryInvoiceGenerationServiceScheduled auto-invoice generation on Daily, Weekly, Monthly, or Quarterly cadences. Creates draft invoices per billing-enabled entity with overdue detection
DeliveryVelocityServiceTeam and developer velocity metrics, capacity utilization, projected completion dates, and what-if scenario analysis for capacity planning
DeliveryTemplateManagerControllerCRUD operations for workflow templates. Powers the Template Manager LWC for creating, editing, and applying reusable work item templates
DeliveryPortalAccessServiceSelf-service portal auth provisioning. One-click entity onboarding auto-creates PortalAccess records with 128-bit access tokens
SyncEngineCore routing logic, echo suppression, GlobalSourceId kill-switch, and blockedOrigins management for cross-org sync

Sync Engine

The cross-org sync engine enables two Salesforce orgs to share work items bidirectionally. It operates on a push/pull model:

1. Outbound Push

When a work item is updated in the source org, a Platform Event fires. An Apex trigger serializes the change and sends it to the remote org via a REST callout to /delivery/sync.

2. Inbound Pull

The receiving org processes the payload, creates or updates the matching SyncItem__c and WorkItem__c, and sends an acknowledgment back.

3. Echo Suppression

Each sync payload carries a unique transaction ID. The receiving org stores this ID so that when the inbound update triggers its own outbound push, the echo is detected and suppressed, preventing infinite loops.

4. Sync Reconciler

A scheduled reconciliation process compares record states between connected orgs, detects drift (missed updates, failed retries, field-level mismatches), and queues self-healing corrections automatically. Full audit trail of every reconciliation run ensures nothing is lost silently.

5. Platform Events

Four platform events (DeliveryWorkItemChange__e, DeliveryEscalation__e, DeliverySync__e, DeliveryDocEvent__e) fire on stage changes, escalations, sync completions, and document status transitions. Subscribe from LWC, Apex triggers, or external systems for real-time push notifications. The Kanban board subscribes to DeliveryWorkItemChange__e to auto-refresh when another user moves a card, eliminating the need for polling.

Namespace Handling

Delivery Hub is distributed as a managed package with a registered namespace. All custom objects, fields, Apex classes, and LWC components are namespaced. When referencing Delivery Hub objects in your own code:

  • In Apex, use the fully qualified name: delivery__WorkItem__c
  • In SOQL, the namespace prefix is required in cross-namespace queries
  • In LWC, import with the namespace: import WorkItem from '@salesforce/schema/delivery__WorkItem__c'

Lightning Web Components

The UI is built entirely with 66 Lightning Web Components. Key components include:

  • Kanban BoardDrag-and-drop board with configurable workflow stages, persona views, transition rules, saved filters, and hide-empty-columns toggle
  • Timeline ViewHorizontal timeline tab visualizing work items along a date axis with start dates, ETAs, and overlapping work detection
  • Work Item Action CenterContext-aware guidance showing what’s needed to advance stages, with quick actions
  • Client DashboardPersonalized landing page with attention items, in-flight work, and recent updates
  • Ghost RecorderFloating utility bar component with keyboard shortcut for instant issue submission from any screen
  • Sync Retry PanelView and retry failed sync items with status indicators and error details
  • Activity FeedCross-item unified timeline of comments, hours, and field changes with conversation threads and inline reply
  • Data LineageVisual sync chain showing upstream vendors, this org, and downstream clients with per-entity health metrics
  • Document ViewerInvoice and document list with preview, generate, email delivery, and payment recording
  • Burndown ChartSVG-based sprint progress chart tracking against ideal pace
  • Gantt ChartTimeline visualization with 60-day window support for delivery scheduling
  • Time LoggerQuick hour logging with enhanced date picker for past entries and auto-calculated totals
  • CSV ImportBulk import wizard with column mapping for migrating work items from spreadsheets
  • Bell NotificationsUser-level opt-in notification bell with escalation alerts, comment replies, and stage change notifications
  • Dynamic FormContext-aware form layouts that adapt fields shown based on workflow type, stage, and persona
  • Workflow BuilderVisual workflow configuration UI for defining stages, transitions, and persona views through Custom Metadata
  • Velocity DashboardTeam velocity and capacity planning dashboard with developer velocity charts, projected completion dates, capacity utilization, and what-if scenario analysis
  • Template ManagerWorkflow template CRUD interface for creating, editing, and applying reusable work item templates
  • Activity DashboardUser analytics and tracking dashboard with weekly/monthly totals, 7-day trends, top users, and clickable report navigation
  • Gantt Toolbar + Quick EditShared Gantt infrastructure components providing toolbar controls and inline quick-edit capabilities for the timeline view

Unified Workspace Tabs

The main workspace provides a unified tab interface that gives teams access to every Delivery Hub capability from a single screen. As of v0.125, the workspace includes 10 tabs:

Board

Kanban drag-and-drop pipeline

Timeline

Gantt/timeline visualization

Activity

Cross-item activity feed

Docs

Document engine and invoices

Guide

In-app documentation

Settings

Workspace configuration

Workflows

Workflow builder and stages

Analytics

Activity dashboard and reports

Velocity

Team velocity and capacity planning

Templates

Workflow template manager

Public REST API

Delivery Hub exposes 25+ REST endpoints across four versioned API surfaces, all under the /services/apexrest/delivery/ namespace. The Public API (/deliveryhub/v1/api/*) powers the client portal and external integrations, authenticated via X-Api-Key header. The Sync API (/deliveryhub/v1/sync/*) handles bidirectional org-to-org synchronization with opt-in API key validation. The Task API (/tasks/*) provides task management for CI/CD pipelines and AI agents. A Public Submission endpoint (/deliveryhub/v1/submit) accepts unauthenticated work item submissions with rate limiting (5 per email per hour) and input sanitization. The Bounty API (/deliveryhub/v1/bounties/*) powers the bounty marketplace with endpoints for listing, claiming, and managing bounties programmatically. API v1 endpoints include: GET /v1/api/timeline (timeline data), GET|POST /v1/api/filters (saved filters), GET /v1/api/documents/:id/versions (version history), and POST /v1/api/documents/:id/approve (invoice approval flow).

Client Portal

The external client interface lives at cloudnimbusllc.com/portal. It provides authenticated access for client stakeholders to view work item status, submit work requests, download documents, and review time logs — without needing a Salesforce license. Authentication supports passkeys, passwords, and magic links.

Continue Reading