Workflow Automation
Kanban-based workflow engine with configurable stages, approval chains, automated triggers, and real-time progress tracking for customs operations.
Last updated: 2025-02-18
Workflow Automation
Certexi's workflow engine manages the complete lifecycle of transport units through customs operations. Built on an event-sourced architecture, every state transition is recorded with full evidence and audit trail.
Four-Stage Customs Workflow
The core workflow follows the standard customs clearance process:
| Stage | Description | Required Evidence |
|---|---|---|
| Aduana (Entry) | Vehicle arrives, initial documentation check | NFC scan, plate photo, seal number |
| Báscula (Weighing) | Weight measurement and verification | Scale reading, weight certificate |
| Supervisor (Inspection) | Physical inspection and compliance check | Inspection photos, observations |
| Salida (Exit) | Final clearance and departure | Seal verification, exit confirmation |
Interactive Kanban Board
Drag transport units between columns to simulate stage transitions. Each card shows priority, evidence count, and operator assignment.
4-stage Kanban — Aduana, Bascula, Carga, Salida. Drag cards to advance transport units.
Transport Unit Card
<Card className="w-64"> <CardHeader className="pb-2"> <div className="flex items-center justify-between"> <CardTitle className="text-sm font-mono">TU-2025-004</CardTitle> <Badge className="bg-amber-500 text-white text-[10px]">Urgent</Badge> </div> <CardDescription>Carlos Mendez — Import</CardDescription> </CardHeader> <CardContent className="space-y-2"> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Stage</span> <Badge variant="outline">Bascula</Badge> </div> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Evidence</span> <span>4/6 items</span> </div> <Progress value={67} className="h-1.5" /> <div className="flex gap-1 pt-1"> <Button size="sm" variant="outline" className="flex-1 text-xs h-7">View</Button> <Button size="sm" className="flex-1 text-xs h-7">Advance</Button> </div> </CardContent> </Card>
Kanban Board
The dashboard presents all transport units in a Kanban-style board with drag-and-drop progression. Each card shows:
- Transport unit identifier and type
- Current stage and time in stage
- Assigned operator
- Evidence completion status
- Priority and flag indicators
Real-Time Updates
The Kanban board uses React Query for real-time polling. Units automatically move between columns as operators complete stage requirements.
Stage Transitions
Validation Rules
Each transition enforces configurable validation rules:
- Required evidence — Minimum photos, scans, or readings before advancing
- Operator authorization — Role-based permission checks (see RBAC)
- Time constraints — Minimum dwell time per stage (configurable)
- Dependency checks — Previous stage must be complete
- Weight tolerances — Variance thresholds between entry and exit weights
Transition Events
Every state change creates an immutable event:
{
transportUnitId: "TU-2024-00042",
fromStage: "bascula",
toStage: "supervisor",
operator: "op-123",
timestamp: "2024-01-15T14:30:00Z",
evidence: {
scaleReading: 24500,
photos: ["url1", "url2"],
nfcScan: "tag-data"
},
hash: "sha256:abc123..."
}
Approval Chains
For high-value or flagged shipments, multi-level approval is required:
- Operator completes the stage work
- Supervisor reviews evidence and approves
- Manager provides final sign-off (configurable)
Pending approvals appear in the supervisor dashboard with full evidence review capability.
Automated Triggers
The workflow engine supports automated actions:
| Trigger | Action |
|---|---|
| Unit enters stage | Send notification to assigned operator |
| Stage timeout exceeded | Escalate to supervisor |
| Weight variance > threshold | Flag for inspection |
| All stages complete | Generate compliance report |
| Evidence hash mismatch | Create incident alert |
Workflow Configuration
Workflows are configurable per facility:
- Add or remove stages
- Configure required evidence per stage
- Set time limits and escalation rules
- Define approval hierarchies
- Customize Kanban board columns
Metrics & Reporting
The workflow engine tracks operational KPIs:
- Throughput — Units processed per hour/day/week
- Dwell time — Average time per stage
- Bottleneck detection — Stages with longest queues
- Operator efficiency — Units processed per operator
- Compliance rate — Percentage of units with complete evidence