iVendNextDevelopers My apps

4. Configure first

Most of what a retailer asks for is already in iVendNext as a setting. This chapter shows how to set it up: the retailer's administrator sets these in iVendNext Desk, or runs a one-time script, and nothing of yours runs in the retailer's iVendNext. It is for every builder, before any code: most needs stop here.

Next: 7. Manifests

What the cashier meets once the pack is applied: member price, reasons, a line detail, an IMEI, a void reason

Settings only, no code: the till gives a member their price, asks for a reason on a markdown and on a void, checks a line detail, and asks for the phone's IMEI.

Reference implementation: Setting iVendNext up with no code with the sample ../samples/s5_config_pack/ (coded reasons, IMEI tracking, one more detail per line, member pricing), and A receipt laid out for your market with ../samples/s4_receipt_pack/.

Built it in Desk already? Capture from a site on My apps, or ivn capture --site <site>, turns it into an app (Build your first app, step 2).

When to use it

Always first: rung 1 of the ladder (chapter 3, which lists everything that is configuration). Check this chapter and the needs catalogue before you propose an app. This chapter teaches the five set-ups the kit has built and tested, in steps below; the four last rows are settings the kit has looked at on a sandbox; each card says which parts were run and which were not.

You want The retailer's own setting Card
A coded reason when a cashier voids, returns or discounts Reason Code Master rows, and the switch for that type in Retail Setting (a void reason also needs save_voided_transaction) reason-codes
The IMEI of every phone sold, once the item's Has Serial No; the IMEI is the serial number, received with the stock imei-per-phone-sold
One more detail on a line, for goods with no serial number a Transaction Item Attribute (a name, a pattern, an order) line-detail-for-goods
A member price one Customer Group per tier, and one promotion per tier. A promotion cannot be pointed at a customer group; it can only exclude groups. So each tier's promotion excludes every other group: the other tiers and every non-member group member-price-by-tier
A receipt for your market: tax number, address, logo, a line per VAT rate, a second language a print format (chapter 7), then chosen on the till's POS Profile. For the address, tax number and a second-language footer alone, the register's Receipt Header and Receipt Footer print on the shipped receipt without copying it (chapter 9) receipt-for-your-market
A customer statement, printed or sent on a schedule Process Statement Of Accounts: pick the customers, the layout, the dates, the frequency and the sender. The schedule needs an outgoing e-mail account; run the ageing on the customer's site before you promise it debtors-statement
One branch to see only its own stock and the head office's in Desk, a User Permission on Warehouse, one row for each store, for each user. Three stock reports ignore it (one only in its default layout): test every stock report the user may open. At the till, the POS Profile's Stores this till may see: the listed stores only, a head office in the item card only (the card branch-sees-own-stock) branch-sees-own-stock
A reminder when a store's stock is below its level Item Reorder rows on the item (store, level, quantity, type) and the automatic-request setting in Stock Settings; leave the row's warehouse group empty. The request it makes is submitted, never a draft low-stock-reminder
A column the retailer wants on a record's list the list's own column settings, or the record type's list settings. Only the record's own fields; no total of its rows list-columns

Steps: reasons, IMEI, line detail, member pricing

  1. Copy config.json and change the names, codes and numbers to the retailer's. It is the whole set-up as data. The PP CFG prefix is only there so the sample's test can find its records.

  2. Give the script a key of a user who may edit those records. System Manager, Retail Manager, Item Manager, Stock Manager and Sales Master Manager together are enough (measured). It is the administrator's key, used once.

  3. Run it:

    PP_BASE=https://your-shop PP_KEY=<api key> PP_SECRET=<api secret> python3 samples/s5_config_pack/apply_config.py
    

    You can run it twice: nothing doubles. Each run recomputes the member promotion's exclusion list: every customer group with no groups under it, apart from the tier's own, so Individual, Commercial and the walk-in customer's group are excluded too. Until you run it again, a customer group added later gets every tier's discount. S5 carries one tier; for several tiers, sample S22 makes one promotion per tier the same way. --remove undoes it, except the stock: the item, its price, the unsold serial numbers and the booked Material Receipt stay. On a real site use your own IMEIs and quantities.

  4. iVendNext needs a default Company. A sale of a serial-tracked item takes its company from it. Without one, the first IMEI sale fails with "Error: Value missing for Serial and Batch Bundle: Company".

  5. Nothing to do at the till. The cashier is offered the reasons, asked for the IMEI, offered the line detail, and gets the member price once the member is attached to the sale. Each costs an extra step per line: switch on only what the retailer will use.

Limits to know before you rely on these settings:

Steps: a receipt for your market

A sale at two VAT rates, and its tax invoice in the till's Print sheet

A sale at two VAT rates, then its tax invoice in the till's Print sheet: logo, address, tax number, each line's VAT rate and the taxable value per rate, in English beside Arabic.

  1. Put the facts where iVendNext keeps them, not in the layout: the tax ID on the Company, an Address linked to it, and the Company Address on the till's POS Profile. iVendNext copies them onto each sale when it is saved (the sample adds one field for the tax ID), and the layout prints what the sale holds and reads no other record, so one layout serves every company. A sale saved before the package was installed has no tax number.

  2. Copy receipt.html and logo.png and edit the words, the order and the logo. VAT rates are read from each sale's own lines, never typed in, so a reprint should keep its old rate. Arabic sits beside English in a row marked right-to-left; the logo is written into the page. A script, a frame or an event attribute in a template is refused.

  3. Build and check, before anyone installs it:

    python3 samples/s4_receipt_pack/build.py
    python3 tools/manifest/validate.py samples/s4_receipt_pack/manifest.json     # VALID, exit 0
    
  4. Install the manifest: on your sandbox with ivn try; on a customer's site, by its administrator from the App library once you have published it (chapter 7). The shelf key Try shows for any other site is for trying: it runs on your app's free sandbox copy.

  5. Choose it on the till profile: Desk → POS Profile → the profile → Print Format → Save. This step is configuration; a manifest has no kind for it. The till reads the format at each print, so it is live on the next receipt. The save is refused, with the reason, if the format is not one for a POS sale or cannot print the register's latest booked sale.

  6. Book a sale and open the Print sheet to see it.

Limits to know before you ship a receipt:

What is refused, and why

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

No service of yours is involved: everything here lives in the retailer's iVendNext, so there is nothing to be down. Member pricing works offline for a member on the list of customers the till keeps for offline use: the till takes the member discount from its own copy of the retailer's promotions, whether the member was attached before or after the connection dropped, and the walk-in customer, whose group the promotion excludes, pays full price. The cashier sees the discount and a total marked Provisional, takes cash, and the sale is held; when the connection returns the till lists it as matching, the cashier posts it, and the booked sale equals what the till showed. From the code, a customer the till's list does not hold gets no member discount offline. The rest of this chapter has not been tried offline. One limit is known: an offline sale prints a provisional slip only, which shows the discounted total but no discount line; the final receipt format is for the booked sale.

Technical notes

The pictures

Both were walked on our test bench on 2026-10-10, iVendNext POS app at 87812e141, in the till frame (/pos?frame=terminal, 1440 wide). The S5 walk ends with the sale voided, so nothing was sold. The S4 walk sent nothing to a printer; the test bench's currency is the Rand, so the invoice shows R where a UAE retailer shows its own. Each sample's README has the stills, step by step.

What the kit has proven

What it has not

See also

3. The ladder and the four rules · 7. Manifests · 9. The extension-point catalogue and requests · Build your first app · 16. Possible, not possible, limits

This page in the kit