# How are events called?

![](https://825821834-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvJIdbk5Kfk3bDs%2F-LDfsMlLZNOBetOxbOpo%2F-LDfsT-colU_sA1M6DjE%2Frequest-lifecycle.png?generation=1527597098188588\&alt=media)

Events are determined via a special variable that can be sent in via the FORM, URL, or REMOTELY called `event`. If no event is detected as an incoming variable, the framework will look in the configuration directives for the `DefaultEvent` and use that instead. If you did not set a `DefaultEvent` setting then the framework will use the following convention for you: `main.index`

{% hint style="success" %}
**Hint** : You can even change the `event` variable name by updating the `EventName` setting in your `coldbox` [configuration directive](https://coldbox.ortusbooks.com/v6.x/getting-started/configuration/coldbox.cfc/configuration-directives).
{% endhint %}

Please note that ColdBox supports both normal variable routing and [URL mapping routing](https://coldbox.ortusbooks.com/v6.x/the-basics/routing), usually referred to as pretty URLs.

## Event Syntax

In order to call them you will use the following event syntax notation format:

```javascript
event={module:}{package.}{handler}{.action}
```

* **no event** : Default event by convention is `main.index`
* **event={handler}** : Default action method by convention is `index()`
* **event={handler}.{action}** : Explicit handler + action method
* **event={package}.{handler}.{action}** : Packaged notation
* **event={module}:{package}.{handler}.{action}** : Module Notation (See [ColdBox Modules](https://coldbox.ortusbooks.com/v6.x/hmvc/modules))

This looks very similar to a Java or CFC method call, example: `String.getLength(),` but without the parentheses. Once the event variable is set and detected by the framework, the framework will tokenize the event string to retrieve the CFC and action call to validate it against the internal registry of registered events. It then continues to instantiate the event handler CFC or retrieve it from cache, finally executing the event handler's action method.

**Examples**

```
// Call the users.cfc index() method
index.cfm?event=users.index
// Call the users.cfc index() method implicitly
index.cfm?event=users
// Call the users.cfc index() method via URL mappings
index.cfm/users/index
// Call the users.cfc index() method implicitly via URL mappings
index.cfm/users
```


---

# Agent Instructions: 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:

```
GET https://coldbox.ortusbooks.com/v6.x/the-basics/event-handlers/how-are-events-called.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
