> For the complete documentation index, see [llms.txt](https://help.orderdesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.orderdesk.com/guided-walkthroughs/rules-and-automations/how-to-use-custom-buttons.md).

# How to Use Custom Buttons

Custom buttons can be created to run a rule when the button is clicked for an order or a group of orders.

If you aren’t familiar with the Rule Builder yet, take a few minutes to read through [this guide](/start-here/getting-started-series/quick-start-how-customizable-is-order-desk-really.md#the-order-desk-rule-builder).

### Create Button

Custom buttons are created in the Event tab of the Rule Builder.

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2F3N6XHMnMT998ZnY8RmfY%2Flegacy-f199cb614ebe85cd764c.png?alt=media)

When creating a custom button, give it a name that will be easy to understand later when working on your orders.

Once created, the button will appear in your folders:

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FVoLstbUjyWnkm0zNtyhi%2Flegacy-d9d9631c9e75bc4ee58f.png?alt=media)

and on the order details page:

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FayQkX1kemHjfB24bLvue%2Flegacy-3ef02fad9dfa4d458377.png?alt=media)

### Create Rule

To set up a rule to run on the click of your custom button, first make sure the button you created is selected for the Event.

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FaJi9RdUqn22wWKfaf6SR%2Flegacy-5faf79620d35c055cbaa.png?alt=media)

Add filters, if necessary, and choose the action(s) you want to have happen to an order when the button is clicked.

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FgSe6iQETSQTusbolcOKd%2Flegacy-97000e6a8f29779871a5.png?alt=media)

Name and save the rule.

When creating a custom button, you will have the option to create a dropdown out of multiple rules attached to the button.

To set this up, select **This button will be a dropdown to select from any attached rule**:

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FmDWGW6KbHWCMEFvSYO5y%2Flegacy-66612d340dceb5e64ed2.png?alt=media)

Once created, you can add as many rules to the button as you need:

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FeAm2p3FnXEn2YQJVth5U%2Flegacy-0c4e72eaf5768c5df04a.png?alt=media)

Each rule’s action will act as a separate option in a dropdown that appears when you click the button:

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FPosXTG9cPdOEAheKkdUk%2Flegacy-41f3a6078bc53699de9d.gif?alt=media)

### Delete Button

You can delete custom buttons from the Event tab in the Rule Builder.

![](https://251457507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQOLMUJWMYtrpQ7Oxxca%2Fuploads%2FZGOpbkLM3ydybp5k6GS3%2Flegacy-ef53f8fc1180a3da5965.png?alt=media)

After clicking Delete a Button, you can click the x next to any button you want to delete.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.orderdesk.com/guided-walkthroughs/rules-and-automations/how-to-use-custom-buttons.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
