Creating Practical Tools: How I Built a Custom Shipping Label Generator for an E-Commerce Client
I’m Mehrdad Oliaee, a marketing and digital marketing consultant with over 15 years in the IT industry. I’ve worked with major players like MTN Irancell, LG, Aparat, Filimo, and CinemaTicket, focusing on project management, digital transformation, and turning consumer insights into real growth. While my core expertise is strategy and marketing, one of my passions is building practical tools that solve everyday problems—especially when off-the-shelf solutions fall short. I love diving into code, automating workflows, and creating things that make operations smoother (you can see this in my blog posts about Google Sheets hacks, free website setups with Cloudflare and GitHub, or even my AI-powered Gold Analyst dashboard).
Recently, while consulting for an online store in Iran, I spotted a major bottleneck in their logistics process. Preparing shipping labels from order invoices was a tedious manual task: staff copied text into Word or Excel, formatted it for A5 paper, and printed—leading to inconsistencies, errors, and lost time. When we raised the idea of adding a simple “print label” feature to their admin panel, the website contractor dragged their feet. Requests turned into endless back-and-forth, misunderstandings, and delays—classic issues when operational tweaks get deprioritized.
Rather than wait, I decided to build a standalone solution myself. The vision was clear: a simple web tool where staff paste raw invoice text, and it instantly generates a clean, postal-ready A5 label. No deep integrations, just something fast and reliable. What began as a quick prototype evolved—through real-world testing and iterations—into a powerful tool (now version 4.4) that’s become essential for their daily operations.
Key Features That Make It Practical
The tool is dead simple to use but packed with thoughtful details:
- Smart Text Parsing: It automatically extracts name, phone, shipping method, address, and postal code from pasted invoice text—handling messy formats, Persian digits, and variations reliably.
- Professional A5 Labels: Optimized for direct printing (landscape A5, no margins). Large readable fonts (auto-adjusted for long addresses), separated postal code digits, bold shipping method in a black box, and fixed sender details.
- Streamlined Workflow: Quick clipboard paste, instant preview, status indicators, and one-click print.
- Centralized Logging: Every print is recorded (timestamp, details, order ID) and stored globally via Cloudflare KV—accessible from any device.
- Secure Reports View: Password-protected dashboard (with optional browser save for convenience; separate admin clear access). Live search by phone or order ID, Excel export.
- Smart Versioning: Repeats of the same order ID get tagged (e.g., “۱۸ دی ۱۴۰۴ | نسخه دوم”)—instantly spotting duplicates while linking to exact print dates.
It’s all in a single HTML file with Tailwind CSS and vanilla JavaScript, deployed on Cloudflare Pages for speed and zero upkeep.
The Building Process: From Idea to Polished Tool
This wasn’t a one-shot build—it grew through hands-on challenges and refinements.
Parsing started basic but needed constant tweaking for real invoices (edge cases like embedded postal codes or missing fields). Printing perfection meant wrestling with CSS media queries for exact sizing and color retention across browsers. Early logs were local-only (limited to one machine). Going centralized required learning Cloudflare Workers and KV, debugging CORS headaches, authentication quirks, and sync issues.
Features emerged from actual use:
- Clipboard shortcuts for speed.
- Robust fallbacks and dynamic adjustments.
- Secure multi-device reports with search.
- Versioning via a custom endpoint to accurately count repeats.
Late-night debugging—fixing parsing bugs, deployment caches, or authentication errors—made it rock-solid.
How It’s Helping the Client
The impact has been huge:
- Logistics Speed: Labels now take seconds, not minutes—with fewer errors and better readability for postal staff.
- Easy Tracking: Centralized logs let anyone verify shipments quickly. Versioning catches reprints instantly.
- Support Efficiency: Searchable history resolves customer questions faster.
- Independence: No more contractor delays for operational fixes.
It’s freed up time and reduced shipping-related frustrations significantly.
A Reusable Tool for Any Online Store
This isn’t locked to one business—it’s a flexible template. The parsing can adapt to different invoice styles, design to your branding, and features can expand (barcodes, batch processing, etc.).
If your e-commerce operation has similar logistics hurdles, I’d love to customize this for you. It’s quick to deploy and solves real problems without complexity.
Get in touch via the “Contact” section on my website (mehr1dad.com)—happy to chat about how it could fit your needs.
— Mehrdad Oliaee, January 2026