E-commerce Logistics · Custom Web Portal

Darjaah Portal

One Back Office for Orders, Couriers, WhatsApp and COD

A custom operations portal now runs Darjaah's cash-on-delivery business in Saudi Arabia. Orders arrive from six channels and go through call-centre confirmation, courier booking, live tracking, inventory and COD reconciliation in a single system.

Darjaah Portal order management screen
Client

Darjaah, Saudi Arabia

Industry

E-commerce, dropshipping & COD fulfilment

Services

Custom Web Portal, API & Webhook Integrations, WhatsApp Automation

Platform

ASP.NET MVC 5, ASP.NET Web API, SQL Server

Project Overview

A Single System of Record for COD

Darjaah is a Saudi-based e-commerce, dropshipping and cash-on-delivery fulfilment business. It sells through its own Shopify store and also ships for third-party merchants (3PL) and resellers. Most orders are paid in cash at the door, so the business depends on confirming orders quickly, getting them to the right courier, and collecting and reconciling the cash afterwards.

We built the Darjaah Portal to cover the whole order lifecycle. It has two parts: an ASP.NET MVC back office used by operations, call-centre and finance staff, and a Web API integration hub. The hub receives store orders and courier updates, sends WhatsApp notifications and serves the driver mobile app.

A short walkthrough of orders, courier labels and WhatsApp updates.

Results at a Glance

6

Order channels in one queue: Shopify, YouCan, WhatsApp, Excel import, single manual orders, and API / mobile app

5

Courier and COD partner integrations: iMile, SMSA, Shipa, JD Logistics and CODSolutions

71

Application controllers: 55 in the portal and 16 in the webhook and integration API

~98

Database tables behind orders, inventory, couriers, stores, payouts and users

11

Country time zones supported, with KSA time as the operating default and SAR as the main currency

These figures describe the delivered system and are taken from the codebase, not business performance metrics. Dashboard numbers in the screenshots are sample data.

The Challenge

Darjaah's orders came in through several storefronts and messaging channels. Each courier used its own booking API, label format and status names. Before an order could ship, a call centre had to reach the customer and confirm it, and duplicate orders had to be caught first. After delivery, cash collected by couriers had to be matched against delivery charges and paid out to the right merchant.

Doing this across spreadsheets and courier dashboards made it slow to see where an order was, easy to mismatch statuses, and hard to reconcile COD. The business needed one system of record from the first order to the final payout.

How the portal connects: sales channels in, courier and messaging partners out.
Solution Approach

How We Built It

Every channel, courier and payment flows through one order model and one shared status workflow.

01

One Order Queue for Every Channel

Shopify store webhooks, YouCan orders, WhatsApp orders, Excel bulk uploads, single manual orders and the REST API all write to the same order model. A duplicate detection service flags repeat orders before they reach the call centre. The Order Management screen gives staff one place to search by order number, phone or AWB, filter by status and act on any order.

Order Management: one queue for all stores, with courier, AWB and status. Sample, non-customer data.
02

Call-Centre Confirmation Workflow

Orders move through a defined status workflow. It runs from Unconfirmed and Confirmed, through Supplier Assigned, Branch Courier Assigned and Out for Delivery, to Delivered, Returned or Cancelled. Confirmation is also pushed to an n8n call-centre (CSR) workflow and synced back through an API, so agents work from the same data as operations.

03

Role-Based Access

Access is controlled through ASP.NET Identity roles. The sidebar menu is built from the database by a navigation builder, and stores and pages are assigned to each user. Grid columns can be hidden by role, so each team sees only the data it needs.

04

Courier Booking and Labels

From the Label Creation screen, staff select orders, choose a courier and create the shipment through that courier's API. The portal supports iMile, SMSA, Shipa and JD Logistics, which uses OAuth waybills. It then prints barcode labels. For couriers that only send Excel files, a column and status mapping tool converts their reports into Darjaah statuses.

Courier booking and barcode label creation through the iMile, SMSA, Shipa and JD Logistics APIs.
05

Webhook Hub and WhatsApp Notifications

A separate Web API project receives status webhooks from iMile, Shipa, JD Logistics and CODSolutions, with signature checks where the courier provides them. It maps each status to the Darjaah workflow and keeps a full status history.

Customers get WhatsApp messages at each key step. Their replies and shared locations come back into the order, and locations are reverse-geocoded to help drivers. The same API serves the driver mobile app for dispatch and return (RTO) batches, and provides public tracking endpoints.

WhatsApp notification log and payload, next to the customer's view. The message text is illustrative.
06

Inventory, 3PL and COD Reconciliation

An inventory ledger records each SKU movement by warehouse: stock received, dispatched, returned and transferred. Separate ledgers cover 3PL clients.

On the finance side, the portal updates COD amounts and delivery charges, builds merchant payout invoices, exports them to PDF and marks them paid with proof of transfer. A SKU performance report shows confirmation, delivery and return rates by product, store and date range.

Inventory ledger showing SKU movements by warehouse, including 3PL stock. Sample data.
Under the Hood

Technology Stack

Back office
ASP.NET MVC 5 on .NET Framework 4.8, Razor views, SB Admin 2 (Bootstrap 4) theme
Integration API
ASP.NET Web API 5 webhook hub (separate WebhookApi project), with CORS for the mobile app and partners
Data
SQL Server with LINQ to SQL, Dapper and ADO.NET
Identity
ASP.NET Identity 2 on OWIN, with role-based menus and column permissions
Front end
jQuery, DevExtreme data grids, DataTables, Select2, Chart.js, SweetAlert
Documents
EPPlus, ClosedXML and ExcelDataReader for Excel; iTextSharp for PDF; ZXing.Net for barcodes; Crystal Reports
Commerce
Shopify (ShopifySharp) and YouCan order webhooks
Couriers
iMile, SMSA, Shipa, JD Logistics and CODSolutions APIs and webhooks
Messaging & automation
WhatsApp through WANotifier, an n8n CSR workflow and an AI assistant, and OpenStreetMap Nominatim geocoding

Key Takeaways

01

Putting every channel into one order model gave operations a single queue and a single status history for each order.

02

Mapping each courier's statuses to one shared workflow is what makes tracking, WhatsApp updates and COD reconciliation reliable.

03

A separate webhook API keeps courier and store traffic away from the staff-facing portal and gives the mobile app a stable endpoint.

04

Courier credentials, signatures and messaging keys should be kept in configuration or a secrets store, not in source code, as the integration surface grows.

Need a Portal Built Around Your Operations?

If your orders, couriers and cash are spread across too many tools, we can design and build one back office around the way your team actually works.