GloriaFood integration orders with wrong names?

So our GloriaFood integration is based off of Emre’s API Integration Guide (I think the thread has been removed) and it’s been working perfectly fine for years.

However, as of yesterday, a few orders come out scrambled (the Product Names come out incorrectly).

So I thought maybe the error was on GloriaFood’s side. Maybe GloriaFood’s API endpoint gave incorrect data when polled, but that didn’t seem to be the case. The returned JSON from their endpoint was fine and the resulting GQL query from the code was fine as well.

       mutation m{addTicket(
            ticket:{type:"Delivery Ticket",
                department:"Delivery",
                user:"Administrator",
                terminal:"Server",
                note:"",
                entities:[{entityType:"Customers",name:"EDITED OUT"}],
                states:[
                    {stateName:"Status",state:"New Orders"},
                    {stateName:"Source",state:"GloriaFood Delivery Prepaid"},
                    {stateName:"Payment",state:"ONLINE"},
                                        {stateName:"Delivery",state:"Waiting"},
                                        {stateName:"OnlineType",state:"delivery"}
                ],
                tags:[
                                        {tagName:"Delivery Minutes",tag:"60"},
                                        {tagName:"Paid",tag:"GloriaFood Paid"},
                                        {tagName:"Delivery Tip",tag:"1.47"},
                    {tagName:"GH Name",tag:"EDITED OUT"},
                                        {tagName:"DeliveryAddress",tag:"EDITED OUT"}
                                ],
                calculations:[],
                orders:[{
                name:"Hot Coffee",
                menuItemName:"",
                quantity:1,
                portion:"Large",
                price:3.05,
                tags:[{tagName:"Coffee Milk",tag:"Whole Milk",price:0,quantity:1},{tagName:"Sweetener",tag:"Sugar",price:0,quantity:1},{tagName:"Comment",tag:"Instructions",note:"only 1 sugar. a lot of milk"}],
                states:[
                    {stateName:"Status",state:"New"}
                ]
            },{
                name:"Western Omelet",
                menuItemName:"",
                quantity:1,
                portion:"Platter",
                price:10.45,
                tags:[{tagName:"Select a Toast",tag:"White Toast",price:0,quantity:1},{tagName:"Comment",tag:"Instructions",note:"French fries instead of home fries"}],
                states:[
                    {stateName:"Status",state:"New"},{stateName:"KDOrderStatus",state:"KDFNewDelivery"}
                ]
            }]
            }){id}}

As you can see, this query should input an order with a Hot Coffee and a Western Omelet.
But this is the resulting order:


image

Any ideas on what might be happening?
Thanks for taking the time to read all of this.

EDIT: this doesn’t happen with every order. Happens like once or twice a day. All of the other orders come out just fine.

Something intermittent like this is going to be hard to narrow down. I know that the addTicket mutation has been all but deprecated in favour of registering a terminal and creating a terminal ticket. The benefit of the latter is that automation is available.

Are the same menu items causing the issue? Are there any special characters in the menu item names when this happens?

I’d start logging what you can. See if you can narrow down where the menu item name is being changed and go from there.

I haven’t delved into it yet so I don’t know what works and what doesn’t, but if you’re using v5.5 there has been a lot of work done and changes made to the API which could cause unexpected behaviour.

No, it happens with different Products.

My Product names both on SambaPOS and GF are mostly A-Z a-z characters. I have 2-3 Products with an apostrophe (') in the name but those Products weren’t in the tickets.

So, I was able to log the GQL query as you can see from the screenshot, but that seems to be the furthest I can log on my end. Is it possible to log data from the Message Server.

I’ve been using v5.3.2 for a while and I’m a bit hesitant to upgrade versions. Should I upgrade?

Unfortunately not.

In addition to logging the query, I would try and log the menu item name if you can at various points to see if it’s being changed or reassigned at some point along the way.

Ok gotcha. I’ll check that out.

Another quick note, I have a GrubHub integration up and running and it’s very similar to our GF script except instead of polling for orders, it listens for incoming orders. However, that GrubHub script works just fine.

I restarted the Message Server this morning and haven’t seen any incorrect tickets yet, so that’s good I guess.

This is still an issue that’s absolutely plaguing my staff. Is the SambaPOS team aware of this issue, because it really doesn’t seem to be an incorrect GQL query.

We changed a lot in gql. However current version only works with 5.5 and a GQL License. It would be hard to know if we fixed that or not until you were to try your app with the latest licensed version.

I’m using 5.3.x and my custom Gloriafood integration for a few years, never any problems. However, this glitch only started happening this August. Is it possible that my current version of SambaPOS received OTA updates?

No we do not do that. Gloriafood was bought by oracle and they have been rapidly changing it. I would guess it is related

We will have. New integration soon that also allows all delivery platforms plus Gloriafood for USA. It will work with the latest SambaPOS.

This problem isn’t specific to our Gloriafood integration. It happens with our Grubhub integration too. They’re two completely separate integrations.

You can try upgrading to see if it is resolved but we did not make any changes over the air as Sambapos is local product.

After upgrade and applying the license for gql if it still persists let us know we can look at it.