Sambapos addProduct using GraphQL

Oh I see what you mean. You literally mean a price definition I thought you were referring to the product itself.

Thank you let me check it in that way.

Hi I am able to add ticket using
mutation m{addTicket(
ticket:{type:“Delivery Ticket”,
department:“Restaurant”,
user:“onlineorder”,
terminal:“Server”,

            entities:[{entityType:"Customers",name:"9875566735"}],
            states:[
                {stateName:"Status",state:"Paid"},
                {stateName:"Source",state:"website"},
                {stateName:"Delivery",state:"Waiting"}
            ],
            tags:[{tagName:"Delivery Minutes",tag:"45"}],
            calculations:[{name:"Delivery Service",amount:10.00}],
            orders:[{
        name:"2 LITER POP ",
        menuItemName:"",
        quantity:1,
        price:14.00,
        tags:[],
        states:[
            {stateName:"Status",state:"Submitted"}
        ]
    }]
        }){id}}

I would like to open the settle screen on POS so I have tried with the following command
mutation m{executeAutomationCommand(
name:“Settle”,
ticketType:“Delivery Ticket”,
terminal:“Server”,
department:“Restaurant”,
user:“onlineorder”
)}
Getting this bellow response. But it’s not showing the settle screen. Can you help please?
{ executeAutomationCommand: ‘OK’ }

Why do you need gql to open settle screen? It won’t work that way. If your at the terminal just press settle button. I don’t u derstand why you need gql for that.

When some order is paid by card in website then there no need to open the item adjustment screen anymore. Just let me know if it is possible or not.

If the item is paid online one should have executed the payTerminalTicket mutation when processing the order into SambaPOS.

GQL creates a headless/virtual terminal when its working with a ticket and cannot open any navigation screens.

If you wanted to have something display on a physical terminal you could use a broadcast message then have automation listen or message received and then do something.

1 Like

It is not possible but you probably need a different flow as Memo pointed out. I ask these questions to understand the real issue. Sometimes you may not realize the flow you need to follow and we need to ask questions to provide a good answer.

So without creating terminalTicket is it not posible to use payTerminalTicket?

That is correct.

123

Correct you can only pay out Terminal Tickets.

How to update a terminal ticket type (Delivery, Takeaway)? Not getting a way in QGL. Please help.
Earlier I was able to do with addTicket
mutation m{addTicket(
ticket:{type:“Delivery Ticket”,
department:“Restaurant”,
user:“onlineorder”,
terminal:“Server”,

https://forum.sambapos.com/t/integrators-graphql-api-guide/14047/7?u=msi

Ticket type is set when the terminal is registered. With just GQL, you will have to unregister the terminal and register a new terminal to change the ticket type.

I haven’t tried, but maybe executing an automation command on the terminal ticket to change ticket type may work.

Is there any other way to do that? Our client says the second method will not work. We nned to create different type of Menus(Takeway, Delivery) for pos

GQL knows nothing about a menu when it is processing products into tickets.

But, when I am inseritng the price for delivery from GQL in pos its showing the price already have for takeway. I have completed all only this is pending to do.

Do you specify the price in the mutation?

Yes, the exact price that have for delivery.

If you’re specifying the price in the mutation from what’s on the online menu then it should override the default price like below:

2020-12-06_22;29_1607315352_Notepad2 2020-12-06_22;29_1607315371_Samba.Presentation

2020-12-06_22;30_1607315452_Notepad2 2020-12-06_22;31_1607315466_Samba.Presentation

Let me check if I missed anything