Linking Different Tables in Sambapos4

Hey folks,

I was playing around with data in Samba POS4 and was wondering what the common denominator is that links the Orders, tickets, payments and amounts ticketentities table.

What is the unique variable — common to them all — that can be used for merging these tables? Ideally the variable should be at the “ticket level”



Very sorry but version 4 is no longer supported. Version 5 is the currently supported version.

But to answer your question. There is no common denominator but you can look at the tables and find which ones are linked and how. Some things are in JSON format like order tags, some things are linked by their ID.

If you have a v5 request we can probably assist you better if you explain what you are trying to achieve. If its v4 then I am sorry but most of us in here have not been on v4 in quite a long while.

1 Like

As jesse said about v4.
Also like he said there isn’t a direct link between them all.
Orders tags are part of orders.
Orders are linked to ticket
Tickets can be linked to entities but this is less structural compaired to tickets and orders since a table isn’t neserceraly required.

1 Like

Thanks for the feedback guys.

As you’ve said, Orders are linked to Tickets. I wanted to know what the relationship is that links orders to tickets? Secondly, on average there should be more rows of orders then tickets right? As each ticket necessarily requires one order.

In all fairness have you actually looked at the tables?
Simply looking at the orders table shows the first column after id (order id) is ticket id… pretty self explanatory.

Thanks! Just looked at the tables and it makes sense. Previously, I was looking at a corrupted export. For anyone who is wondering:

The unique common denominator is the values stored under the “Id” column of the Tickets Table. In the rest of the table they are stored as either TicketId or Ticket_Id. For example:

Ticket_Id= TicketEntities
TicketID= Orders, Payments, Calculations