Device exits a specific zone

Subscribe to zone exit events to trigger workflows when assets leave a specific area — such as an OR suite, loading dock, or storage room.

📘

New to the WebSocket API?

Start with Realtime WebSocket Updates before diving into examples.

Filter

{ "filter": "@tracking.location_estimate.site.zone.zone_name = \"Room #1\" and tracking.location_estimate.site.zone.zone_name != \"Room #1\"" }

Replace Room #1 with your target zone name. The @ prefix on the first condition checks the previous value, so this only fires when a device transitions out of the zone rather than on every update while it's already elsewhere.

Response

When a device exits the zone, you'll receive a full device object:

{ "update": { .. device object .. } }

Finding Zone Names

You can look these up in the Luna Console, or query a known device in that zone via the REST API and inspect tracking.location_estimate.site.zone.zone_name.