Export of raw data

Has anyone been able to extra the raw daily sales data

we use a very smart inventory/recipe management system… but ideally we need the raw daily sales data… even if it was a text file (line per item) we could use it..

basically anything that has a price (product or modifier)

i know over the years i have asked for similar but ive never been able to get the raw data.

in its simplest form it would be

product a, 1, 10.00
product b, 1, 1.50
Modifier 1, 1,1.00
Modifier 2, 1, 2.00

we would need to run this each day so we can import it to the inventory/costing tools we use

Hello,

It is possible to extract the raw daily sales data from SambaPOS. We can provide all information including products, quantity, price, and modifiers (Order Tags) in CSV format.

Example CSV (Including Order Tags)

Product,Quantity,Price
Pizza Margherita,1,12.00
Extra Cheese,1,2.00
Pepperoni,1,3.00
Cola,2,3.00
Lemon Slice,2,0.50
  • “Extra Cheese” and “Lemon Slice” are modifiers / Order Tags shown as separate lines.
  • Quantity and price are provided for each product and modifier.

Methods to get daily CSV:

  1. Export via Report: You can pull product, quantity, price, and modifier data for the required date range.
  2. Automated Daily Report: With SambaPOS Automation, a CSV file can be automatically generated at a specific time every day and saved to your specified folder.

SQL Example (Including Order Tags)

-- Products
SELECT
    p.Name AS Product,
    ti.Quantity AS Quantity,
    ti.Total AS Price
FROM TicketItems ti
JOIN Products p ON ti.ProductId = p.Id
WHERE ti.CreatedDate BETWEEN '{StartDate}' AND '{EndDate}'

UNION ALL

-- Modifiers / Order Tags
SELECT
    ot.TagName AS Product,
    ti.Quantity AS Quantity,
    ot.Price AS Price
FROM TicketItemTags ot
JOIN TicketItems ti ON ot.TicketItemId = ti.Id
WHERE ti.CreatedDate BETWEEN '{StartDate}' AND '{EndDate}'

This query provides each product and modifier as separate rows, ready to export to CSV.

1 Like

amazing and thanks.. i have been wanting this data for years

I’ve used the system for years but no one has been able to provide the data

unfortunately this doesn’t work as its not the DB Structure our system has…

if anyone can help please let me know

The SQL query provided was shared as an example and is based on the default SambaPOS database structure.
Depending on your version, configuration, or any third-party integrations, the table and column names in your database may differ.

Therefore, the query will need to be adjusted to match your specific database schema.

The logic behind the query remains the same — it combines product and modifier (Order Tag) data to produce item-level daily sales information.
Only the table or field names should be modified to fit your environment.

Which version did you use that has those tables? Tables TicketItems, Products, TicketItemTags do not exist in the current schema.

Also, as far as I know, `{Start}’ and ‘{End}’ are used to populate work period start and end dates.