# Actions for ONU

Action is a feature, that helps you to apply custom code to the ONU, that otherwise you have to perform manually step by step. This simplifies any interaction with ONU and helps you automate your daily routine. This could include tasks like provisioning, configuring, or troubleshooting the ONU.

The main difference between Preset and Action is that Ppreset is used for registering new ONUs instead of creating custom actions with registered ONUs in the EasyPON web application.\
\
You may access the Action submenu by clicking on **Settings -> Action** in the Main Menu.

## Action list

Displaying added Actions at the Action for ONU list in the Action for ONU section.&#x20;

You can select items in the list to open an action on the specific page for viewing the selected Action detailed information.

<figure><img src="/files/LFIaJSrdO8BABQyIaIaR" alt=""><figcaption><p>Action for ONU</p></figcaption></figure>

Also, the **Add Action** button is available in the section, which allows you to add new Actions. You can also find the Docs button to get to this manual section.

## Action for ONU page

You can also **Edit**, **Delete**, and view event logs of documentation by clicking the Docs icon.

It is also possible to view the event logs of selected actions by pressing the Event Logs quick actions menu button. You will be redirected to [Event Logs](/event-log.md) filtered by specific action

<figure><img src="/files/9Rk5tKpLFiKUa5NNUBtt" alt=""><figcaption><p>Action for ONU page</p></figcaption></figure>

## Add Action for ONU

To add a new Action click on the button **Add Action**. After that, you can set the Action Name, Code, Description, and ONU types on the Action form. You can use the [Macros list](/configuration-features/macros.md) for your convenience to fill the required ONU parameters in the code field by clicking on the macros.

On the Add Action for ONU form, you can add the following preset information:&#x20;

* **Action title** - the title of the action
* **Code** - Action configuration script with Macros
* **ONU Type** - selected ONU types to which the action corresponds&#x20;
* **Description** - a detailed description of the action
* **Macros list** - select macros which will be used in the action

<figure><img src="/files/kzq1wbqPxvOTy9roh5cF" alt=""><figcaption><p>Create Action for ONU form</p></figcaption></figure>

## Edit Action for ONU

You can change the preset data by pressing the **Edit** button modifying the Action Name, Description, and Code with selected Macroses, and assigning ONU types.

<figure><img src="/files/TUYEl7YF8d5dijVtCnI5" alt=""><figcaption><p>Edit Action for ONU form</p></figcaption></figure>

## Run Actions

Actions can be run from a specific ONU page by clicking Action on the Quick Actions Bar. On the modal window, you can Apply or Cancel the action.

<figure><img src="/files/bwDALmLDUWN2SelTd5eb" alt=""><figcaption><p>Custom action for ONU</p></figcaption></figure>

After the run, the action will be executed in the configuration console with the execution output. Action can be re-run by using the up key on the keyboard

<figure><img src="/files/LyeaLn8Dt60GgAwqy5hp" alt=""><figcaption><p>Action execution information</p></figcaption></figure>

## Macros list

There is a [Macros list](/configuration-features/macros.md) available on the right side. Macro variables can be used as the template for substituting standard parameters into a Preset configuration in the Code input field while adding or editing the preset.

<figure><img src="/files/bjkCxX2H1GZx8VNIoL4y" alt="" width="375"><figcaption><p>Macros list</p></figcaption></figure>


---

# 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://docs.easypon.in/configuration-features/custom-action.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.
