← All projectsARCHITECTURE CASE STUDY

Grandiose Supermarket

One platform running online ordering, in-store picking, same-hour delivery, prepared-food orders, loyalty and mobile apps for a UAE grocery and quick-commerce retailer.

Business
Grocery & quick-commerce with physical stores, UAE
Platform
Magento 2 Open Source 2.4.9, headless-ready
Channels
Website, mobile apps, in-store staff app
My focus
Backend architecture, payments, loyalty, ERP & delivery integrations
Magento 2 Open Source 2.4.9Headless GraphQLSAP ERPMessage queuesMulti-Source Inventory
SKUs per ERP import batch
20K
to export 50,000 products
3–5 s
HIGHLIGHTS

Five things that set this platform apart.

  • Multi-rail checkout

    Cards, Apple Pay, wallet, gift cards and loyalty points on one order.

  • Two promotion engines

    Magento rules or Talon.One, switchable per store.

  • Same-hour delivery

    Map-drawn delivery zones linked to the right store.

  • In-store picking app

    Guided picking and substitutions with automatic phone follow-up.

  • Self-healing integrations

    Queued, logged and auto-retried calls to external systems.

ARCHITECTURE OVERVIEW

One GraphQL front door, queues behind it.

Every channel talks to Magento through GraphQL APIs. Slow or external systems sit behind message queues, so they never block an order.

ChannelsPlatformBusiness systemsWebsiteMobile appsPicker appGraphQL APIsMagento 2Open Source 2.4.9Payments & walletPromotions & loyaltyMulti-store inventoryDelivery zonesMessage queuesSAP ERPorders, stock, returns, refundsOps dashboardlive order statusGrubtechkitchen displayFarEye / LogiNextlast-mile deliveryKlevu search · SMS · pushTalon.One · ZinreloLogged & auto-retried on failure
What makes it different

Many orders are picked from real store shelves by staff, delivered the same hour, and paid for in several ways at once.

WHAT THE PLATFORM DOES

The whole grocery business, app to doorstep.

  • Payments

    Cards, Apple Pay, saved cards, wallet, gift cards and loyalty points on one order. Cash-on-delivery orders can switch to online payment later.

  • Loyalty & promotions

    Loyalty rewards work like normal cart discounts. Promotions run on Magento’s engine or Talon.One, per store. Cashback works with store credit.

  • Mobile & headless

    GraphQL APIs power the website and apps, including one cart shared across regional stores.

  • Delivery

    Customers only see zones and time slots that serve their address: Express, Home, Click & Collect, Curbside.

  • In-store picking

    A staff app guides pickers through the store, handles missing items and sends orders out.

  • ERP & operations

    SAP receives every order event: sales, returns, refunds, stock and shipments. A separate live feed updates an ops dashboard.

  • Inventory

    Stock stays accurate when many stores sell the same product and staff pick it at the same time.

  • Search & merchandising

    Klevu powers product search; staff control product order in categories.

  • Notifications

    SMS login and order updates, push notifications and customer engagement tracking.

  • Compliance & security

    Age-restricted products (such as alcohol and tobacco) blocked at catalog level. A reflected-injection issue in a third-party component fixed, and two silent core-class override collisions caught before production.

HOW AN ORDER FLOWS

From the app to a picker to the door.

From the customer’s app to a store picker, then to a delivery partner or the store’s own driver.

  1. STEP 1

    Assign

    Order goes to a picker at the right store; reassigned automatically if there’s no response.

  2. STEP 2

    Pick

    App guides the picker aisle by aisle, with prep notes for fresh items.

  3. STEP 3

    Substitute

    Customer approves missing-item swaps in the app, or by automated call.

  4. STEP 4

    Deliver

    Partner or own driver; handoff confirmed by OTP, cash recorded in app.

HOW DELIVERY ZONES WORK

Polygon › Zone › Source.

Delivery areas follow a three-level structure: Polygon › Zone › Source. The customer’s address decides which store fulfils the order, and the admin team manages all of it without code changes.

SOURCE · store that fulfilsZONE · delivery modes & cutoffsPolygonPolygonStorecustomer
  • Polygon

    A delivery area drawn on Google Maps in the admin panel.

  • Zone

    A group of polygons with its delivery modes (Express, Home, Click & Collect, Curbside) and cutoff times.

  • Source

    The store linked to the zone, which fulfils the order. If an address falls outside every polygon, checkout stops and the cart is cleared, so undeliverable orders are never placed.

KEY TECHNICAL CHALLENGES

Five problems that shaped the architecture.

Each solution was chosen over simpler options that would have failed at scale.

  1. Two discount engines

    Move promotions to Talon.One without switching off Magento’s engine.

    Solution

    A per-store switch sends each cart to one engine only; every cart change keeps Talon.One in sync.

    Result

    Stores can use either engine, with no risk of double discounts.

  2. Missing items

    Customers aren’t always watching the app when a substitute is needed.

    Solution

    Ask in the app first; if there’s no reply in time, call the customer automatically.

    Result

    Orders don’t stall, and customers aren’t sent items they didn’t want.

  3. Two systems, two needs

    SAP needs accurate financial data; the ops dashboard needs speed.

    Solution

    Two separate data feeds, each with its own queue.

    Result

    The dashboard stays live even when SAP is slow; each feed changes independently.

  4. Unreliable services

    If a kitchen or delivery system is down, an order could be lost.

    Solution

    Every request is queued and logged, then retried automatically up to a limit — one pattern reused across three operations integrations, including the kitchen display.

    Result

    No order is silently lost; failures are visible and fix themselves.

  5. Stock across stores

    The same product sells from many stores while staff pick it live.

    Solution

    Adjusted Magento’s stock reservation logic to match how stock really moves in stores.

    Result

    Stock counts reliable enough to promise same-hour delivery.

How the discount switch worksEach store uses exactly one engine.
yesnoCart updatedTalon.Oneon?Talon.OneMagento rulesOnediscount
How failed calls fix themselvesQueue, log, retry, resolve.
EventQueueLogDelivered ✓auto-retry until limit
How missing items are confirmedAsked in the app first, then by phone, so the order keeps moving.
ItemmissingAskedin appAutomatedcallResolvedretry until limit, then fallback
DESIGN DECISIONS

The options weighed, and the trade-offs accepted.

How the hardest calls were made: what else was on the table, why it lost, and what the chosen design costs.

Running two discount engines without conflict

Promotions had to move to Talon.One, a real-time engine with richer rules, without a hard cutover: Magento’s own engine had to stay available store by store.

  1. Replace Magento’s discount engine everywhere — no fallback if Talon.One has an outage
  2. Run both engines and merge the results — a real risk of double discounts
  3. A per-store switch that hands the whole calculation to one engine (chosen)
Decision

A plugin checks a per-store flag and either runs Magento’s discount engine or hands control to Talon.One.

Trade-off accepted

Every place that changes the cart — payment method, coupons, loyalty points, store credit, gift cards, order placement, even admin order edits — must notify Talon.One, or its view of the cart drifts.

An escalation path for an unreachable customer

When an item is missing, the picker needs the customer’s answer on a substitute, but the customer may not be watching their phone.

  1. Wait for an in-app answer with no timeout — stalls the picker and the delivery slot
  2. Substitute automatically without asking — fast, but risks the wrong item
  3. Ask in the app, escalate to an automated call on timeout, then fall back (chosen)
Decision

A scheduled job watches unanswered substitution requests and triggers an IVR call flow on timeout, with capped retries before a fallback.

Trade-off accepted

A telephony integration, webhook handling and a small state machine (asked in app → timed out → asked by phone → resolved), for a problem many platforms settle with a default.

TECHNOLOGIES & INTEGRATIONS

The stack behind it.

Core platform
Magento 2 Open Source 2.4.9PHPMySQLGraphQLREST APIsMulti-Source Inventory
Reliability
Message queuesWebhooks with auto-retryScheduled jobs
ERP
SAP
Payments
Amazon Payment Services (Payfort)Apple PayPayTabsWalletGift cards
Loyalty & promotions
ZinreloTalon.One
Delivery & kitchen
FarEyeLogiNextGrubtechGoogle Maps zones
Search & engagement
KlevuElasticsearchUnifonic SMSOneSignalMoEngage
Skills shown
E-commerce architectureEnterprise integrationsPayment systemsHeadless commerceInventory designReliable systems
FULL BUILD LOG

The work, piece by piece.

  1. Config-driven switch letting Talon.One take over cart discount calculation per store in place of the native/Zinrelo engine, with plugin hooks across payments, order placement, store credit and gift cards keeping both systems in sync.

  2. Backend for an in-store Picker and Dispatcher app (multiple GraphQL modules): aisle-by-aisle picking, fresh-prep flagging, bag tracking, and dispatch to third-party logistics or self-delivery with OTP-verified handoff.

  3. Substitution-confirmation flow that starts in-app and escalates to an automated IVR phone call if the customer doesn’t respond, so an unreachable customer never stalls an order.

  4. Rewrote MSI reservation and stock-deduction logic so counts stayed accurate while many stores sold the same SKU and pickers pulled items off shelves in real time.

  5. SAP ERP wired into every order-lifecycle stage (returns, RMA fees, inventory shifts, shipments), with an independent message-queue layer feeding a real-time operations dashboard.

  6. Zinrelo loyalty built into the sales-rule engine as first-class cart rules, including receipt-scan point claims, refer-a-friend rewards and reward history.

  7. Multiple GraphQL modules (payments, gift cards, wishlist, inventory, store credit) for the headless storefront, plus a drag-and-drop homepage builder.

  8. ERP import pipeline processing 10,000–20,000 SKUs per batch, and a timing-out CSV export rewritten to output 50,000 products in 3–5 seconds.

  9. Zone-based inventory and geofencing with admin-drawn Google Maps delivery polygons, tied to Express, Home, Click & Collect and Curbside modes with per-mode cutoffs.

  10. Message-queue order workflow integrating Grubtech (kitchen display) and FarEye (last-mile logistics) with a shared webhook-plus-retry pattern.

  11. Rule-based customer segments, age-restricted product controls, Adjust attribution and MoEngage engagement campaigns.

Facing a similar commerce problem?

I'm available immediately for senior Adobe Commerce roles and contract work. Tell me what you're building.