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.
| Object | Purpose | Key Relationships |
|---|---|---|
| WorkItem__c | The core unit of work. Represents a task, feature, or bug fix that moves through the delivery pipeline. | Parent of WorkLog, Comment, File attachments |
| WorkRequest__c | Bridge 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__c | Comments and discussions on work items. Supports author tracking, source tagging (Salesforce, Client, Sync, Portal), and bidirectional sync. | Child of WorkItem__c |
| WorkLog__c | Time entries logged against work items. Supports Draft/Approved/Rejected approval workflow and syncs to connected orgs when approved. | Child of WorkItem__c |
| WorkItemDependency__c | Defines blocking relationships between work items (e.g., "Task B cannot start until Task A is done"). | Junction: WorkItem to WorkItem |
| NetworkEntity__c | Represents 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__c | Audit ledger for every sync event. Tracks direction (Inbound/Outbound), status, payload, GlobalSourceId for echo suppression, and retry count. | Lookup to WorkItem__c |
| DeliveryHubSettings__c | Org-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__c | Records 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__c | Generated 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__c | Financial 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__c | Controls 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__c | Tracks 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__c | User-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__c | Stores 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 Type | Purpose |
|---|---|
| WorkflowType__mdt | Defines available workflow types (e.g., Software Delivery, Loan Approval). Fields: IconName, SortOrder, IsDefault, UseSimplifiedView |
| WorkflowStage__mdt | Stage definitions per workflow: API value, display name, card/header colors, phase, persona, terminal/blocked/attention flags, forward and backtrack transitions |
| WorkflowPersonaView__mdt | Maps which stages each persona sees on their board view. 90+ records defining Developer, Client, PM, and Admin column groupings |
| WorkflowStageRequirement__mdt | Required fields per stage for stage gate enforcement. Blocks transitions when required fields are missing |
| WorkflowEscalationRule__mdt | Rule-based escalation conditions and actions. Auto-alerts on SLA breaches, stuck items, or missing assignees |
| CloudNimbusGlobalSettings__mdt | Global configuration defaults for mothership endpoint and vendor settings |
| DocumentTemplate__mdt | Registry of document templates: Invoice, Status Report, Client Agreement, Contractor Agreement, Proposal, Executive Summary, Meeting Brief, Weekly Digest |
| OpenAIConfiguration__mdt | AI provider settings: API key, model, endpoint configuration |
| SLARule__mdt | Service-level agreement thresholds with 20+ records. Priority-based targets (Critical/High/Medium/Low) with workflow-specific variants |
| DeveloperCapacity__mdt | Per-developer capacity configuration for velocity and capacity planning. Fields: WeeklyCapacityHoursNumber, AllocationPercentNumber, WorkflowTypeNameTxt. Powers the Velocity Dashboard projections |
| TrackedField__mdt | Declares 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 Event | Purpose |
|---|---|
| DeliveryWorkItemChange__e | Fired on stage changes, priority updates, and assignee changes. The Kanban board subscribes to auto-refresh when another user moves a card. |
| DeliveryEscalation__e | Published when an escalation rule triggers. Drives bell notifications, email alerts, and external integrations for SLA breaches. |
| DeliverySync__e | Fired on sync completions and failures. Enables real-time sync health monitoring and external system integration. |
| DeliveryDocEvent__e | Published 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:
| Class | Purpose |
|---|---|
| DeliveryInboundEmailHandler | Parses inbound emails, matches subject to work items, creates comments with email body and links attachments as files |
| DeliveryEmailService | Outbound email composition and delivery for invoices, notifications, and escalation alerts with configurable CC |
| DeliveryTimelineController | Powers the Timeline tab on the Kanban board, querying work items with date ranges for horizontal timeline visualization |
| DeliverySavedFilterController | CRUD operations for DeliverySavedFilter__c records, enabling users to save, load, and delete board filter presets |
| DeliveryDocumentController | 770+ lines, 8 @AuraEnabled methods for document generation, versioning, approval/dispute flow, PDF email, and payment recording |
| DeliveryWorkflowConfigService | 5 methods that resolve workflow types, stages, transitions, and persona views from Custom Metadata at runtime |
| DeliveryEscalationService | Evaluates escalation rules against work items, publishes DeliveryEscalation__e events, and manages cooldown periods |
| DeliveryInvoiceGenerationService | Scheduled auto-invoice generation on Daily, Weekly, Monthly, or Quarterly cadences. Creates draft invoices per billing-enabled entity with overdue detection |
| DeliveryVelocityService | Team and developer velocity metrics, capacity utilization, projected completion dates, and what-if scenario analysis for capacity planning |
| DeliveryTemplateManagerController | CRUD operations for workflow templates. Powers the Template Manager LWC for creating, editing, and applying reusable work item templates |
| DeliveryPortalAccessService | Self-service portal auth provisioning. One-click entity onboarding auto-creates PortalAccess records with 128-bit access tokens |
| SyncEngine | Core 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 Board — Drag-and-drop board with configurable workflow stages, persona views, transition rules, saved filters, and hide-empty-columns toggle
- •Timeline View — Horizontal timeline tab visualizing work items along a date axis with start dates, ETAs, and overlapping work detection
- •Work Item Action Center — Context-aware guidance showing what’s needed to advance stages, with quick actions
- •Client Dashboard — Personalized landing page with attention items, in-flight work, and recent updates
- •Ghost Recorder — Floating utility bar component with keyboard shortcut for instant issue submission from any screen
- •Sync Retry Panel — View and retry failed sync items with status indicators and error details
- •Activity Feed — Cross-item unified timeline of comments, hours, and field changes with conversation threads and inline reply
- •Data Lineage — Visual sync chain showing upstream vendors, this org, and downstream clients with per-entity health metrics
- •Document Viewer — Invoice and document list with preview, generate, email delivery, and payment recording
- •Burndown Chart — SVG-based sprint progress chart tracking against ideal pace
- •Gantt Chart — Timeline visualization with 60-day window support for delivery scheduling
- •Time Logger — Quick hour logging with enhanced date picker for past entries and auto-calculated totals
- •CSV Import — Bulk import wizard with column mapping for migrating work items from spreadsheets
- •Bell Notifications — User-level opt-in notification bell with escalation alerts, comment replies, and stage change notifications
- •Dynamic Form — Context-aware form layouts that adapt fields shown based on workflow type, stage, and persona
- •Workflow Builder — Visual workflow configuration UI for defining stages, transitions, and persona views through Custom Metadata
- •Velocity Dashboard — Team velocity and capacity planning dashboard with developer velocity charts, projected completion dates, capacity utilization, and what-if scenario analysis
- •Template Manager — Workflow template CRUD interface for creating, editing, and applying reusable work item templates
- •Activity Dashboard — User analytics and tracking dashboard with weekly/monthly totals, 7-day trends, top users, and clickable report navigation
- •Gantt Toolbar + Quick Edit — Shared 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
- Features — full feature reference
- API Reference — REST sync endpoints and payloads