iVendNextDevelopers Request a sandbox

1a. How it all works — where your app runs, where the data lives, why customers never collide

A ten-minute read for a developer meeting iVendNext for the first time: what an app is, where it runs (Docker, a container, a function, or nowhere), where a retail chain's data lives, how one app serves many customers (multi-tenant) without a conflict, how many apps and boxes you need, which endpoints call which, and what publishing and hosting cost you. Each section starts with a picture.

Download: How iVendNext apps work (PDF, this chapter to read offline or in a meeting); chapter 1c as How the data travels. Have one question? Questions developers ask.

For: anyone about to build for an iVendNext customer: an iVendNext Partner's developer, a licensed customer's IT team, the CitiXsys Consulting Team. No iVendNext knowledge needed.

The one idea. An iVendNext app is not software you install at the customer. It is data that goes into the customer's iVendNext, plus, if it needs one, a single web service that serves every customer.

1. The three pieces

Three pieces: the retail chain's own iVendNext, which CitiXsys runs for that chain; your app; and the App library. Your app is a data part, installed from your manifest into the chain's iVendNext, plus an optional web service that serves every chain and reaches the chain only through its front door. A chain's administrator installs your app from the App library, with consent. No app connects to the store data directly.

Some people call a chain's site a tenant. In this guide it is the chain's iVendNext site, or the retailer's site.

2. What your app is made of: data (records, fields, screens), plus an optional service

3. Where your service runs, and whether that is Docker

Three choices for where your app's code runs: your own server, iVendNext App Hosting, or nowhere when the app is only settings and records. Every one reaches the retail chain's cloud only through its front door; no app connects to the store data directly.

You choose one of three:

4. Where the customer's data lives

Where the chain's data lives. It stays in the chain's own iVendNext: sales, stock, customers, money, and your app's own record types, which your service reads through the API. Your service keeps nothing between calls by default. On App Hosting it keeps each retailer's connection, its address, secrets and key id, in the app's own encrypted table, and no sales or customers. Anything you keep in a store of your own, or send to an outside system, is declared in your manifest and shown to the chain before it installs. App Hosting and the App library run in AWS us-east-1; other regions are added when a customer needs its data there.

The chain's data stays in the chain's iVendNext. Your app reaches it through the API, as your app's own user, with only the rights the chain gives that user.

5. The three directions of a call, and which endpoint, key and secret each uses

Calls go three ways. One: your service calls the iVendNext API at the chain's own address, with your app's key, as your app's own user. Two: the chain's iVendNext calls your service, for a till key, a check at Pay or a Desk button, at your one address, signed with that chain's own secret. Three: your service calls an outside system, such as a loyalty or telecom system, with that chain's own account for it.

From To (the endpoint) Proved by
1 Your service The iVendNext API, at the chain's own address: https://<chain site>/api/… Your app's key, as your app's own user, with one narrow role
2 The chain's iVendNext (a till key, a check at Pay, a Desk button, a webhook) Your service, at your one address: https://<app>.ivendnext.app/… or your own A signature made with that chain's own secret, and the header naming the chain's site
3 Your service An outside system (a loyalty system, a telecom company, an ERP) That chain's own account for it

Direction 2 is what other platforms call a webhook or a callback. In iVendNext it is a till key, a check, a Desk button, a webhook or, read the other way round, the event feed, which your service pulls.

6. One app, many customers: why calls never collide

Two retail chains press the same key at the same moment. Each press is its own call: chain A's names chain A and is signed with A's secret, chain B's names chain B and is signed with B's secret. Two copies of your one service answer them at once. Each copy checks the call with that chain's own secret, taken from the retailers' connections, and answers from that chain's data only. A call signed with another chain's secret is refused. Your service keeps nothing between calls, or keeps it by retailer.

Two cashiers at two chains press your key in the same second. There is no conflict:

So a multi-tenant app needs nothing special from you beyond the template's handshake: one service, many chains, each call checked and answered on its own.

7. How many apps, how many boxes

One chain needs four things. As one app: one manifest carrying two till keys, a check at Pay, three record types and a Desk button, served by one service at one address; one version, one consent, one removal; on App Hosting one box at one price, free when it runs as a function and is listed in the App library. As four apps: four manifests and four services; four versions, four consents, removed one by one; on App Hosting four boxes at four prices; on your own server they can share one container. A separate copy for one chain only when you choose it.

A customer asks you for four things. Do you build four apps in four containers, or one?

8. How your app reaches the customer's iVendNext

9. Publishing is not handing us your code

Who sends what to whom. One: you publish your manifest and its card to the App library, signed with your key. Two, only if CitiXsys runs your service: you send iVendNext App Hosting a hosting order with your app.json and an image, or a function's package of the files it runs, never your repository. Three: the App library shows your app on its public list or on one chain's Made for you shelf. Four: the chain's administrator reads What it will do, ticks consent and installs. Five: the chain's iVendNext connects to your service, handing over its address, its key and the secrets the install made. Your code stays in your own repository.

Publishing and hosting are two separate steps. Publishing never sends your code, and neither gives us your repository.

10. What the customer sees

11. Words we use

You may say In iVendNext
tenant, instance, customer environment the chain's iVendNext site (the retailer's site)
plugin, extension, add-on app
deployment, provisioning a hosting order (only when CitiXsys hosts your service)
schema migration, database migration the manifest install, or an update to a higher version
webhook, callback a till key, a check, a Desk button, a webhook, or the event feed
API credentials, service account your app's own user and its key

Technical notes

Each claim above, with the page or code that proves it:

Next: 1b. One app from your laptop to the till, sample S18 followed step by step.

This page in the kit