The new target pos.app.ready.data runs for the entire POS session and can watch POS events, store data, and call non-visual APIs without rendering anything on screen. Extensions that do something other than "show something on the register screen" are finally officially supported.
They only run when rendered on a UI surface staff can see, such as a tile or modal. While they aren't displayed, your logic can't run either.
pos.app.ready.data stays resident for the entire POS session. It can watch POS events and run background logic without any UI.
The article explicitly lists the following three use cases for the background target.
Subscribe in real time to POS events such as transaction completion and the start or completion of cash tracking sessions.
Data storage based on the monitored events. You can keep records without any UI interaction.
You can call background APIs that don't render UI. See the official app background target documentation for details on supported APIs.
All you do is call shopify.addEventListener() to subscribe to POS events. It reads just like the web-standard addEventListener.
| Event name | When it fires | Example use |
|---|---|---|
| transactioncomplete | When a transaction (payment) is completed | Follow-up processing or record-keeping triggered by a sale |
| cashtrackingsessionstart | When a cash tracking session starts | Detecting and recording register opening |
| cashtrackingsessioncomplete | When a cash tracking session is completed | Detecting and recording register close-out |
Note: the article lists only the three events above (it says "Supported events include," so it may not be exhaustive). See the official app background target documentation for the latest list and best practices.
| Aspect | UI targets (traditional) | pos.app.ready.data (new) |
|---|---|---|
| UI rendering | Yes Renders to tiles, modals, etc. | No Renders no surfaces at all |
| Execution lifetime | While the UI is visible | The entire POS session stays resident |
| How it starts | Staff action (tapping a tile, etc.) | Starts automatically when the session begins |
| Main role | Displaying information and interacting with staff | Watching events, saving data, and calling non-visual APIs |
Specify this as the extension's target to get a background execution slot. The ".data" suffix signals that no UI is rendered.
Unlike UI extensions launched by staff actions, it stays alive for the whole session. Design your listener registration and state handling with an always-on process in mind.
A web-standards-style event listener API. Subscribe with an event name string ('transactioncomplete', etc.) and receive the event in your handler.
transactioncomplete / cashtrackingsessionstart / cashtrackingsessioncomplete. It starts with the core register-operations events: transactions and cash tracking.
The contents of the event object, the list of background APIs you can call, supported POS / API versions, and how it combines with UI extensions arenot covered in the article. Be sure to check the official app background target documentation and best practices before implementing.