# GraphQL ExecuteAutomationCommand Help

**URL:** <https://forum.sambapos.com/t/graphql-executeautomationcommand-help/23394>\
**Category:** V5 Question\
**Created:** [November 29, 2020, 10:07am UTC](https://forum.sambapos.com/t/graphql-executeautomationcommand-help/23394 "2020-11-29T10:07:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billow](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/c6cbf5/32.png) [@Billow](https://forum.sambapos.com/u/Billow)\
**Post date:** [November 29, 2020, 10:07am UTC](https://forum.sambapos.com/t/graphql-executeautomationcommand-help/23394/1 "2020-11-29T10:07:23Z")

</div>

I’m trying to execute an automation command to make a ticket state “Kitchen State” ready but I’m not sure how to pass the ticket id to the command. Here is my GQL:

```
mutation m1 {
  executeAutomationCommand(
    name: "CKT-Order Ready",
    terminal: "Server",
    department: "Restaurant",
    user: "Admin"
    ticketType: "Ticket",
    parameters: [{name: "Ticket Id", value: "24"}]
  )
}

```

Here is my command in Samba:

 ![Screenshot (6)](https://forum.sambapos.com/uploads/default/original/3X/3/d/3d188e307e99bcc55ce383495e09d22fd9db2904.png)  
 ![Screenshot (7)](https://forum.sambapos.com/uploads/default/original/3X/6/5/65a6100f0b7c4916d5e346dde1eadbb14d982b74.png)  
 ![Screenshot (8)](https://forum.sambapos.com/uploads/default/original/3X/9/f/9f297aed475eed91cff1fd4b0dde1b109d8aed09.png)

---

<div class="post-metadata">

**Author:** ![Billow](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/c6cbf5/32.png) [@Billow](https://forum.sambapos.com/u/Billow)\
**Post date:** [November 29, 2020, 10:08am UTC](https://forum.sambapos.com/t/graphql-executeautomationcommand-help/23394/2 "2020-11-29T10:08:09Z")

</div>

FYI: This configuration was from the official Kitchen Display tutorial from KB.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [November 29, 2020, 5:03pm UTC](https://forum.sambapos.com/t/graphql-executeautomationcommand-help/23394/3 "2020-11-29T17:03:24Z")

</div>

It really depends on how your using this. Did you build a button in html or something? Can you explain why you need GQL to do this? I assume your building a KDS app and need a way to manipulate a ticket. Perhaps you should build a function that when you select a ticket from your app it reads ticket id?
