Skip to content

zo-n-ya/parcel_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parcel Tool — PDA Route Assignment and Exception Handling System

AI Systems Relevance

This project demonstrates real-world workflow orchestration patterns highly relevant to modern AI systems and enterprise automation platforms.

Core engineering concepts include:

  • API-driven workflow orchestration
  • Concurrent task processing
  • Real-time operational decision routing
  • Queue-based background workers
  • Exception-aware workflow automation
  • Stateful processing pipelines
  • Human-in-the-loop operational systems
  • Production-scale backend coordination

These concepts are directly transferable to AI agents, RAG systems, enterprise copilots, and AI workflow automation platforms.


Overview

Parcel Tool is an internal logistics operations system designed for real-time parcel processing, route assignment, and exception handling.

The system is available in both PDA and Web versions, with the PDA interface serving as the primary operational entry point for scan-based workflows.


System Design

  • PDA Version (Primary Interface)

    • Designed for real-time scanning and processing
    • Optimized for warehouse floor operations
    • Used for immediate routing and exception handling
  • Web Version (Secondary Interface)

    • Supports batch processing and operational automation
    • Provides additional visibility and control for non-PDA workflows

Both versions share the same backend logic for routing, assignment, and exception handling.


Key Features

Route Assignment

  • Automatic route assignment based on zipcode
  • Uses Excel-based route configuration (zipcode → route_no)
  • Supports dynamic updates via route file reload

Exception Handling

Wrong Address

  • Detects invalid or failed delivery cases
  • Transfers parcels to designated exception batches
  • Reassigns to exception drivers

Stored Parcels (213 / 230)

  • Identifies stored or returned parcels
  • Automatically routes to appropriate batch
  • Assigns to designated processing drivers

Driver Reassignment

  • Dynamically reassigns parcels between drivers
  • Supports both standard routing and exception scenarios

Status Automation

  • Automatically updates parcel status (e.g., 202 transition)
  • Inserts operation logs for traceability
  • Skips redundant updates based on status rules

Real-Time Processing Engine

  • Queue-based processing pipeline
  • Background worker processes parcels sequentially
  • Provides real-time status tracking via API

Route Configuration

  • Excel-based route table (route.xlsx)
  • Supports:
    • zipcode mapping
    • enable/disable flags
  • Hot reload via API

System Architecture

  • Backend: Flask
  • API Integration: External logistics API
  • Data Source: Excel (route mapping)
  • Processing Model: Queue + background worker
  • Frontend: PDA WebView + Web interface

How It Works

  1. User scans or inputs tracking numbers (PDA)
  2. System retrieves parcel details via API
  3. Determines processing path:
    • Standard routing
    • Wrong address handling
    • Stored parcel handling
  4. Executes:
    • Route assignment
    • Driver reassignment
    • Status updates
  5. Updates result panel in real time

Example Workflow (PDA)

  • Scan tracking number
  • System fetches parcel info
  • Automatically determines route or exception path
  • Assigns driver / transfers batch
  • Updates status and logs
  • Displays result instantly

Technical Challenges Solved

  • Reduced operational bottlenecks through asynchronous task execution
  • Built queue-based processing for scalable real-time workflows
  • Improved operational visibility through live status updates
  • Designed exception-aware routing logic for edge-case handling
  • Simplified complex operational workflows into scalable backend services

Tech Stack

  • Python
  • Flask
  • REST APIs
  • Concurrent Processing
  • Queue-Based Workers
  • PDA WebView Integration
  • Workflow Automation
  • Real-Time Operational Systems

Notes

  • This is a public-safe version of an internal system
  • API endpoints and credentials are not included
  • Business rules are simplified for demonstration

About

AI workflow orchestration and real-time operational automation system built with Flask, concurrent processing, and API-driven routing pipelines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors