Merit · Al Fursan · STC · Internal

STC supplier integration

What STC is, why its stock model does not fit Merit, the shape the team settled on, and exactly where the legacy build stands today. Written for the Al Fursan migration team, because STC exists in legacy and does not exist in the new Seller Portal at all.

Owner: Brian Arfi Faridhi, Product Director · 11 September 2026 · Work-tree nodes apple-stc (legacy) and sp-stc (new world)

00Why this is on the gap list, not the migration list

Nothing here is data that moves. All of it is code that has to be written a second time.

Al Fursan sells Apple products, and STC is the official Apple distributor in Saudi Arabia. Merit onboarded STC because the previous supplier was unreliable and orders were cancelled after payment for lack of stock. That integration lives in the legacy Platform merchandise service today, under MPS-1468.

The new Seller Portal has no supplier integration for STC. It has no coordinate-gated fulfilment, no per-city stock model, and no order placement against an external distributor. So when Al Fursan moves to the Ecommerce Solution, STC does not migrate. It gets built.

The one number nobody has

The Platform team sized the legacy work at roughly 9 to 14 days back in July, before the scope was cut. Nobody has sized the new Seller Portal build. Muneeb Meer was asked on 31 August and the request is still open, so the effort against this line is unknown.

01How STC works, and why it does not fit

Four properties of STC's model. Every complication downstream comes from one of them.

Stock

Per city, boolean, daily

STC exposes in stock or out of stock, per city, refreshed daily. There is no quantity per SKU, per warehouse or per coordinate. Merit's inventory model is SKU based and location agnostic.

Fulfilment

Coordinate gated

STC requires an exact latitude and longitude at order placement and fulfils only if the item is available in that area. Merit holds short code addresses, not coordinates.

Warehouses

Dark stores, city level

STC ships from many warehouses, identified at city level only, and self ships by default.

Operator

Full API, no humans

STC has no human operator on their side. They push a catalogue and expose stock and order APIs. Everything is machine to machine.

The mismatch in one sentence

STC's stock is real per city, and the Al Fursan storefront is national. A Riyadh buyer and a Jeddah buyer see the same page, but STC can only answer for one city at a time.

02The API surface

Six calls are in scope. Requests and responses are wrapped in an mw_request and mw_response envelope with a transaction id and timestamp.

Inventory

EndpointMethodPurposeNotes
/getAvailableStockGETCities, each with the item codes available thereBoolean per city. No quantities
/getItemsAvailabilityPOSTAvailability for latitude, longitude, item code and quantityReturns availableQuantity. Open whether it is the total or capped at the requested amount

Orders

EndpointRequired fieldsNotes
/placeOrderorderNumber, latitude, longitude, itemCode, quantity, idempotency keyReserves stock for around ten minutes
/confirmOrderorderNumber, mobileNumber, fullNameCreates the real order. Optional collectAmount, preferSingleShipment, preferredDateAndTime
/cancelOrderorderNumber
/returnorderNumber, latitude, longitude, itemCode, quantityOptional serial number from STC post delivery status
Status trackingorderNumberSTC gives no end user tracking details. Confirmed

Pricing

/getItemPrice returns itemCode, netPrice, netPriceWithVat, grossPrice and Currency. Which one is customer facing is still an open question with STC.

SIT gateway base path: https://apisit.channels.com.sa/gateway/ecommerce/1.0/

03The shape the team settled on

One delivery address. It removes the city mismatch rather than solving it.

Every earlier proposal spent its length on cross city fallback, location aware listings, capturing the buyer's city while browsing, and rejection at checkout. The current approach deletes all of it.

STC delivers to a single Merit address. Merit delivers to the customer. STC is only ever asked about one city, so the buyer's location stops being an input to STC. It becomes an input to Merit's own delivery leg, which Merit already runs for every other supplier.

Problem in the direct to customer modelWhat one delivery address does to it
Buyer completes checkout, then is told the item cannot reach themGone. STC is only asked about the office city
Storefront shows national stock that is not nationally realGone. One warehouse, one truth
Cross city fallback needed before launchGone. Not needed at all
Buyer city must be captured during browsingGone. Never asked
STC gives no tracking URLGone. The customer sees Merit's tracking
Merit holds short addresses, STC needs coordinatesOne constant. The resolver stops being a per order lookup

The cost is one extra hop, plus Operations receiving and dispatching by hand. That is the same trade Operations already make for Almanea and Let's Tango.

Still a proposal, not a decision

Akshay Chennupati confirms on Monday 14 September whether STC delivers to one Merit address or direct to the customer. A direct to customer answer brings the per order coordinate lookup back, and the deleted rows above return with it.

04The journey, and what runs behind each step

Nine steps. Two of them are deliberately manual.

#What the customer doesWhat runs behind itWhere
1Browses the Apple Store, anywhere in Saudiget_stock_api gives STC's in stock flag for the office city, merged with Almanea and Let's TangoMPS-1579
2Picks a product, goes to checkoutNo STC call. The buyer's city does not matter yetno change
3Enters a delivery addressMerit validates it for its own delivery leg, as for every other supplierno change
4Places the order and payscheck_item_availability with the office coordinates, then place_order reserves stock, then confirm_order on paymentMPS-1580
5Sees the order confirmedMerit's order status. STC's statuses stay internalMPS-1578
6WaitsSTC ships to the Merit office. get_status_api or callback_api reports arrivalMPS-1578
7WaitsOperations receive, check and dispatch on Merit's normal couriermanual
8Gets trackingFrom Merit's delivery leg, not STC'sno change
9Returns within 7 daysReturns to Merit. Operations settle with STC by handmanual

The customer never experiences STC. They see an Al Fursan order, one tracking number, one point of contact.

05Where the legacy build actually is

Verified in Jira on 11 September 2026. Four sub-tasks are in flight, two items are not started.

TicketTitleStatusOwnerJourney step
MPS-1468STC Supplier Integration (parent)In ProgressAkshay Chennupatiall
MPS-1578STC API integrationIn Code ReviewVitaly Koval5, 6
MPS-1581Coordinates resolverIn Code ReviewVitaly Koval4, now a fixed constant
MPS-1579Inventory and price sync business logicIn ProgressVitaly Koval1
MPS-1580Order placement business logicIn ProgressVitaly Koval4
MPS-1649Stock validation API for Apple Store checkoutTo Dounassigned4
MP-12159Record STC stock availability on the order (Marketplace side)To Dounassigned4
MPS-1527API review and planningTo Dounassignedredundant, to close

Akshay confirmed on 10 September that the STC API integration itself is done. The only new work the single address approach adds is one configuration item: the Merit office address and its coordinates, set once.

06The checkout check, as rewritten on 11 September

MP-12159 and MPS-1649 were rewritten after the Marketplace sprint planning of 10 September.

The original requirement read the customer's short address, derived the city, checked STC stock for that city, and blocked payment when the item was unavailable there. That is not what is being built.

Available

STC holds it

The order item carries stc_fulfillable = true. The customer sees no change.

Not available

Existing supplier

stc_fulfillable = false. The order proceeds and the existing supplier fulfils it. The customer sees no change.

Timeout

Fails open

stc_fulfillable = unknown. The order completes as normal. The check never delays an order and never stops one.

The customer never sees an out of stock outcome, because if an item is live on the marketplace then either STC or the existing supplier holds it. Supplier switching itself stays manual. This ticket records the answer on the order, it does not route the order. Automated switching lands with the Ecommerce Solution.

Open, and it belongs to engineering

The check blocks nothing and shows nothing, so it does not have to sit in the checkout path. Option A runs it at the payment step with a two second budget. Option B runs it right after the order is placed, which removes every latency risk. Product recommends Option B.

07What is still blocking, and none of it is Merit's scope

Four questions sit with STC. Two have been open since the technical call of 19 August.

#Open itemOwnerWhy it blocks
1What the R7 field is, and what it keys toSTC IMS teamWithout it STC items cannot be mapped to the Merit catalogue, so step 1 cannot run
2Which price field is customer facing: netPrice, netPriceWithVat or grossPriceSTC IMS teamThe wrong field means the wrong money on every order at step 4
3Which order statuses are terminal, and what PARTIALLY-COMPLETED meansSTC IMS teamStep 6 cannot decide when the item has arrived
4Whether STC delivers to one Merit address or direct to the customerAkshay ChennupatiIt sets MPS-1580 and MPS-1581, and whether MP-12159 ships at all. Due Monday 14 September

One more, and it is commercial rather than technical. If the single address approach holds, the Merit office address does not exist in any document yet. Operations have to name it and confirm STC can deliver to it. The delivery SLA with a second leg added, and who absorbs the cost of that leg, are also unanswered.

08What the new Seller Portal has to build

This is the line for the laundry list, and the sizing that is missing.

  1. A supplier integration abstraction that is coordinate aware
    The Seller Portal models sellers and offers. STC is neither. It is an external distributor whose stock answer depends on a geographic point.
  2. City level boolean stock, synced into the catalogue
    No quantities exist, so the sync computes a binary availability flag. The legacy approach injects a static safe inventory value and Ops maintain a minimum at the location.
  3. Order placement with an idempotency key and a reservation window
    Place, then confirm, with roughly ten minutes between them. A failure has to drop the order to manual fulfilment rather than strand it.
  4. Status ingestion by poll or callback
    STC exposes no end user tracking, so the portal has to map STC statuses onto Merit's own order states.
  5. Price field mapping, once STC answers question 2 above
    Three price fields, one of which is customer facing.
  6. Returns, and settlement
    Manual in legacy at this volume. The new world should decide whether it stays manual.
What is being asked for

An effort estimate for the six items above, and any gap or question that has to close before build starts. The full brief written for this purpose is the STC API and Integration Brief, listed below. The Platform team's own number for the legacy build was 9 to 14 days, before the scope was cut to one delivery address.

09The documents that exist

All of these live in the product repo as markdown. None of them is in Drive yet, which is why this page exists.

STC API and Integration Brief, for Seller Portal assessment
7 July 2026. The endpoints, the payloads, Merit's location abstraction plan, seven open questions, and the ask of Tintash. This is the document to read before sizing.
Proposal: Minimal STC Integration in the Legacy System
3 September 2026. The single delivery address proposal, the nine step journey, what it deletes from scope, and what still blocks. Status is proposal, pending Akshay.
STC Apple Store Integration: Hybrid Fulfilment Proposal
7 July 2026. Attempt STC self shipping first, fall back to predefined STC warehouses with Merit managed SPL delivery. Pending business and operations sign off.
Al Fursan Apple Store: STC stock gaps, and what Marketplace needs to decide
20 August 2026. The launch plan with a manual fallback, an expected 5 to 10 percent cancellation rate, and five questions for the Marketplace team.
PRD: Stock Availability and Checkout Validation
Draft. Real time stock validation at checkout, quantity caps, inventory deduction after a successful order, and the original three second timeout budget. That budget was written for a blocking check and is now superseded by the fail open rule.
PRD: Location Based Product Visibility
Draft v1.1, 23 August 2026. Resolves the buyer country and gates physical offer visibility to a matching ship from country. Adjacent rather than STC specific, but it is the interface a coordinate aware supplier would plug into.

10Limits of this page

What it does not tell you, and what goes stale first.

No source code was read. The build state comes from Jira on 11 September 2026 and from the tickets' own descriptions, so a branch merged since then is not reflected here.

The new Seller Portal effort is unsized. Every number on this page describes the legacy build.

The single delivery address is a proposal, not a decision. Akshay's answer on Monday 14 September changes sections 3, 4 and 6 if it goes the other way.

The commercial questions are not answered anywhere: who carries the cancellation risk with Al Fursan, and whether the launch catalogue is full or limited to what a supplier can back nationally. Both have been open since 20 August.