Vending Route app icon Vending Route

What Is a DEX File? A Vending Operator's Guide

A DEX file is the audit record a vending machine produces about itself: how many vends it has made, how much money it has taken, what each selection sold and at what price, and which errors it has logged. The format is DEX/UCS, carrying data written to the EVA-DTS standard, and once you can read one you no longer have to count a machine by hand to know what it did since the last visit.

Where the name comes from

DEX stands for Direct Exchange, and UCS for Uniform Communication Standard. The pair was borrowed from the grocery industry in the early 1990s, when the National Automatic Merchandising Association needed a way for route drivers to pull a machine's figures without opening a mechanical counter. The data inside the file follows EVA-DTS, the European Vending Association Data Transfer Standard, which is why you will see both names used for what is, in practice, the same thing. People say "DEX file", "DEX read", "DEX audit" and "EVA-DTS file" interchangeably.

Almost every snack, soda and food machine built in the last twenty-five years can produce one. Older machines expose it through a DEX port on the controller board; newer machines and most card readers and telemetry devices produce the same file and send it out over the cellular network.

What is in a DEX file

Open one in a text editor and you will see a plain text file, one record per line, each record a code followed by fields separated by asterisks. The envelope starts with DXS and ends with DXE, and the real content sits between ST and SE segments. A short one looks like this:

DXS*1234567890*VA*V0/6*1
ST*001*0001
ID1*VMC12345678*MODEL-X*1234
ID4*2*USD
VA1*1842750*31204*49800*842
CA2*1250300*21855*31200*521
PA1*10*125
PA2*412*51500*8*1000
PA1*12*150
PA2*96*14400*2*300
EA1*EGS*20261014*0812
G85*A1F0
SE*12*0001
DXE*1*1

The record types that matter to an operator:

RecordWhat it carriesWhy you care
ID1Machine serial number, model, software buildMatches the file to the right machine without anyone typing it
ID4Currency and how many decimal places the money fields useTells a reader whether 125 means 1.25 or 125
VA1Total value and count of vends, since init and since the last resetThe headline sales number for the machine
CA2 / CA3 / CA4Cash sales, cash in (bills and coins), cash out (change paid, cash-to-box)What should be in the cashbox when you open it
DA2Cashless sales (card reader)Reconciles against your card processor's statement
PA1 – PA5Each selection: its id and price, then its vends and value, and discounts, test vends and free vendsPer-coil sales, which is what drives your pick list
EA1 – EA7Events: door open, power loss, bill jam, sold-out, and when they happenedWhy a machine went dark between visits
MA5Manufacturer-specific fieldsTemperature on a food machine, for example; format varies by maker
G85A CRC-16 checksum of everything above itProves the file was not truncated or corrupted in transfer

Interval and cumulative counters

Most of the counting records carry two sets of numbers: a figure since the machine was initialised, and a figure since the last reset. A read usually resets the interval counters, so the "since last reset" fields give you exactly what happened between two visits, and the "since init" fields let you catch a missed read. If your software only looks at cumulative counters, it should take the difference between consecutive files and treat a negative difference as a board reset or a swapped controller, never as negative sales.

How a DEX file gets from the machine to you

Three paths are common, and most routes use more than one.

  1. At the machine. The oldest way is a handheld plugged into the DEX port during the visit. A more common modern equivalent is a telemetry device or card reader that stores the read and hands it to a phone over Bluetooth or Wi-Fi, or lets you export it as a file. Either way you end up with a .dex or .txt file per machine per visit.
  2. Over the air. Card readers from Nayax, Cantaloupe, PayRange and others pull a DEX read from the controller on a schedule and upload it. Your operator portal then shows a stock level per coil, and some vendors expose that through an API so other software can fetch it.
  3. Through an API of your own. If you run a telemetry box or a reader with a developer feed, the cleanest arrangement is a device that posts the raw file to an endpoint the moment it is pulled, so nobody has to carry a file anywhere.

What to do with it

The value of a DEX file is not the file; it is the three questions it answers without a count.

The parts that go wrong

DEX is a standard with dialects. Expect the following, and prefer software that treats them as warnings rather than failures:

Rule of thumb. A DEX read tells you what the machine believes it sold. It does not know about a coil that jammed and dropped nothing, a product a driver gave away, or stock that walked out the back. Treat a DEX-derived stock level as an estimate until somebody counts, and label it as such so a driver can tell the difference.

How Vending Route uses DEX files. Vending Route reads EVA-DTS files directly: a driver adds the file on the visit screen, or any device posts the raw file to the operation's ingest API, and the read is matched to the machine by its ID1 serial. Per-selection sales drop the stock estimate, cash-to-box is checked against what the driver pulled, and every figure on the machine page says whether it came from a DEX read, a Nayax sync, an import, a count or an estimate. There is no cable and no serial adapter to buy: a DEX read arrives as a file or through the API. Free for up to three machines in the web app, with the phone app on Google Play. More about Vending Route.

Open the Vending Route web app Everything Vending Route does

More guides: all Adelyons guides