updateEntity mutation for graphql


I’m building an integration with SambaPOS where I am adding customer entities which is currently done using the addEntity mutation, however we also need to be able to edit existing customer entities (e.g. to change the address). I’ve just realised there is no updateEntity mutation - could this be added?



Yes it’s good idea, i noted that our Development Trello board


Can I also add to @markjw request mutations for Account Document creations?? If you like I can create a whole new Request :slight_smile:

At the moment we use FILEMON and it pretty ordinary due to network issues, which machine will have the Device, etc.



I dont understand what you want Paul. Please describe it to me :slight_smile:


Hi @VehbiEmiroglu

Can we have this action “Create Account Transaction Document” available as a mutation:

If I can access to ADD & UPDATE Entities, combined with able to modify Entity Accounts then we can build true integration with our systems.

Does this help?


Ok but why do you want? I mean how you use this. If we understand why we can give the priority.


We need to post value onto Entity Accounts from outside systems such as Membership or Banking Systems.

Once the value $$$ has been posted as a deposit using Create Account Transaction Document then the Customer (Entity) in POS can use “Account” payment type to purchase in POS.

At the moment receipts $$$ taken in our membership for a Customer Account in POS (prepayments for Credit) are compiled in text files (CSV) and sent to a Directory that SambaPOS using FILEMON watches. SambaPOS picks the file up using JavaScript, reads file line by line, and creates account documents for customers in SambaPOS.

FILEMON process is unreliable as there no guarantee the file will arrive. :pensive:
If I could use GraphQL then I could talk directly to the DB through QL and create documents and ensure receipts (or even invoices) are received.

Hope that makes sense.


I also might add this feature alone wold make learning GraphQL compelling as it opens up serious 3rd party integration other being able to modify a ticket…

Thanks Paul.


@emre may be you want to see


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.

    {name:"AutomationCommandName",value:"Change Customer Address"},
    {name:"EntityName", value:"Emre Eren"},
    {name:"Address", value:"Test 1234"}

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.

SambaPOS 5.2.11 Beta Release

WOw @emre a very important post!

So the way I read this any rule & action can be called by the notifyEvent - which means I can create account documents :slight_smile: I assume I can pass all parameters to ensure the document is completed…


You know I vaguely remember him mentioning this during the whirlwind development of GraphQL I did not pay as much attention to it though.


Yes me to @kendash but it was not explain so nicely as above :slight_smile: Thanks Emre…