Integrator's GraphQL API Guide


#161

@Jesse i am developing custom online order site, and want to put order in samba i successfully insert product name , entitytype but dont know how to add order tags.
Thanks.


#162

To be honest the best way to do this is not with Add Ticket query but you should open a terminal and build your orders via the terminal and then use a close function to close the ticket. This would allow you to use built in rules etc and significantly reduce your code.

When I say open terminal you can use the GQL query to open a terminal and create a terminal ticket.

Look at the PMPOS project it can give you an idea of how you can do this.


#163

I use Gloriafood for my online orders and it works really well. Integration is rather simple too.Gloriafood is free.


#164

can you please look at this code is it okay

mutation m {
  addTicket(ticket: {
    orders: [{name: "Cans"}], 
    entities: [{entityType: "Customers", name: "321 221 1100"}],
    states:[
                    {stateName:"Status",state:"Unpaid"},
      							{stateName:"Delivery",state:"Waiting"},
    ],
    
    
  }) {
    id,remainingAmount,orders {
      id
    }
  }
  updateEntityState(
    entityTypeName:"Customers",entityName:"321 221 1100") {
    id,
    name,customData {
      name
      value
    }
  }
    
}

#165

Why don’t you put the code in localhost:9000 to find out and post error?

Anyway I don’t think you entityName has space in database.


#166

@sukasem i m just asking about order tags.
and my code is working fine :slight_smile: just showing this is my code
if you have any suggestion please feel free to share


#167

So you answer your own question


#168

that’s why i show my code dear :slight_smile:
and if you know i can insert order tags with this query please let me know thank you


#169

In orders there is tags
image


#170

@Jesse thank you so much for help issue resolved :slight_smile:
just try this and its work :slight_smile:

mutation m6{addOrderToTerminalTicket(
  terminalId:"irksDKCFrEyJN7qYw-i9nQ"
  orderTags : "Oreo",
  productName: "Shakes"
)
  
  {totalAmount,uid,orders {
    id,name
  }}
}

#171

Trying to get Gloria to work on a different system. I get the following error.

So the script is able to read the tickets so authentication is fine. And an order was pushed through and the script managed to read it which is great! however because of the error in the image, it wont push it.

I checked the script and details of the order sent through and it seems to be all good, so can’t quite put a finger on the issue. hmm…


#172

after adding + sign after port number, Message server not connected and when I click on Test message server connection I get the error “Tcp channel protocol violation: expecting preamble.”


#173

What port did you choose?


#174

9000 (9000+), I tried with 8080 & 8383 as well


#175

Your clients require the message server name/address/host to be configured in this format:

http://myserver

or (assuming your server’s IP is 192.168.1.10):

http://192.168.1.10

The http:// is required. Using just the host name or IP alone will not work.

Also, the client message server port should NOT have the + symbol. The + symbol is only for configuring the Message Server SERVICE, in which case, the + symbol is required.

So if you configured the SERVICE for 9000+, then the client port should be simply: 9000


The above information is detailed in the very first post of this Topic.


#176

Its connected. Thanks. :slight_smile:


#177

Hello Emre,

I have used the msi installer for gloriafood intigration its working very well. I want to print the Parts of the address like street postcode. I enabled on gloriafood dashboard but how i can print and show in sambapos?

Thank you


#178

You will have to edit the code with an editor like notepad++


#179

Ok but i am not using the code that is in this post. I am using a installer of GlobalFood integration. Its file type is .msi.


#180

That installer is just a package for this code. You are using this code. It just automated the install. Following the tutorial is better because you can customize it.