Sorry guys I’ve just find free time to read whole topic to understand what you want.
For these functions we don’t have equivalent graphql mutations because SambaPOS actions are already available to graphql by using notifyEvent
mutation. I was thinking there was a tutorial but seems like we don’t have any. I’ll try to show a small example. I’ll be really glad if someone prepares a tutorial for it.
Think like we have an action like this.
… and a rule to handle this action
I can use this GraphQL mutation to change customer’s address.
mutation{notifyEvent(
event:"AutomationCommandExecuted",
parameters:[
{name:"AutomationCommandName",value:"Change Customer Address"},
{name:"EntityName", value:"Emre Eren"},
{name:"Address", value:"Test 1234"}
],
user:"Administrator",
ticketType:"Ticket",
terminal:"Server",
department:"Restaurant",
state:{ticket:{id:0}}
){ticket{id}}}
This is basically how Rule Parameters are mapped.
This is how it works.
You can execute any SambaPOS action by using this technique.
PS: state
parameter is useful to execute ticket related actions. For non ticket actions you can just set an empty ticket as shown on the example.