Skip to main content

Documentation Index

Fetch the complete documentation index at: https://help.mathership.com/llms.txt

Use this file to discover all available pages before exploring further.

CSV Upload

Use CSV Upload to import POS sales data from a CSV file and convert it into inventory movements. CSV Upload is useful when you do not use a direct POS integration or when sales data comes from another system as an export file. The CSV upload can:
  • Read sales data from a CSV file
  • Extract POS item codes from selected columns
  • Read quantities from a quantity column
  • Read dates from a date column
  • Match POS codes to POS mappings
  • Explode recipe mappings into ingredients
  • Create inventory ledger entries

How it works

Bestellfix reads the uploaded CSV file row by row. For each row, Bestellfix applies the configured CSV rules and extracts sold POS items. The basic flow is:
  1. Create a CSV integration
  2. Configure CSV rules
  3. Create POS mappings
  4. Upload a CSV file
  5. Bestellfix reads the file
  6. Sold POS items are matched to mappings
  7. Ingredient deductions are created in the inventory ledger

Before you start

Make sure you already have:
  • A company in Bestellfix
  • Ingredients created in Bestellfix
  • Recipes created if you want to map POS items to recipes
  • Storage units created
  • POS mappings configured
  • A CSV file with sales data

Create a CSV integration

CSV upload uses a POS integration with the integration type CSV. To create it:
  1. Go to ManageIntegrations
  2. Select CSV Upload
  3. Create a new CSV integration
  4. Configure the data schema rules
  5. Save the integration
The integration stores the rules that tell Bestellfix how to read the CSV file.

CSV rules

CSV rules define which columns Bestellfix should read from the uploaded file. The supported rule type is:
Rule typePurpose
column_values_to_pos_codesReads POS codes from one CSV column
A rule can use:
FieldMeaning
source_columnColumn containing the POS code or POS codes
quantity_source_columnOptional column containing the quantity
date_source_columnOptional column containing the sale date
delimiterOptional separator if one cell contains multiple POS codes

Example CSV file

A simple CSV file could look like this:
pos_codeqtydate
BURGER_CLASSIC22025-10-20
COLA_03342025-10-20
ESPRESSO32025-10-20
In this example:
  • pos_code is the source column
  • qty is the quantity column
  • date is the date column

Example rule

Example rule configuration:
SettingValue
Rule typecolumn_values_to_pos_codes
Source columnpos_code
Quantity columnqty
Date columndate
Delimiterempty
With this rule, Bestellfix reads each POS code from the pos_code column.

Multiple POS codes in one cell

If one CSV cell contains multiple POS codes, use a delimiter. Example CSV:
pos_codesqtydate
BURGER_CLASSIC,COLA_03312025-10-20
Example rule:
SettingValue
Source columnpos_codes
Quantity columnqty
Date columndate
Delimiter,
Bestellfix splits the value and processes both POS codes.

Quantity handling

If a quantity column is configured, Bestellfix uses the value from that column. If no quantity column is configured, Bestellfix uses 1 as the default quantity. Example:
POS codeQuantity result
BURGER_CLASSIC with qty 22 sold items
COLA_033 without quantity column1 sold item

Date handling

If a date column is configured, Bestellfix uses that date for the inventory movement. If no date column is configured, Bestellfix uses the current date and time. The date should be readable as an ISO-style date or datetime, for example:
FormatExample
Date2025-10-20
Date and time2025-10-20T14:30:00

POS mappings

Before uploading sales data, create POS mappings. A POS mapping connects a POS item code or name to a Bestellfix ingredient or recipe. Examples:
POS codeMapped objectQuantity
COLA_033Cola bottle1
ESPRESSOCoffee beans0.009
BURGER_CLASSICClassic Burger recipe1
Without mappings, Bestellfix cannot convert POS sales into inventory deductions.

Ingredient mapping

Use ingredient mapping when a POS item should deduct one ingredient directly. Example:
Sold POS itemInventory deduction
1 × COLA_033Deduct 1 Cola bottle
1 × ESPRESSODeduct 0.009 kg coffee beans

Recipe mapping

Use recipe mapping when a POS item consists of multiple ingredients. Example:
Sold POS itemMapped to
BURGER_CLASSICClassic Burger recipe
When the CSV file contains BURGER_CLASSIC, Bestellfix explodes the recipe and deducts all recipe ingredients.

Upload a CSV file

To upload a file:
  1. Open ManageIntegrations
  2. Open the CSV integration
  3. Choose the CSV file
  4. Start the upload
  5. Review the result
The uploaded file must be a CSV file with headers. Bestellfix reads the column names from the first row.

What happens during upload

When a CSV file is uploaded, Bestellfix:
  1. Reads the CSV file
  2. Applies the configured rules to each row
  3. Extracts POS codes, quantities, and dates
  4. Matches POS codes to POS mappings
  5. Explodes recipe mappings into ingredients
  6. Calculates ingredient quantities
  7. Creates inventory ledger entries
  8. Updates the integration’s last run time
  9. Returns a processing summary

Upload result

A successful upload returns a summary of created inventory deductions. The result can include:
  • Ingredient name
  • Deducted quantity
  • Storage unit
  • Date of the inventory movement
Example result:
IngredientDeducted quantityStorage unitDate
Burger Bun12Main Storage2025-10-20
Beef Patty12Main Storage2025-10-20
Cola 0.33l24Drinks Storage2025-10-20

Inventory ledger entries

CSV uploads create inventory ledger entries with transaction type ISSUE. That means the uploaded sales reduce inventory. Each created entry includes:
  • Company
  • Ingredient
  • Storage unit
  • Transaction type
  • Quantity
  • Unit cost
  • Value
  • Date
See Inventory Ledger for details.

Storage unit selection

For CSV uploads, Bestellfix determines the storage unit from the mapped ingredient or recipe logic. The system tries to resolve a storage unit from:
  1. The recipe line issue storage
  2. The ingredient preferred issue storage
  3. The recipe default issue storage
  4. A storage unit with available stock
  5. The first available storage unit as fallback
For accurate inventory deductions, configure storage settings on ingredients and recipes.

Common setup order

Use this order for a clean CSV setup:
  1. Create storage units
  2. Create ingredients
  3. Create recipes if needed
  4. Create the CSV integration
  5. Configure CSV rules
  6. Create POS mappings
  7. Upload a small test CSV
  8. Check the inventory ledger
  9. Upload the full CSV file

Test with a small file first

Before uploading a large export, test with a small CSV file. Use only a few rows, for example:
pos_codeqtydate
COLA_03312025-10-20
BURGER_CLASSIC12025-10-20
After upload, check whether:
  • The upload completed successfully
  • The correct ingredients were deducted
  • The quantities are correct
  • The correct storage units were used
  • The ledger entries have the correct date

Common errors

File not provided

This happens when no CSV file was attached. Upload a CSV file and try again.

CSV integration not found

This happens when the selected integration does not exist or is not a CSV integration. Check that:
  • The integration exists
  • The integration belongs to the selected company
  • The integration type is CSV

Processing exceptions

This happens when Bestellfix finds problems during processing. Common causes are:
  • POS code has no mapping
  • Recipe has a cycle
  • Storage unit cannot be resolved
  • Ingredient no longer exists
  • Recipe line is incomplete
Fix the mappings or recipe setup and upload again.

Unmapped POS code

This means the CSV file contains a POS code that has no POS mapping. Example:
ProblemFix
unmapped_pos_code:BURGER_CLASSICCreate a POS mapping for BURGER_CLASSIC

Wrong quantity

Check:
  • The quantity column in the CSV
  • The configured quantity source column
  • The POS mapping quantity
  • The recipe line quantities
  • The base unit of the ingredient

Wrong date

Check:
  • The date column in the CSV
  • The configured date source column
  • Whether the date format can be read correctly
If the date cannot be read, Bestellfix may use the current date and time.

Best practices

  • Use stable POS codes instead of product names if possible
  • Keep CSV headers consistent
  • Avoid changing column names after setup
  • Test with a small file first
  • Map high-volume POS items first
  • Use recipes for prepared dishes
  • Use direct ingredient mappings for simple items
  • Review the inventory ledger after every first upload
  • Keep a copy of uploaded CSV files for traceability

Example CSV setup

Example CSV headers:
ColumnPurpose
article_codePOS code
quantitySold quantity
sold_atSale date
Example rule:
SettingValue
Rule typecolumn_values_to_pos_codes
Source columnarticle_code
Quantity columnquantity
Date columnsold_at
Delimiterempty
Example mappings:
POS codeMapping typeMapped toQuantity
COLA_033IngredientCola 0.33l1
ESPRESSOIngredientCoffee beans0.009
BURGER_CLASSICRecipeClassic Burger1

POS Mapping

Map POS codes to ingredients or recipes.

Integrations Overview

Return to the integrations overview.

Storage Units

Manage storage units used for inventory deductions.

Inventory Ledger

Review inventory movements created by CSV uploads.