> 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-events.md).

# How to Use Custom Events

Use the [Rule Builder](/start-here/getting-started-series/quick-start-how-customizable-is-order-desk-really.md#the-order-desk-rule-builder) to create custom events that will run on a schedule that you set up. A custom event by itself will only look at the orders in a folder and not take any action on them, however you can create rules to run on your custom events that will take action when orders in the folder match the filters in the rule.

This is ideal for having the Rule Builder watch a timestamp or the order date and then take action when a certain amount of time has passed.

### Create Custom Event

Custom Events can be created in the **Rule Builder**.

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

After choosing your Rule Type, in the Event tab, you will be able to create a custom event.

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

Fill out the details for your custom event.

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

**Event Name**

Give the custom event a unique and easily identifiable name so you can select the event in your rule and view it in your appointments later.

**Target Folder**

Choose the folder you want the custom event to run on. A custom event can only run on a single folder.

**Repeat Every**

Set how often you want to run the custom event. The minimum repeat time is 5 minutes.

**Start Time**

If you need to set the exact date and/or time that the custom event starts to run, adjust that here, otherwise your event will begin to run immediately once created. You can change the time the event runs after it is created from the **View Appointments** page, accessible from the left sidebar under the **Tools** menu.

### Create Rule

Once you have a custom event, you will need to make a rule that will take action on any orders if the filters match when the event runs.

**Late Orders Example**

The most common use for custom events is to find orders that have not shipped yet.

For example, if you want to check your Prepared folder every 2 hours for orders that are older than 5 days, you can make a custom event that runs every 120 minutes on the Prepared folder. Create a rule for that custom event that says:

**Event: When Custom Event Runs**\
**Filter: If Order Date Created&#x20;*****before time*****&#x20;-5days**

Then set the actions you want to happen, such as moving the order to a different folder or sending the admin an email notification.

To create your rule, in the Event tab, find your custom event from the dropdown, or select it from the available custom events in the lower right corner of the Rule Builder.

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

For the filter choose **If Order Date Created** or **If Order Date Updated**, set the operator to **before time**, and set the value to *negative* with the time you want to have passed, such as **-5days**, **-12hours** or **-2weeks**.

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

Add the actions you want to have taken on late orders. If you want to send the admin an email notification, follow the instructions in [this guide](/guided-walkthroughs/templates-emails-and-order-documents/how-to-work-with-email-templates.md) for setting up that email template.

Make sure to move the order into a different folder as one of your actions unless you want the same actions to be taken on the order each time the custom event runs while it is still in this same folder and the filters continue to match. Alternatively, set a metadata tag with your rule (example: late|true) and then add an additional filter to the rule to look for that metadata tag on the order (example: If Order Metadata Field late Does Not Equal true). If you need help with this step, please contact Order Desk support.

**Using Timestamps**

If you need to set your delay based on an event that happened to the order after it imported into Order Desk, you can add your own timestamps with the Rule Builder. For detailed instructions, please see the [How to Work with Timestamps](/guided-walkthroughs/orders-and-folders/how-to-work-with-timestamps.md) guide.

### FAQ

**Why can’t I make my custom event more frequent than 5 minutes?**

Appointments running more than once every 5 minutes will cause extreme data usage which can impact the performance of the app. For optimum performance, we request that your appointments not be more often than necessary and have found that 5 minutes is an adequate timeframe frequency for most merchants using Order Desk who need to regularly and frequently check their orders with custom events.

If you are looking to automatically refresh orders every few seconds with new information or details using custom events, this may not be the right app for your needs. If this is the case, please contact Order Desk support and we will be happy to provide further advice or assistance for your specific situation.

**Can I edit a custom event after it’s been created?**

Custom events cannot be edited after they are created, with one exception. You can change the time they run (not the frequency) from your store’s appointments.

To do this, click on **View Appointments** in the left sidebar under the **Tools** menu.

Find the custom event you want to update and click on **Edit**, then adjust the **Next Run Date**.

**How do I delete a custom event?**

> When rules that run on Custom Events are deleted, the Custom Events aren’t deleted with them. This means that the events can keep running in the background even when there’s no rule available for them to trigger.

To delete a custom event, click on **View Appointments** in the left sidebar under the **Tools** menu.

Find the custom event you want to delete and click on **Edit**, then click **Delete Appointment**.

**How do I know which folder my custom event is running on?**

You can view the name of the folder your custom event is running on by clicking on **View Appointments** in the left sidebar under the **Tools** menu and looking beside the name of the custom event:

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


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
