HelpCenter

Explore
Parlevel - Enterprise Data Service (EDS) - Data Dictionary
Updated

Purpose

This document provides a comprehensive overview of data available through the Parlevel Enterprise Data Service (EDS), a Snowflake-based data warehouse solution for Parlevel VMS customers. The EDS aggregates data from multiple VMS database instances into unified views, providing enterprise customers with consolidated reporting and analytics capabilities.
 
Please see attached .pdf for a downloadable version of this article.

Overview

Common Fields

All tables include a standard vms column as the first field:

  • Field: vms
  • Type: varchar(200)
  • Description: VMS database name identifier
  • Purpose: Identifies the source VMS database for multi-tenant aggregation
  • Applies to Vending: Yes
  • Applies to Kiosks: Yes

 Dimension Tables

Dimension tables contain descriptive attributes about business entities such as machines, locations, products, and users.

machines_and_kiosks

The table outlines the characteristics of machines and micro market kiosks.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the machine or kiosk in the database
nameYesYesName of the machine or kiosk
serial_numberYesNoSerial number of the hardware
device_idYesNoID of the telemeter or kiosk used by our software for identification
typeYesYesType of machine or kiosk
connected_statusYesYesIndicates if the machine or kiosk is connected or disconnected
make_modelYesNoMachine make or model
location_idYesYesForeign key; relates the machine or kiosk to a location in the locations table
last_sale_atYesYesDate and time of the last recorded sale for this machine or kioskAll times are in UTC
last_service_atYesYesDate and time of the last recorded service for this machine or kioskAll times are in UTC
offlineYesYesIndicates if the machine or kiosk is online or offline
last_comm_atYesYesDate and time of the last recorded communication for this machine or kioskAll times are in UTC
cst_idYesYesCustom ID that can be set by the operator; it represents the Asset ID
kiosk_modelNoYesKiosk model
vmc_modelYesNoControl board model; pulled from DEX
pairedNoYesIn cases where there is more than one kiosk at a micro market, this column will be populated for the secondary kiosk, with the value being the ID of the primary kiosk
last_audit_atYesYesDate and time of the last recorded audit for this machine or kioskAll times are in UTC
deleted_atYesYesIf this column is not null, it means this machine or kiosk was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
subsidy_group_idYesYesForeign key; if applicable, relates the machine to a subsidy group in the subsidy_groups table that defines which products receive subsidies and at what rates
effective_commission_rateYesYesThe effective commission rate that applies to this machine after resolving the hierarchical commission logic (broker > machine config > location config > account config > direct values)
effective_commission_typeYesYesThe type of commission that applies (text: “Percentage” or “Flat Rate”)
card_readerYesYesFlag indicating if the machine has a card reader installed
cc_commissionYesYesFlag indicating if card sales should be included in commission calculations (null means use system default)
tax_percentYesYesStatic tax percentage for this machine if not using dynamic tax calculations
bottler_asset_numberYesYesBottler asset number assigned to the machine
total_in_coinmechYesNoDollar value of money in the machine as of the last DEX file received

routes

The table contains all existing routes.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the route in the database
nameYesYesName of the route
driver_idYesYesForeign key; relates the route to a driver in the users table
truck_idYesYesForeign key; relates the route to a truck in the trucks table
deleted_atYesYesIf this column is not null, it means this route was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

scheduled_routes

This table contains services, which are occurrences of a route in the routes table.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the scheduled route in the database
route_idYesYesForeign key; relates the scheduled route to a route in the routes table
driver_idYesYesForeign key; relates the route occurrence to the driver it was assigned to at the time it happened, referencing the users table
truck_idYesYesForeign key; relates the route occurrence to the truck it was assigned to at the time it happened, referencing the trucks table
statusYesYesStatus of the route occurrence
created_atYesYesDate and time the route occurrence was plannedAll times are in UTC
started_atYesYesDate and time the route occurrence actually startedAll times are in UTC
finished_atYesYesDate and time the route occurrence was actually completedAll times are in UTC
service_atYesYesDate and time the route occurrence was planned forAll times are in UTC
deleted_atYesYesIf this column is not null, it means this route occurrence was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

locations

This table lists locations.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the location in the database
nameYesYesName of the location
type_nameYesYesType of location (text: e.g. “Hospital”, “Office”, “School”, “Factory”, etc.)
account_idYesYesForeign key; relates the location to an intermediary client account in the accounts table
route_idYesYesForeign key; relates the location to a route in the routes table
created_atYesYesDate and time the location was created in the VMSAll times are in UTC
updated_atYesYesDate and time the location was last updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this location was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
tax_group_idYesYesForeign key; relates the location to a tax group in the tax_groups table which defines which tax rates apply at this location
effective_commission_rateYesYesThe effective commission rate that applies to this location after resolving the hierarchical commission logic
effective_commission_typeYesYesThe type of commission that applies (text: “Percentage” or “Flat Rate”)
sales_taxYesYesStatic sales tax percentage for this location if not using tax groups
ocs_statusYesYesStatus indicating if this location uses OCS (Office Coffee Service)
ocs_route_idYesYesForeign key; relates the location to the route that services OCS at this location in the routes table
streetYesYesStreet address of the locationRetrieved from addresses table via polymorphic join; NULL if no address on file
cityYesYesCity of the locationRetrieved from addresses table via polymorphic join; NULL if no address on file
stateYesYesState of the locationRetrieved from addresses table via polymorphic join; NULL if no address on file
zipcodeYesYesZip code of the locationRetrieved from addresses table via polymorphic join; NULL if no address on file
countryYesYesCountry of the locationRetrieved from addresses table via polymorphic join; defaults to USA
latYesYesLatitude coordinate of the locationRetrieved from addresses table via polymorphic join; NULL if address not geocoded
lngYesYesLongitude coordinate of the locationRetrieved from addresses table via polymorphic join; NULL if address not geocoded

accounts

This table contains information about accounts—these are the clients of operators.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the account in the database
nameYesYesName of the account
numberYesYesNumber assigned to the account
created_atYesYesDate and time the account was created in the VMSAll times are in UTC
updated_atYesYesDate and time the account was last updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this account was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
effective_commission_rateYesYesThe effective commission rate that applies to this account after resolving the hierarchical commission logic
effective_commission_typeYesYesThe type of commission that applies (text: “Percentage” or “Flat Rate”)
cost_of_goods_commissionsYesYesFlag indicating if cost of goods should be deducted from gross sales when calculating commissions (1=yes, 0=no)
broker_nameYesYesName of the broker who manages this account (if applicable)

users

This table contains information on system users, including roles such as admin, manager, and

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the user in the database
usernameYesYesUsername of the user
roleYesYesRole assigned to the user
activeYesYesFlag indicating if the user is active
created_atYesYesDate and time the user was createdAll times are in UTC
updated_atYesYesDate and time the user was last updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this user was soft deleted, it won’t be possible to use it to access our systems; it indicates the date and time it was deletedAll times are in UTC

trucks

This table lists trucks.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the truck in the database
nameYesYesName of the truck
created_atYesYesDate and time the truck was created in the VMSAll times are in UTC
updated_atYesYesDate and time the truck was last updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this truck was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

products

This table lists products along with some of their characteristics.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the product in the database
nameYesYesName of the product
brandYesYesBrand of the productRetrieved from operator_product_brands table via brand_id; products without a valid brand are excluded from this view
manufacturerYesYesManufacturer of the productRetrieved from operator_product_manufacturers table via manufacturer_id; products without a valid manufacturer are excluded from this view
typeYesYesType of productRetrieved from products table and mapped via eds_enum_mappings; shows product type classification
case_quantityYesYesUnits per case of this product
priceYesYesCurrent price of the product
costYesYesCurrent cost of the product
statusYesYesStatus of the productRetrieved from wh_inventory table; shows warehouse inventory status for the product; products without warehouse inventory are excluded from this view
custom_nameYesYesFlag that indicates if the name of the product was modified by the operator
cst_idYesYesCustomer code for the product
tax_class_idYesYesForeign key; relates the product to a tax class in the product_tax_classes table which defines how the product is taxed
created_atYesYesDate and time the product was createdAll times are in UTC
updated_atYesYesDate and time the product was last updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this product was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
sizeYesYesSize of the product (e.g. “12 Fluid Ounce CAN”, “20 oz”)Retrieved from product_sizes table via product_size_id; defaults to “Not Specified” if no size on file
containerYesYesContainer type of the product (e.g. Can, Bottle, Bag, Bar, Box)Retrieved from products table and mapped via eds_enum_mappings (table_name=‘products’, column_name=‘container_type’)

product_upcs

This table stores product UPCs.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the product_upc in the database
product_idYesYesForeign key; relates the UPC to a product in the products table
upcYesYesUPC (12-digit barcode used to identify product)
created_atYesYesDate and time the UPC was created in the VMSAll times are in UTC
updated_atYesYesDate and time the UPC was last updatedAll times are in UTC

mm_users

This table lists micro market users, those with an account and a Parlevel Wallet.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idNoYesPrimary key; ID of the mm_user in the database
account_idNoYesForeign key; relates the user to an account in the accounts table
first_nameNoYesFirst name of the user
last_nameNoYesLast name of the user
emailNoYesEmail of the user
user_numberNoYesUser number input by the user when creating their account
last_activityNoYesDate and time of last registered activityAll times are in UTC
balanceNoYesCurrent account balance
email_receiptsNoYesFlag indicating if the user opted for email receipts
created_atNoYesDate and time of user creationAll times are in UTC
updated_atNoYesDate and time of user last updateAll times are in UTC
deleted_atNoYesIf this column is not null, it means this user was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

mm_assets

This table contains information about micro market assets.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idNoYesPrimary key; ID of the mm_asset in the database
cst_idNoYesCustom ID assigned to the asset by the operator
machine_idNoYesForeign key; relates the asset to a machine or kiosk in the machines_and_kiosks table
location_idNoYesForeign key; relates the asset to a location in the locations table
typeNoYesType of asset
nameNoYesName assigned to the asset
created_atNoYesDate and time the asset was created in the VMSAll times are in UTC
updated_atNoYesDate and time the asset was last updatedAll times are in UTC
deleted_atNoYesIf this column is not null, it means this asset was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC Fact Tables Fact tables contain transactional and event data, recording business activities and measurements.

Fact Tables

services

This table contains information about the planning and service of individual machines or micro

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the service in the database
scheduled_route_idYesYesForeign key; relates the service to a route occurrence in the scheduled_routes table
machine_idYesYesForeign key; relates the service to a machine or kiosk in the machines_and_kiosks table
location_idYesYesForeign key; relates the service to the location it was assigned to at the time, referencing the locations table
statusYesYesStatus of the service to the machine or micro market
typeYesYesType of service planned for the machine or micro market
bag_numberYesYesNumber on the money bag
amount_soldYesYesTotal amount of money sold from previous service to this one, and expected to be picked up
amount_collected_billsYesYesAmount of money in bills collected from service; input during consolidation
amount_collected_coinsYesNoAmount of money in coins collected from service; input during consolidation
amount_refundsYesYesAmount of money refunded to client or consumer during service; input by the driver
amount_change_addedYesNoAmount of money added to the machine as change during service; input by the driver
overshortYesYesDifference between expected amount of money and collected amount of money; calculated after consolidation
amount_card_salesYesYesAmount of money sold in cashless sales from previous service to this one
route_orderYesYesThe position or sequence in the route where this machine or micro market will be serviced
dex_expected_billsYesNoAmount of money expected to be collected in bills, according to DEX
dex_expected_coinsYesNoAmount of money expected to be collected in coins, according to DEX
auditYesYesFlag indicating if an audit was scheduled
audit_atYesYesDate and time machine or micro market was auditedAll times are in UTC
wallet_purchases_totalNoYesAmount of money sold in wallet credit between last service and this one
created_atYesYesDate and time the service was plannedAll times are in UTC
updated_atYesYesDate and time the service was updatedAll times are in UTC
deleted_atYesYesIf this column is not null, it means this service was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
user_idYesYesUser that executed this service
serviced_atYesYesDate and time the service was executedAll times are in UTC

fill_rate

This table describes the changes in inventory of a specific slot because of a service.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the fill_rate record in the database
daily_route_idYesYesForeign key; relates the inventory change to a scheduled route in the scheduled_routes table
service_idYesYesForeign key; relates the inventory change to a service in the services table
machine_idYesYesForeign key; relates the inventory change to a machine or micro market in the machines_and_kiosks table
slot_idYesYesForeign key; relates the inventory change to a slot in the slots table
product_idYesYesForeign key; relates the inventory change to a product in the products table
former_product_idYesYesForeign key; if there was a product change, it indicates the previous product, referencing the products table
pairedYesYesFlag indicating if this was a paired slot at the time of the inventory change
parlevelYesYesParlevel of the slot
inventory_beforeYesYesInventory before service
inventory_afterYesYesInventory after service
priceYesYesPrice of an individual product at the time
inventory_stocked_finalYesYesQuantity of units stocked in the machine or micro market during service

slots

This table contains information of each slot in a machine or micro market, and its current settings

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the slot in the database
machine_idYesYesForeign key; relates the slot to a machine or kiosk in the machines_and_kiosks table
rowYesYesRow of the slot
columnYesYesColumn of the slot
parlevelYesYesCurrent parlevel of the slot
capacityYesYesCurrent capacity of the slot
quantityYesYesCurrent inventory of the slot
priceYesYesCurrent price of the slot, per the VMS
price_dexYesNoCurrent price of the slot, per the last received DEX
product_idYesYesForeign key; relates the slot to product in the products table
cst_aliasYesYesCustom name that the operator can give the slot
mdb_aliasYesYesMDB protocol alias for the slot
pairedYesYesIf the slot is paired to another one, this column will contain the id of the primary slot
daily_consumption_rateYesYesAverage units purchased from this slot per day
mm_asset_idNoYesForeign key; relates the slot to an asset in the mm_assets table
created_atYesYesDate of creationAll times are in UTC
updated_atYesYesDate of last updateAll times are in UTC
deleted_atYesYesIf this column is not null, it means this slot was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

sales

This table records individual slot sales. In vending, sales are tracked by the total number of units

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the sale in the database
slot_idYesYesForeign key; relates the sale to a slot in the slots table
product_idYesYesForeign key; relates the sale to a product in the products table
quantityYesYesNumber of units sold
priceYesYesPrice per unit at the time of the sale
total_taxNoYesTotal amount of taxes charged
total_priceYesYesTotal amount of money received (quantity*price + taxes)
cost_per_itemYesYesCost per unit at the time of the sale
created_atYesYesDate and time the sale was recordedAll times are in UTC
mm_transaction_idNoYesForeign key; relates the sale to a transaction in the mm_transactions table
machine_idYesYesForeign key; relates the sale to a machine or kiosk in the machines_and_kiosks table
location_idYesYesForeign key; relates the sale to a location in the locations table
route_idYesYesForeign key; relates the sale to a route in the routes table

alerts

This table registers alerts.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the alert in the database
machine_idYesYesForeign key; relates the alert to a machine or kiosk in the machines_and_kiosks table
typeYesYesType of alert
categoryYesYesCategory of the alert
statusYesYesStatus of the alert
messageYesYesMessage displayed to the operator when the alert is triggered
slot_idYesYesForeign key; if applicable, it relates the alert to a slot in the slots table
created_atYesYesDate and time the alert was first registeredAll times are in UTC
updated_atYesYesDate and time the alert was last updated; if the alert has been solved, this will reflect the time of resolutionAll times are in UTC

slot_shrinkage

This table records shrinkage in a specific slot, typically noted by a driver during the servicing of the

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the shrinkage record in the database
user_idYesYesForeign key; user that recorded the shrinkage, referencing the users table
product_idYesYesForeign key; relates the shrinkage to a product in the products table
created_atYesYesDate and time the shrinkage was recordedAll times are in UTC
updated_atYesYesDate and time the shrinkage was last updatedAll times are in UTC
addYesYesIf there was an increase in the inventory, this column indicates the number of units added
reentryYesYesUnits that need to go back into the warehouse
returnedYesYesAmount of units that actually came back into the warehouse
total_differenceYesYesDifference between units recorded as returned and units that actually came back into the warehouse
service_idYesYesForeign key; relates the shrinkage to a service in the services table
verified_byYesYesForeign key; user that verified the shrinkage, referencing the users table
verified_atYesYesDate and time the shrinkage was verifiedAll times are in UTC
slot_idYesYesForeign key; relates the slot to a service in the slots table
costYesYesTotal cost of the shrinkage (individual cost*quantity)
lossYesYesTotal sales loss of the shrinkage (individual price*quantity)
deleted_atYesYesIf this column is not null, it means this shrinkage record was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC
machine_idYesYesForeign key; relates the shrinkage to a machine or kiosk in the machines_and_kiosks table

mm_transactions

This table lists micro market transactions and their details.

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idNoYesPrimary key; ID of the mm_transaction in the database
typeNoYesType of transaction
subtotalNoYesTotal to pay before adding taxes
taxNoYesAmount to pay in taxes
depositNoYesAmount to pay for deposit tax (applicable in certain regions when purchasing specific packages, such as bottles)
two_tier_feeNoYesConfigurable charge applied to consumers for various reasons, such as service type or payment method (commonly when paying by card)
paid_walletNoYesAmount paid with wallet credit
paid_cashNoYesAmount paid with cash
paid_cashlessNoYesAmount paid with card
credit_to_walletNoYesAmount credited to the wallet after the transaction (applicable for wallet reloads or when change from a cash payment is credited to the wallet)
balance_after_chargeNoYesWallet balance after the transaction
mm_user_idNoYesForeign key: if applicable, relates the transaction to a user in the mm_users table
machine_idNoYesForeign key; relates the transaction to a machine or kiosk in the machines_and_kiosks table
location_idNoYesForeign key; relates the transaction to a location in the locations table
route_idNoYesForeign key; relates the transaction to a route in the routes table
statusNoYesStatus of the transaction
exit_btnNoYesMethod of exiting the transaction (completed, timeout, cancellation, etc.)
sourceNoYesSource of the transaction (kiosk or Koin)
created_atNoYesDate and time the transaction was recorded in the VMSAll times are in UTC
completed_atNoYesDate and time the transaction was really completedAll times are in UTC

credit_card_sales

This table records credit card sales totals for machines with card readers; used for commission

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the credit card sale record in the database
machine_idYesYesForeign key; relates the credit card sale to a machine in the machines_and_kiosks table
total_soldYesYesTotal amount of sales via credit card
two_tier_feeYesYesConfigurable charge applied to credit card transactions (two-tier processing fee)
created_atYesYesDate and time the credit card sale was recordedAll times are in UTC
updated_atYesYesDate and time the credit card sale was last updatedAll times are in UTC

offline_machine_slot_prekits

This table captures the prekitting plan for offline machines (what to stock), showing the planned

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the offline_machine_slot_prekit record in the database
daily_route_idYesYesForeign key; relates to a scheduled route in the scheduled_routes tableDenormalized from daily_route_machines via service_id
service_idYesYesForeign key; relates to a service in the services tableSource column: daily_route_machine_id
machine_idYesYesForeign key; relates to a machine in the machines_and_kiosks tableDenormalized from machine_slots via slot_id
slot_idYesYesForeign key; relates to a slot in the slots tableSource column: machine_slot_id
product_idYesYesForeign key; relates to the product being prekitted in the products table
former_product_idYesYesForeign key; if there was a product change, the previous product in the products tableNullable field
priceYesYesPrice of the product at prekitting time
former_priceYesYesPrevious price if there was a price changeNullable field
start_quantityYesYesQuantity in slot at prekitting time (snapshot before service)
prekit_quantityYesYesNumber of individual units to prekit for this slot
end_quantityYesYesExpected quantity after stocking (start_quantity + prekit_quantity) Used for verification
prekit_unitsYesYesNumber of cases/boxes to prekit (prekit_quantity ÷ min_prekit_unit)Decimal field
product_changeYesYesFlag indicating if this prekit involves a product changeBoolean
price_changeYesYesFlag indicating if this prekit involves a price changeBoolean
no_stockedYesYesFlag indicating product was prekitted but not actually stocked on truckBoolean
modified_quantityYesYesModified prekit quantity if changed from original planNullable field
modified_unitsYesYesModified prekit units if changed from original planNullable field
original_prekittingYesYesOriginal calculated prekit quantity before any modificationsNullable field

offline_service_slots

This table records manual/offline service slot transactions entered by drivers during service when

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the offline service slot record in the database
daily_route_idYesYesForeign key; relates the inventory change to a scheduled route in the scheduled_routes tableDenormalized from daily_route_machines via service_id
service_idYesYesForeign key; relates the inventory change to a service in the services tableSource column: daily_route_machine_id
machine_idYesYesForeign key; relates the inventory change to a machine or micro market in the machines_and_kiosks table
slot_idYesYesForeign key; relates the inventory change to a slot in the slots tableSource column: machine_slot_id
product_idYesYesForeign key; relates the inventory change to a product in the products table
route_idYesYesForeign key; relates to the master route in the routes table
location_idYesYesForeign key; relates the inventory change to a location in the locations table
parlevelYesYesParlevel of the slot at the time of service
priceYesYesPrice of an individual product at the time
cost_per_itemYesYesCost per item at the time of service
inventory_stockedYesYesQuantity of units stocked in the machine or micro market during serviceSource column: stocked
inventory_takenYesYesQuantity removed as waste/shrinkage during serviceSource column: taken
product_changeYesYesFlag indicating if there was a product change during this service
manual_countYesYesManual inventory count if performed during serviceNullable field
created_atYesYesDate and time the offline service slot record was createdAll times are in UTC Subsidy Tables These tables support subsidy calculations, allowing operators to track and calculate subsidy payments for eligible products.

Subsidy Tables

subsidy_groups

This table defines subsidy group configurations that can be assigned to machines to specify which

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the subsidy group in the database
nameYesYesName of the subsidy group
created_atYesYesDate and time the subsidy group was created in the VMSAll times are in UTC
updated_atYesYesDate and time the subsidy group was last updatedAll times are in UTC

subsidy_sub_groups

This table defines subsidy rates and product categories within each subsidy group (e.g. beverages

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the subsidy sub- group in the database
subsidy_group_idYesYesForeign key; relates the sub-group to a subsidy group in the subsidy_groups table
nameYesYesName of the subsidy category (e.g. “Beverages”, “Snacks”, “Healthy Options”)
subsidy_amountYesYesDollar amount subsidized per unit sold (e.g. 0.50 means $0.50 per unit)
created_atYesYesDate and time the subsidy sub- group was created in the VMSAll times are in UTC
updated_atYesYesDate and time the subsidy sub- group was last updatedAll times are in UTC

subsidy_sub_group_items

This table maps which products qualify for subsidies within each subsidy sub-group; join this with

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the subsidy sub-group item in the database
subsidy_sub_group_idYesYesForeign key; relates the item to a subsidy sub-group in the subsidy_sub_groups table
product_idYesYesForeign key; relates to a product in the products table that qualifies for this subsidy rate
created_atYesYesDate and time the mapping was created in the VMSAll times are in UTC
updated_atYesYesDate and time the mapping was last updatedAll times are in UTC Tax Tables These tables support multi-jurisdictional tax calculations across products and locations.

Tax Tables

tax_groups

This table defines tax group configurations that are assigned to locations to specify which tax rates

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the tax group in the database
nameYesYesName of the tax group
created_atYesYesDate and time the tax group was created in the VMSAll times are in UTC
updated_atYesYesDate and time the tax group was last updatedAll times are in UTC

product_tax_classes

This table defines tax classifications for products (e.g. food, beverage, non-food).

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the product tax class in the database
nameYesYesName of the tax class
created_atYesYesDate and time the tax class was created in the VMSAll times are in UTC
updated_atYesYesDate and time the tax class was last updatedAll times are in UTC

tax_group_items

This table links tax rates to product classes within tax groups; defines the actual tax percentages

FieldVendingKiosksDescriptionNotes
vmsYesYesVMS database name
idYesYesPrimary key; ID of the tax group item in the database
tax_group_idYesYesForeign key; relates to a tax group in the tax_groups table
product_tax_class_idYesYesForeign key; relates to a product tax class in the product_tax_classes table
tax_percentYesYesTax percentage rate (e.g. 8.5 for 8.5% tax)
taxable_percentYesYesPercentage of the product price that is taxable (typically 100 but can vary)
surcharge_amountYesYesSurcharge amount applied to products in this tax class
surcharge_typeYesYesType of surcharge (e.g. percentage or flat amount)
surcharge_taxableYesYesFlag indicating if the surcharge amount is taxable
deposit_amountYesYesDeposit amount applied to products in this tax class (e.g. bottle deposit)
deposit_taxableYesYesFlag indicating if the deposit amount is taxable
ocs_tax_percentN/AN/ATax percentage rate specifically for OCS products
ocs_taxable_percentN/AN/APercentage of the OCS product price that is taxable
mm_tax_percentNoYesTax percentage rate specifically for micro market products
mm_taxable_percentNoYesPercentage of the micro market product price that is taxable
created_atYesYesDate and time the tax group item was created in the VMSAll times are in UTC
updated_atYesYesDate and time the tax group item was last updatedAll times are in UTC OCS Tables These tables support OCS (Office Coffee Service) operations, including equipment management, service invoicing, and rental tracking.

OCS Tables

ocs_stations

This table defines OCS (Office Coffee Service) stations/break rooms where coffee equipment is

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the OCS station in the database
nameN/AN/AName of the OCS station (e.g. “Main Break Room” or “2nd Floor Kitchen”)
location_idN/AN/AForeign key; relates the station to a location in the locations table
descriptionN/AN/ADescription of the station
last_serviced_atN/AN/ADate and time the station was last servicedAll times are in UTC
last_maintenance_atN/AN/ADate and time equipment at this station last had maintenance performedAll times are in UTC
notesN/AN/ANotes about the station
cst_idN/AN/ACustom ID assigned to the station by the operator
created_atN/AN/ADate and time the station was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the station was last updatedAll times are in UTC
deleted_atN/AN/AIf this column is not null, it means this station was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

ocs_invoices

This table contains OCS invoices generated for each service visit; the main transaction table for OCS

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the OCS invoice in the database
driver_idN/AN/AForeign key; relates the invoice to the driver who serviced it in the users table
daily_route_idN/AN/AForeign key; relates the invoice to the scheduled route in the scheduled_routes table
location_idN/AN/AForeign key; relates the invoice to the location in the locations table
invoice_numberN/AN/AUnique invoice number
statusN/AN/AStatus of the invoice: 1=Draft, 2=Pending, 3=Sent, 4=Authorized, 5=Paid, 6=Partially Paid
typeN/AN/AType of invoice
total_amountN/AN/ATotal invoice amount (products + equipment rental)
total_paidN/AN/AAmount paid on this invoice
serviced_atN/AN/ADate and time the service was performedAll times are in UTC
payment_atN/AN/ADate and time payment was receivedAll times are in UTC
tax_override_amountN/AN/AManual tax override amount if operator adjusts tax on the invoice
notesN/AN/ANotes about the invoice
created_atN/AN/ADate and time the invoice was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the invoice was last updatedAll times are in UTC
deleted_atN/AN/AIf this column is not null, it means this invoice was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

ocs_orders

This table groups products delivered to a specific station within an OCS invoice.

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the OCS order in the database
ocs_station_idN/AN/AForeign key; relates the order to a station in the ocs_stations table
ocs_invoice_idN/AN/AForeign key; relates the order to an invoice in the ocs_invoices table
notesN/AN/ANotes on the order
daily_route_idN/AN/AForeign key; relates to the scheduled route in the scheduled_routes table
created_atN/AN/ADate and time the order was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the order was last updatedAll times are in UTC
deleted_atN/AN/AIf this column is not null, it means this order was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

ocs_order_items

This table contains individual products delivered in an OCS order; the source of product revenue for

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the order item in the database
ocs_order_idN/AN/AForeign key; relates the item to an order in the ocs_orders table
product_idN/AN/AForeign key; relates the item to a product in the products table
quantityN/AN/AQuantity of the product delivered
priceN/AN/APrice per unit
totalN/AN/ATotal amount for this line item (quantity × price + tax)
parlevelN/AN/APar level for this product at the station
tax_percentN/AN/ATax percentage applied to this product
tax_amountN/AN/ATax amount calculated for this product (tax_percent × total_price)
surchargeN/AN/ASurcharge amount applied to this item
depositN/AN/ADeposit amount (e.g. bottle deposit)
created_atN/AN/ADate and time the order item was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the order item was last updatedAll times are in UTC
deleted_atN/AN/AIf this column is not null, it means this order item was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

ocs_equipment_order_items

This table contains equipment rental line items on OCS invoices; shows which equipment was billed

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the equipment order item in the database
ocs_order_idN/AN/AForeign key; relates to an order in the ocs_orders table (which then links to ocs_invoices)
equipment_idN/AN/AForeign key; relates to equipment in the equipments table
rental_typeN/AN/AType of rental: 1=Rental (charged), 2=Complimentary (no charge)
rent_amountN/AN/ARental charge amount for this billing period
tax_rate_equipmentN/AN/ATax rate applied to equipment rental (calculated and stored at invoice time)
statusN/AN/AStatus of the equipment order item
rental_frequencyN/AN/ABilling frequency: 1=First Service (one-time), 2=Monthly, 3=Annual, 4=Quarterly
rental_period_endN/AN/AEnd date of the rental period being billed on this invoiceAll times are in UTC

equipments

This table contains OCS equipment inventory (coffee machines, brewers, etc.).

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the equipment in the database
equipment_typeN/AN/AType of equipment (denormalized from equipment_types.name)
serial_numberN/AN/ASerial number of the equipment
brandN/AN/ABrand name of the equipment
modelN/AN/AModel name of the equipment
purchased_atN/AN/ADate and time the equipment was purchasedAll times are in UTC
descriptionN/AN/ADescription of the equipment
created_atN/AN/ADate and time the equipment was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the equipment was last updatedAll times are in UTC
deleted_atN/AN/AIf this column is not null, it means this equipment was soft deleted, it won’t appear in our systems; it indicates the date and time it was deletedAll times are in UTC

ocs_station_equipments

This table links OCS equipment to stations; defines the rental agreements for which coffee

FieldVendingKiosksDescriptionNotes
vmsN/AN/AVMS database name
idN/AN/APrimary key; ID of the station equipment record in the database
ocs_station_idN/AN/AForeign key; relates to a station in the ocs_stations table
equipment_idN/AN/AForeign key; relates to equipment in the equipments table
rental_typeN/AN/AType of rental agreement: 1=Rental, 2=Complimentary
rent_amountN/AN/AMonthly rental amount charged for this equipment
statusN/AN/AStatus of the equipment installation
installed_atN/AN/ADate and time the equipment was installed at the stationAll times are in UTC
purchased_atN/AN/ADate and time the equipment was purchased (if applicable)All times are in UTC
descriptionN/AN/ADescription of the equipment installation
rental_frequencyN/AN/ABilling frequency for equipment rental
rental_dayN/AN/ADay of month when rental is billed
rental_monthN/AN/AMonth when annual rental is billed (for annual rentals only)
created_atN/AN/ADate and time the record was created in the VMSAll times are in UTC
updated_atN/AN/ADate and time the record was last updatedAll times are in UTC