Consume Basket Events
My-Scan publishes basket-lifecycle events that other services can consume — this is what the Hii Attendant App uses for real-time monitoring (see Operations: Attendant). This guide covers what's published and how to subscribe as a new consumer.
This is a Google Cloud Pub/Sub topic, not an HTTP webhook. If you're looking for HiiRetail's webhook mechanism (subscribe-in-UI, Cloud Events over HTTP with HMAC signing), that's a separate system — see EXE: Webhooks. My-Scan's basket events are only available via Pub/Sub.
This guide describes the Cloud host environment. Basket monitoring events are a Cloud-only feature — see Architecture for how OnPrem differs; there is no basket-event topic to consume in OnPrem deployments.
What's published
My-Scan publishes one public topic today, mys.public.event.basket-updated.v1, on basket lifecycle transitions. See Configuration: Push Topics for the full naming-convention breakdown and where in the Core Service it's published from.
The public scope means it's open for consumption outside the owning system — but publishing to a topic doesn't automatically deliver anything to you. You need your own subscription.
Subscribing
Google Cloud Pub/Sub only delivers messages to subscriptions that exist at publish time — a message published while no subscription exists for it is lost, it isn't queued for later. To consume mys.public.event.basket-updated.v1, you (or your platform team) need to create a subscription against that topic before you can receive anything, following the naming convention {topic-name}+{subscription-name}.
Two subscription types are available, same as any Pub/Sub topic:
- Pull — your service polls the subscription for messages. Simpler to operate if you don't want to expose an inbound endpoint.
- Push — Pub/Sub calls an HTTP endpoint you expose whenever a message arrives (this is the pattern My-Scan itself uses for its own inbound integrations — see Configuration: Push Topics for an example of the receiving side).
Reference
- Configuration: Push Topics — topic name, naming convention, and payload publisher.
- Operations: Attendant — an existing consumer of this same topic, for reference.