Integration with third party app (The Drink Exchange)

The Drink Exchange is quite an interesting concept.

so Mark, r u located in HK now? I was from there. Is SambaPOS popular over there?

How would/should you or the store owner formulate the current price of “stock”?

I lived there for over 3 years but now back in the UK. We sold SambaPOS there for over 2 years, still do if someone wants but not actively promoting in that market like when I was there.

I don’t think hugely popular at the moment, the market is saturated with POS companies with crappy software. We did get a few good customers who are still using SambaPOS, and we also did the official Traditional Chinese translation for V5, because it really held back who we could sell to with an English only system.

The way these systems work is the bar owner decides the min and max price for each item, then the prices move depending on supply and demand, like a stock market. They also have “market crashes” where everything is sold at the min price for a short period of time.

It is said to bring better profits in as people like the concept and it can allow bar owners to sell popular items at higher margins and also push less popular items with a lower price and the lower margin is supplemented by the higher margin of the popular products.

Where I can get an official Chinese translated version of V5? I don’t seem to find any ad of such in the Samba Market.

The translation is already available from v5.1.59 onwards. You just set the UI language in settings.

However note that unless you create a new sample database when using Chinese as the language, you will still have a lot of things like automation commands, accounts, etc., in English. If you create a new sample database after changing language, it will create everything in Chinese.

For ourselves, we spent our own time to put together a database where everything was in Chinese for the display names but internally values were stored in English - it made it easier for our own management as myself I cannot speak or read Chinese. So it meant I can support customers even I can’t ready the UI language.

1 Like

OMG! Why didn’t I notice this earlier!!!? I have been trying the hardest to work on a bilingual version for my #$^%^&@* workers here.

1 Like

Back to the Drink Exchange topic, I think this idea would be excellent for restaurants dealing with live seafood too. In Hong Kong, seafood are frequently sold at a price called “market price”, this will be almost the most direct market price one can experience. LOL

Oops… :stuck_out_tongue:

The only thing we struggled with was there is no way to easily switch language on SambaPOS. Like I mentioned above about creating the database after changing language, a lot of the settings and features in SambaPOS do not change when you change language. So it’s fine if someone wants Chinese and never cares about English, but in reality, especially in other countries like the UK, they want to be able to switch language at the press of a button, and that just isn’t possible with SambaPOS. It is unfortunately possible in many other commercial bilingual POS software targeting this market, but like I say, those software aren’t very nicely designed and flexible compared to SambaPOS.

So I have spent some time thinking about how I could accomplish a language switch, if you accept a few things are dependant on the UI language, but you could in theory (haven’t tried!) create 2 versions of each automation command that is shown on the POS screen, then restrict each to a specific user role - so you could have Chinese user and English user. Yes, it would be dependant on user that logs in, but probably workable. You could alternatively do by terminal - pretty much just using a mapping.

1 Like

No you are missing the point. Drink exchange isn’t about real time pricing - it is about creating a “stock exchange” like environment in your bar. The seafood example you give is that they change prices frequently, but they control the specific prices. In drink exchange, the bar owner sets the thresholds but the system decides the price minute by minute based on what is being sold. So it’s creating a game like environment that customers love.

There are a few companies doing this like also Stuart above said he works for one. The one we worked with I didn’t particularly like and was very expensive. It was our client who chose to work with them. From what I saw, most of them now work on a pay per use model for the bar owners.

I fully understand what you said - I am just stretching from the so-called “market price” of seafood in HK restaurant to a scenario where the owner set the market like fluctuation for the customer to experience and improve the margin or stock situation. HK seafood restaurant owners set the so-called “market price” with very little reference to the actual price but more to the “news”. For example, there is a typhoon coming, so “no supply”. The supply may already have been in the market for several days but the price will jump the same day the news is on air. LOL. In the morning, there is a government radio channel that reports the market price but the restaurant owners always some how can see the future and act before the actual rise in price in the supply. LOL again.

1 Like

Hallo Emre,
i would like to create a script which is called when Product button is pressed and updates the cached price from the database realtime.
My software already changes the prices on teh database, but prefer not to use Refresh Cache for the reasons you mentiuned.

Do you have any papers on guidance on creating scripts?

Thanks in advance.
Stuart

Probably you can do it by calling a script that would then get the price from the database by running an SQL script. The script I made used prices from an external file, so can confirm the concept works.

Not sure exactly what you mean here - there is plenty information about creating scripts on the forum. Just use the search feature. Not sure what “papers” you are looking for?

1 Like

And code wise the scripts are just jscript and google will reviel answers on how to do most things within the script itself.

1 Like

Hi Mark,
are you prepared to share this script with me.
Yes I have found info on the forum but its very scattered.
What I would like is when I press a item button the screen that the item id is picked up and I can go to the database with this and return the price.
Thanks in advance.
Stuart

I can share the script and basic setup for that specific system, but you will of course need to modify the script for your needs - for one, you will need to add code to do a SQL query from the database to retrieve the price. You can probably use the sql.Query() function.

Read more about JScript helper functions available here:

Script:

function getPrice(menuItemId) {
	
	var newPrice = null;
	var f = 'file://///POS1/Samba/drinklist.json';
	
	if (menuItemId > 0) {
		
		var data = web.Download(f);	
		var priceList = JSON.parse(data);
		var checkPrice = eval('priceList.id' + menuItemId);
		
		if (checkPrice) {
			newPrice = checkPrice;
		}
		
	}

	return newPrice;
}

Action:

Rule:

1 Like

Thousand thank Mark,
Its so clear how it works and clever. I’m recommending SAMBA to all new clients, its a powerful product but confiiguration is heavy.
Thanks again!
Stuart

2 Likes

Hi mark,
I added my own script to scripts, what is the handler definition? ‘Order Added to Ticket’ ?
Regards,
Stuart

The script name can be anything you want - it is just for display purposes.

The handler is what you use to call the script, it should follow the same syntax as a function / variable name - so no spaces, etc. So for example, my script handler was tde, and if you look at the Rule, you will see I call the function using the handler name then function name:

{CALL:tde.getPrice({ITEM ID})}
1 Like

Thousand thank Mark,
Its so clear how it works and clever. I’m recommending SAMBA to all new clients, its a powerful product but confiiguration is heavy.
I assume getPrice is the name of the script an tde is the handle?!

Thanks again!
Stuart