iVendNextDevelopers Request a sandbox

14a. Deploying to a chain of stores

How your work reaches a customer with many stores and tills: what goes where, how the shop switches it on store by store, and how you update it and roll it back.

For: a builder whose work goes to a customer with many stores and tills (say 10 stores with 10 tills each, in 10 cities), and the customer's own team that switches it on. Reference implementation: Building a connected app and A till key (your application, connected by the shop) · Shipping your own data in a manifest and a Desk action (your data in the shop) · Set up fifty stores from one file with ../samples/s8_estate_rollout/ (configuration across stores) · 14. Testing and release (the gate before every change).

When to use it

Read it before you plan a customer's go-live. Read it again before every update you ship to a customer that has more than one store.

The one thing to know: one customer, one site

A customer's iVendNext is one site: one web address and one database. Every store is a set of records inside it: a warehouse and the store's till profiles. Every Desk browser in the back office and every till, whether a browser or the installed app, opens that same site. So 10 stores with 10 tills each is 100 tills on one site, not 100 installations.

That decides how you deploy:

Where your work lives: three layers

A customer's iVendNext, on our hosting, has three layers:

Layer What it is Who changes it Can your work touch it?
Server our machines the site runs on (not the shop's tills or PCs) our hosting team ⛔ never
Installation the program code: iVendNext and its apps, built as one unit and shared by many customers only our releases, for every customer on it ⛔ never. Code here would be code for every customer on it
Site one customer's database and files, at its web address the customer's administrator, in Desk only as data, through the doors in chapter 3

You never sign in to a server, and you never change code on an installation. Your work reaches a customer in one of two kinds today (Kinds 1 and 2), with a third, Kind 3, not available yet. Only data ever enters the site: your manifest today, and later a sandboxed function as a sealed file (Kind 3).

The three kinds of work, and how each is deployed

Kind 1: your application, which runs on your own servers

Your code runs on your servers or your cloud, in any language. It reaches the customer's site over the internet. To connect it, the customer's administrator creates records in Desk. They are settings, not software:

Nothing is installed, and nothing goes through us. Deploying means you release your own servers. Rolling out means the shop switches the connection on store by store (below).

Kind 2: your data, kept inside the customer's site

When your users should work on your records inside iVendNext, you describe them in a manifest (chapter 7, recipe). Bins and what is in them, warranty terms, a pick task, a field on Item, a print format: each with native screens. A manifest is a description, not a program. It can also declare the till keys, Desk buttons and services of Kind 1, so the shop does not have to type them in. A till key declared this way has been installed on our test shop, switched off, but has not yet been pressed on a till; a key record the test bench wrote directly has been pressed on a till screen in a desktop browser, not on a physical till (chapter 6, chapter 7).

Kind 3: a sandboxed function

Compiled WebAssembly that runs inside the product, on the server and on an offline till, in a closed box: no network, no clock, no database, only the extension point's input in and an answer out (chapter 8). Not available yet: no extension point runs one.

What the customer's users see

Your record types get the native iVendNext screens: form, list, report view, search, print and workflow buttons. Add workspaces, reports, cards, charts and Connections links that list your records under ours. A Desk button opens our dialog, and your answer shows in it. Users cannot tell a partner's screens from ours, because they are ours. When a screen cannot be native, your own page opens inside our frame, styled with the partner kit. On the till you get a key (a message or sale details) and a page in a sheet. You cannot redesign the till's own screens. The screen ladder, the approval rules and the limits are in chapter 13a.

Instead of a new record type in a product release. When our own team adds a feature, its record types ship in our code, in a release, to every customer. Yours ship as data in one customer's site, with the same native screens and no release of ours. What our code would do on the server comes from:

What our form scripts would do comes from:

A record type that posts to stock or the accounts cannot be yours. Your server creates our documents (a Sales Invoice, a Stock Entry) through the API instead (chapter 7).

How each way in reaches the stores

Way in (chapter 3) Kind How the shop takes it store by store Today
1. Configure — (settings) the estate roll-out file over the API names each store and region: plan, apply, verify, remove available
2. Outside app 1 the integration user's role and user permissions decide which stores' records it reaches available
3. Till key 1 switched on in POS Studio → the theme → Apps: every till whose profile wears that theme shows the key. Give the pilot store's till profiles their own theme, then move the other stores onto it on our beta build; in a customer release with POS release 1.0
Desk button 1 the people who hold its role on our beta build; in a customer release with POS release 1.0
Your page 1 on the till, its store setting lists the till profiles it opens on (empty means every till); in Desk, the people who hold its roles on our beta build; in a customer release with POS release 1.0
Check before payment, capture 1 the POS Profiles each serves (empty means every till); at most three checks answer one profile on our beta build; in a customer release with POS release 1.0
Scan source 2 switched on for the whole site; a source with a warehouse field finds only the till's own store's units on our beta build; in a customer release with POS release 1.0
Field rules 2 by theme: every till whose profile wears the theme, at its next start; there is no switch on our beta build; in a customer release with POS release 1.0
4. Manifest 2 its records and fields are present in the whole site and reached through roles; what it declares (keys, buttons, pages) follows the rows above installed by our team
5. Sandboxed function 3 as for its extension point not yet

What has no store switch. These apply to the whole site the moment they are installed or switched on, so plan them as a site-wide step, at a quiet hour:

Steps: a safe roll-out across the chain

  1. Build and test on your sandbox (chapter 2). The hosted sandbox is not open yet.
  2. Test on the customer's staging shop, if it has one, and run the customer's release gate there (chapter 14). How a customer on our hosting gets a staging shop is not covered by the kit yet.
  3. Put it in the customer's site:
    • Kind 1: the administrator creates the connection records and ticks each service's consent.
    • Kind 2: your manifest is installed (today by our team; being built: by the administrator, from the screen in Desk).
  4. What calls your service waits switched off, apart from a manifest's webhooks (and its notifications, workflows and sale details, which are on from install). Each service that sends data waits for its own consent tick (chapter 7).
  5. Switch on one pilot store:
    • A till key: put it in a theme that only the pilot store's till profiles wear. Plan on each till showing a key that was just switched on the next time it is opened.
    • A page shown on the till: list the pilot store's till profiles in its store setting, and put its till key in the pilot theme. The store setting alone leaves the key showing on every till that wears the theme, and outside the pilot a press says the button's app is not available.
    • Desk screens and buttons: give your role to the pilot store's staff only. ⚠ Leave the store setting empty on a service a Desk button or Desk page calls. A call from Desk names no till profile, so a service limited to some till profiles is never called from Desk.
  6. Watch the pilot.
    • Desk buttons and pages write a row in the shop's Extension Log on every call: the outcome (answered, answer refused, timeout, unreachable…), the time it took, and a one-line verdict, never the body or the secret. Rows about a page on the till also name the till profile.
    • A till key's failures reach only the shop's error log today.
    • Webhooks and the event feed write no Extension Log row.
    • Your own server's log is the full record of what you answered.
  7. Widen: a region, then the whole chain. Move more till profiles onto the theme, add them to a page's store setting, or give the role to more staff.

Worked example: 10 stores, 10 tills each

A partner ships a warranty service, with a Desk report of warranties sold (Kind 2, a manifest) and a till key that shows the warranty terms during the sale (Kind 1, the partner's server):

  1. The partner tests both on its sandbox and on the customer's staging shop.
  2. The manifest is installed once into the customer's site. The warranty records, their screens and the report exist for all 10 stores at once, and appear only to people who hold the partner's role.
  3. The administrator ticks the till key's consent, then gives the 10 till profiles of the pilot store (Store 1) a theme carrying the key. Only Store 1's tills show it.
  4. A week of Store 1's sales is read in the partner's own log and in the shop's error log.
  5. The administrator moves the 30 till profiles of the next three stores onto the theme, then the rest. The warranty role goes to each store's staff as its tills get the key.
  6. The partner later improves the terms on its server, first for Store 1 only, by reading store in each call's context, then for every store.

Your own server's releases skip the shop's switch

Your server answers every store at once. A change you release there reaches every till on its next call, whatever the shop has switched on. Roll it out on your side the same way:

Updating a manifest

Rolling back

When our release changes the product

We release one product to every customer. Your work keeps running because it only uses published ways in: the API, the event feed, the extension points and the manifest format (manifest_version). The calls for a Desk button, a check and a capture carry X-iVendNext-Point: <point>/<version>; a till key's call names its version in its User-Agent (iVendNext-POS-AppKey/1). How long a version keeps working is in chapter 18: a preview until iVendNext POS release 1.0, then 12 months after its successor ships. Re-run the customer's release gate before every one of our upgrades (chapter 14).

What iVendNext sees

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

See also

3. The ladder and the four rules · 5. Outside apps and the event feed · 6. Till keys · 7. Manifests · 13a. Screens and user experience · 14. Testing and release · 17. Submitting, support, feedback

This page in the kit