Some dispense devices have only a passing concept of an ingredient: A technician enters the name of an ingredient during setup and then the beverage is ready to pour. While KOS can handle these simple devices, its infrastructure also provides a consistent developer experience, handling the most basic to the most complex devices. This allows applications to be written in a consistent way across a family of devices.
Freestyle micro-dosing is one of the more complex models when it comes to ingredients. Instead of BiB ingredients that are effectively plumbed into the device, micro-dosing utilizes smart cartridges, much like ink cartridges in a printer. Freestyle cartridges utilize RFID tags to identify ingredients, expiration dates, volume remaining, and other information. These cartridges are inserted into slots in shelves or towers, and are detected on-the-fly via RFID scanning. This allows many insertion processes to be triggered by physical events rather than user-software interactions.
Due to the nature of cartridges, there can be a great deal of business logic required during the insertion process. Cartridges can be inserted into the wrong slots, may be sold out before being inserted, may be expired, may be moved across dispensers, may have compatibility constraints with associated pumps, and so on. This is further complicated by the existence of double cartridges that contain two different ingredients, which requires validation of both ingredients as a group. The ingredient insertion process within KOS provides several abstractions and extension points to allow applications to scale from simple ingredient assignment to the complexities of a micro-dosed architecture.