Problem: the storefront availability widget shows our warehouse/dispatch date but labels it Odotettu toimitus (Expected delivery). Customers read it as delivery-to-them; some think we have already ordered the item and the date keeps moving. The displayed availability date from getAvailabilityWithShipping() is in fact when goods reach OUR warehouse (PurchaseOrder.delivery_date, or Supplier::calculateETA which already bakes in importer_stock_lead_time). It is NOT arrival at the customer.

Goal: show an estimated arrival-at-customer (Perilla) as a RANGE like Verkkokauppa (e.g. Perilla 5.7.-10.7. or n. 2 viikkoa), and stop the mislabelling.

Formula: arrival = warehouse_eta (already computed) + transit_lead_time (warehouse to customer, NOT modelled today).

Transit lead time design:

  • Cache the transit DURATION in business days, NOT an absolute date, so it is reusable across the whole catalog regardless of each product dispatch date.
  • Cache key: country : postcode-bucket : weight-bucket. Only a few dozen values for the whole catalog.
  • Source: Ingrid SIW. SIW requires a session per lookup (no session-less endpoint), so do NOT call it on PDP render. A scheduled job warms the cache per (postcode-bucket x weight-bucket).
  • Representative postcode: logged-in customer uses their session/default address postcode; anonymous uses a capital-city postcode per channel country.
  • Flat config range as fallback / safety net so the PDP never blocks on Ingrid (cache miss -> flat range + async warm).

Render:

  • Range or qualitative label (n. 2 viikkoa) depending on horizon.
  • Reframe dispatch vs delivery: Lahtee varastoltamme for the warehouse date.
  • New states mirroring Verkkokauppa: viivastynyt when the ETA date isPast(); ei tiedossa when no date at all.

Components:

  • New IngridTransitEstimator service (reuse app/Services/Ingrid/* IngridManager + generated DefaultApi).
  • Postcode resolver (session address / capital fallback).
  • Weight buckets.
  • Scheduled warm job + cache (TTL ~24h).
  • New render in resources/views/livewire/store/product/stock.blade.php and resources/views/components/store/product/stock.blade.php.

Stopgap shipped separately: copy-fix PR relabelling Expected delivery to Lahtee varastoltamme n. X plus a grey sub-line clarifying delivery time to customer is separate. Honest because the date already is the dispatch date.

Customer-facing arrival estimate (Perilla) on PDP availability widget

no votes yet

Tags

Shipping
Quick Actions
Activity
View recent activity and updates
Use arrow keys to navigate