Integrator's GraphQL API Guide


#141

okay thanks for you quick help :slight_smile:


#142

Wish I could help more but at least you know the SambaPOS side is working fine if you can complete queries in GraphiQL you just need to figure out the Postman setup.


#143

yes checking whats wrong with postman.
you let you know if i need your help :slight_smile:


#144

for this step, do i need to put both gloria food key or where do i find the Server key??
thanks for helping :slight_smile:


#145

Hey guys, It’s my first attempt at integrating Gloria Foods here as I and a few clients wish to push Gloria Foods here in Australia also. I’m trying to set this up and I followed the step to;

  1. Generate Secret Key for client_id:gloria
  2. Got the Restaurant Key from Gloria Foods
  3. Created package.json & script.js in a folder.
  4. installed NodeJS and ran npm install in the folder where the two files are
  5. Edited the script.js file to insert both keys, ensuring that serverKey matches secret key showing in sambapos
  6. Finally I ran node script.js from Command window but I get the following error.

Initially I thought the secret code generated in was not the same as the one I entered into the script… I double checked and it matched…
Then I checked client_id and ensured that matched in sambapos. It matches!

I can access Graphql on port 9000 and can generate a token from a different client id so I know graphql is working…
Have I missed anything here?


#146

Don’t enter the secret key enter the actual string you used to create it for server key. I have been using gloriafood with sambapos for months now and it’s awesome.


#147

Ahh ok. I thought we had to type the actual generated key.

So after I inserted that key I get this… so I’m assuming it’s running ok and we should test a food order now?


#148

Yep that’s it scanning for tickets based of interval set in script. You can test using the built in test app running on port 3000. That way you don’t have to submit live order.

Unless you opted for the script without the test app but it looks like you did considering it is listening to it.


#149

I advise once done testing and when ready for live you remove test app so it won t listen to port 3000. I had some issues with orders when I left that in the script and went live.


#150

Ok so if we wanted to test live, how would we go about it is the next question? hmmm.

Also once an order is confirmed… the default delivery screen


It goes into “Waiting Orders” but I don’t have those buttons for deliverers… I’m guessing we have to add deliverers in the entity section before we can assign one.

EDIT: Ok i added a Deliverer entity. Refreshed screen but cant see them there hmm…
EDIT2: Nevermind i just did “Edit mode” in entity screen and saw the deliverer.


#151

Ok Great! so test app is working, and I can fetch my entire menu using the test app to see what’s there.
Next I have to add my items with product tag “Gloria Menu” in Gloria foods.
UPDATE: Done!

Ok @Jesse umm I want to test this in a live TEST environment.(Ive got a test account for Gloria Foods to test the integration with) so what do we edit?


#152

Don’t have to edit anything just push some orders.


#153

Didn’t you say to remove Port 300? If I just comment out the test app section of the script, save it, it should work yeah?

Because I did that, tried to push an order but didn’t receive anything coming through…hmm


#154

How do you guys notify yourselves of a new online order? Say employees are busy doing something other then using computers, do you guys play a sound notification everytime a online order comes in? Can you make it automatically confirm and print in the kitchen? What do you think is more practical? I am getting ready to implement this setup and a little confused what the best method would be.


#155

No you can’t just comment it out. There is another post about gloriafood where I took it out and explained how. I can’t remember which one it was though.

I said take it out when you go live. If your testing live you can leave it in.


#156

The app which requires Android or apple tablet plays a loud chime. You have to accept the order through the app first. So I have a tablet in kitchen that runs the app. They use it like kitchen display for online orders.20170903_143353

If you look in my kitchen you see the tablet by grill.


#157

@shivan here is the thread I recommend you looking at. I have some modifications to the script here. Its a beta category but I think you have access if not let me know.

https://forum.sambapos.com/t/gloriafood-integrations/14388/106


#158

HI @Jesse thanks for the lovely tutorial. The above thread I’m unable to access. It says you do not have access to it. Could you please help.

Thanks in advance.


#159

Hi. how to add order tags in this query

mutation m {
  addTicket(ticket: {orders: [{name: "Tea"},{name:"Milk"}]}) {
    totalAmount
  }
}

#160

First explain why you want to use that query. It may not be that simple but we need to know why and how your using it to give you a better answer.