Skip to content

Add POS background scan event - #4671

Draft
aaronschubert0 wants to merge 1 commit into
2026-10-rcfrom
loops/pos-background-scan-event-types
Draft

Add POS background scan event#4671
aaronschubert0 wants to merge 1 commit into
2026-10-rcfrom
loops/pos-background-scan-event-types

Conversation

@aaronschubert0

@aaronschubert0 aaronschubert0 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Background

POS background extensions at pos.app.ready.data can observe transaction and cash-tracking events, but cannot observe barcode or QR scans. Foreground action targets receive the same data through the Scanner API signal.

POS runtime implementation: https://meteorite.shopify.io/repos/shop/world/pulls/2031046

Solution

Add the background scan event for API version 2026-10:

  • POS_EVENT_NAMES.SCAN is scan.
  • ScanEvent guarantees type, decoded data, and normalized source.
  • ShopifyEventMap exposes the event through shopify.addEventListener() on background targets only.
  • ui-extensions-tester injects the authoritative event type, matching the real sandbox.
  • A minor changeset documents the additive public API.

🎩

  • yarn build
  • yarn type-check
  • yarn test -- packages/ui-extensions-tester/src/tests/shopify-events.test.ts
  • yarn lint

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Adds POS_EVENT_NAMES.SCAN and a public ScanEvent payload to the POS
ShopifyEventMap so pos.app.ready.data extensions can register
shopify.addEventListener('scan', ...). Every event guarantees decoded
data and its normalized source (camera, external, or embedded),
matching the Scanner API vocabulary. The foreground Scanner API is
untouched and no scanner controls are added to the background target.

Assisted-By: devx/ae9ff078-8342-4c89-bbbf-e563920de0ee
@aaronschubert0
aaronschubert0 force-pushed the loops/pos-background-scan-event-types branch from 0c7cba4 to 6d1cd69 Compare September 2, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant