iVendNextDevelopers Request a sandbox

12. Handheld and our other apps

For: a builder whose customer uses Handheld for receiving, transfers and counts, and wants an outside app to react to what Handheld books. Reference implementation: the event-feed loop of chapter 5 (../tools/feed_client/) and the system-sync sample of chapter 10 (../samples/s7_system_sync/), which reads the feed the same way. Neither handles Handheld's documents yet: you add a handler for the labels below.

The short answer

When to use it

When a customer says "when the warehouse receives goods, our system must know", "when a count is posted, our ERP must update" or "when stock moves between stores, tell us". The need is met by your own service following the shop's feed, not by anything in Handheld.

If the need is to change what a Handheld screen does or shows, that is product work on Handheld: there is no door for it (below). Say so in the request form (chapter 9) rather than working around it.

Steps: react to what Handheld books

  1. The shop registers your application on the event feed and names the record types you follow (chapter 5): the stock documents you care about. For receiving, transfers and counts that is a Purchase Receipt, a Stock Entry and a Stock Reconciliation.

  2. Pull the feed with the reference client (chapter 5, step 7). Each change arrives as events that name the record and what happened to it:

    The shop's document Event label
    Purchase Receipt submitted goods.received
    Stock Entry submitted stock.moved
    Stock Reconciliation submitted stock.counted

    A document type with no row in the label table arrives as its type in lower case, then the raw event (a Delivery Note submitted is delivery_note.on_submit).

    ⚠ Read the document before you act on the label. A return to a supplier is also a Purchase Receipt (marked as a return) and arrives as goods.received: a handler that adds stock on goods.received would book it as stock coming in, so check is_return. A receipt with no order, an issue and a transfer are all Stock Entries (stock.moved): read the entry's type. The kit has not yet seen Handheld book a document: which document each Handheld screen books is taken from Handheld's own design, not from a test.

  3. Read the document over the API when you need its lines. An event carries no content, and the document is read with your own key's rights.

  4. Act once. An event can arrive twice, and one change arrives as several events: act on the label you need and mark the rest done. Key your own write on the document's name, so a second delivery changes nothing (chapter 5).

  5. For a count, expect no approval inside Handheld. Handheld's count has blind counting, serial and batch capture, a variance review and a head-office worklist, and then posts. There is no in-app approval step: if the customer needs a manager to approve a count, that is a rule in your own service or a workflow in the shop (chapter 4), applied before or after, not a button in Handheld.

What is refused, and why

When your service is down, and when the till is offline

Technical notes

What the kit has proven

What it has not

Sources

See also

5. Outside apps and the event feed · 9. The extension points · 10. Integrations · 16. Possible, not possible, limits

This page in the kit