Skip to main content

Partners and your own warehouses

Goods reach a store from one of two kinds of source:

  • a business partner with the SUPPLIER role, an outside company you buy from;
  • one of your own warehouses, which is a business unit of type WAREHOUSE in Business Unit Management.

🛑 Your own warehouse is never registered as a business partner. It already exists as a business unit, with its own id, GLN and addresses. Registering it again as a partner would give it a second identity that nothing connects to the first. Business Partner holds only its supply terms, keyed by the warehouse's business unit id.

Two kinds of source, two places for the lead time. Goods for the Uppsala store come either from Fjord Garden, a business partner with id V-20417 whose SUPPLIER role says 168 hours, or from the Jönköping distribution centre, a WAREHOUSE business unit with id DC-JKP whose warehouse supply terms say 48 hours. On a delivery the first is recorded with shipperType businessPartnerId and the second with shipperType businessUnitId.

The same split is how Goods Received records who shipped a delivery: shipperType is businessPartnerId for a partner and businessUnitId for one of your own business units, with the id in shipperId. See Goods Received external events.

Supplier terms​

The SUPPLIER role of a partner carries two optional values:

FieldMeaningValues
defaultLeadTimeHourshow long the supplier takes from order to delivery, unless something more specific says otherwisea whole number of calendar hours, 0 to 8760 (one year)
reliabilityScorehow reliably the supplier delivers, as your ERP rates ita number from 0.0 to 1.0, at most 9 decimals

Both may be left out or sent as null, which means not set. Neither may appear on the MANUFACTURER role.

âš  The lead time is in hours, not days. An ERP that holds lead times in days multiplies by 24 before sending: 7 days is 168, 2 days is 48. Calendar hours count weekends and holidays like any other hour.

Lead time in calendar hours. The ERP says 7 days, which is sent as 168. The ERP says 2 days, which is sent as 48. Hours count every hour of the calendar, including weekends. The largest value accepted is 8760, one year.

Hii Retail does not calculate the reliability score. It stores and publishes the value your ERP sends, so its meaning is whatever your ERP's rating means.

Warehouse supply terms​

One of your own warehouses gets its lead time through its own endpoint, keyed by its business unit id:

PUT /api/v1/warehouse-supply-terms/DC-JKP
Content-Type: application/json

{ "defaultLeadTimeHours": 48 }
FieldMeaningValues
defaultLeadTimeHourshow long the warehouse takes from order to delivery to a storea whole number of calendar hours, 0 to 8760, or null for not set

Before it accepts the request, the API asks Business Unit Management about the business unit:

Business Unit Management saysResponse
the business unit is of type WAREHOUSE202 Accepted
the business unit exists but is another type, such as a store400 Bad Request
there is no such business unit404 Not Found
it cannot be reached, or answers with an error502 Bad Gateway. Nothing is queued; send the request again

The same check runs on DELETE. GET does not ask Business Unit Management; it answers from what is stored, with 404 when no terms are stored for the business unit or they have been deleted.

Warehouse supply terms are held per business unit, so the caller's permission must cover that business unit. See Permissions.

What is not held here​

The terms below are agreed per article, not per source, so they belong to Ordering Options, a separate service that says what is bought, from which source, in which pack, and for which stores.

Minimum order quantities. A minimum is agreed per article and per pack (at least 48 of this article, in packs of 24). One number for everything a supplier sells would mean nothing when the same supplier sells both screws and lawnmowers, so neither a partner nor a warehouse carries one.

Why a minimum order quantity is not a supplier property. One supplier sells screws and lawnmowers. A single supplier-wide minimum of 10 would mean 10 screws, which is far too few to be worth an order, and 10 lawnmowers, which may be far too many. The minimum is agreed per article and pack: screws at least 48 in packs of 24, lawnmowers at least 1.

Which source supplies which article to which store. A partner is registered once for the whole tenant. Choosing Fjord Garden for the Uppsala store and another supplier for a store in Norway is decided per article and per store, not on the partner.

Lead times per store or per article. defaultLeadTimeHours is a default: the value to use when nothing more specific is known.