API to handle automatically load a ticket from URL

Hi @emre

You know how the Skype App handles urls like skype://user.name ??

Would it be possible to set-up SambaPOS so that it can handle a URL like sambapos://ticket/105 which would open ticket 105?

The reason I would like this is that I use a web page to display a whole bunch of information and I am not ready to properly look in to doing everything through GQL (My staff are used to using the SambaPOS application, so just being able to quickly load a specific ticket from a web link would be really helpful).

M

Gql can do that. Now.

Oh yeah? That’s great.

What do GQL links which open ticket in Samba look like? I could just code that in to my website that I am using to display the ticket data.

It wouldn’t be a link to open the ticket on page, you would query qgl with the request for the ticket/order info, it would return the data based on your request, then you would need to use that data in your page to display as you like.
The API won’t return a pretty html format that you just display.

You would have to code the website to display the info. You can see how it would return the info with the built in documentation app. I cant remember the link but look up the tutorial for custom integrations using gql.

Ah, yes. That was my understanding of what GQL does. However I was the users to be able to modify the ticket using the Samba application they are used to rather than a new interface I would need to build using GQL.

So is that a way to associate the SambaPos application with certain customised URIs? Or should I just bite the bullet and train the staff to use a new GQL based ticket editor?

What exactly are you doing, am not quite following what it is your trying to achive.

I use reservation tickets to plan all our dives. Numerous order tags and entity custom data fields are used to store the details of the dives for the client and are displayed very clearly on one detailed web-page:

I know this could probably be done in other ways through waiter/kitchen screens but there is an incredible amount of data being displayed here (each line is an order and there are probably about 20 tickets displayed on this web-page above). The page also allows us to see who is leaving us today (no future bookings = wave goodbye emoji) and who owes us money (money owed = dot in the last column). The web page uses a responsive web design which is also used by our staff on their phones, including the boat captains. Only a single SQL query is used to obtain all this information and it renders in less than 0.3 seconds even without caching - so it’s very quick to flick through the varies days using the calendar at the bottom.

What I would like to achieve is a way to click a button (one button per line) which would open the relevant ticket for that order in the SambaPOS application. I would prefer this approach since it would save me creating a new very detailed ticket editor using GQL and it would mean my staff continue to use the application they have come to know very well.

Right now, we copy the ticket ID and I have created an automation command that allows it to be pasted before displaying that ticket. I would basically like to avoid this copy&paste task and just switch to the SambaPOS application and display the particular ticket.

Ok, so that wouldn’t be through API, the API would be an alternate method of getting the info your getting via SQL which would do allot of the hard work - ie the joins etc you would need to do to make the SQL query give you info you can use. It would return in a nice json format ideal for processing in your web platform. It could be used to get more info and display your own version of the ticket but wouldn’t open a ticket in samba via a link.
Unless perhaps you viewed that page from a html widget on an entity screen as believe you can pass variable back to samba from that (never tried though).
You could bypass the copy and past by updating a program setting in database and making that automation command open ticket using that program setting… One step closer to what you want to achive.
Or you might be able to imitate the caller ID style flow where the button triggers a popup in samba.