# Managing Actions

## Creating and Managing ION Actions

<https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c>

#### Objective

This SOP outlines the steps to create, manage, and understand ION Actions within the ION platform, ensuring that users can effectively implement business logic in their organization.

#### Key Steps

**1. Overview of ION Actions** [0:00](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=0)

<figure><img src="/files/Hg8C29PMtUGBMZCA36uG" alt=""><figcaption></figcaption></figure>

* Ion Actions are programmatic rules and validations that align digital processes with physical outcomes.
* Users can manage these actions through a new interface.

**2. Viewing and Managing Actions** [0:37](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=37)

<figure><img src="/files/BilB2yR0UwZIJn2H0Urr" alt=""><figcaption></figcaption></figure>

* Access the list of all deployed ION Actions in your environment.
* Actions can be enabled or disabled as needed, especially in sandbox environments before production deployment.

**3. Enabling and Disabling Actions** [1:03](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=63)

<figure><img src="/files/zV1pJrLbZD6rXX6tRIdm" alt=""><figcaption></figcaption></figure>

* Use multi-select checkboxes next to action IDs to toggle actions on or off.
* To select all actions, click the header of the action table.

**4. Searching for Specific Actions** [1:37](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=97)

<figure><img src="/files/25FIMWGPcC38phN3LKDF" alt=""><figcaption></figcaption></figure>

* Use the search function to find actions related to specific keywords (e.g., 'QL' for quality levels).
* Understand the target and trigger of each action.

**5. Accessing Action Details** [2:29](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=149)

<figure><img src="/files/wXxpGsxtOj7dUUkGvUsd" alt=""><figcaption></figcaption></figure>

* Click on an action to view details such as creator, last update, and specific action settings.
* Edit action details, including target and title, which affects error messages.

**6. Sharing Actions Across Environments** [3:48](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=228)

<figure><img src="/files/N0jCmiDU2ie9J18C8WKg" alt=""><figcaption></figcaption></figure>

* Use the share functionality to copy the mutation for an action.
* Paste the mutation into the GraphQL editor of another environment to replicate the action.

**7. Understanding Context for Actions** [4:21](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=261)

<figure><img src="/files/heS2vYOdW4YToCI7oGBH" alt=""><figcaption></figcaption></figure>

* Context is crucial for actions as it determines what data the rule can access.
* Test context queries against different run IDs to ensure proper validation.

**8. Editing Action Logic** [5:07](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=307)

<figure><img src="/files/zQoQOwFvT7wfDes2fnax" alt=""><figcaption></figcaption></figure>

* Modify the code that defines the validation logic for the action.
* Use the context query to reference attributes needed for comparisons.

{% hint style="info" %}
For advanced use cases you can also leverage the changes dictionary that is provided each time an ION Action is ran. While you do not have visibility into the exact changes dictionary, [this documentation](/os/ion-actions/managing-actions/changes-dictionary.md) will help you understand the formatting of that dictionary you have to work with.
{% endhint %}

{% content-ref url="/pages/MTdfJOzedssQtrvnjcI4" %}
[Changes Dictionary](/os/ion-actions/managing-actions/changes-dictionary.md)
{% endcontent-ref %}

**9. Saving Changes** [6:20](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=380)

<figure><img src="/files/l5VHjkX7yMVUnBOo0HsI" alt=""><figcaption></figcaption></figure>

* Click the save button to apply any changes made to the ION Action.
* Be cautious with changes to avoid unintended updates.

**10. Monitoring ION Actions** [6:57](https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c?t=417)

<figure><img src="/files/d79NSheHw8r0noo9cywf" alt=""><figcaption></figcaption></figure>

* Regularly check which ION Actions are enabled and their intended outcomes.
* Stay updated on new features and improvements in the ION Actions interface.

#### Cautionary Notes

* Always test changes in a sandbox environment before deploying to production.
* Be careful when editing action logic to avoid introducing errors that could block processes.

#### Tips for Efficiency

* Utilize the search function to quickly locate specific actions.
* Regularly review and document changes made to actions for future reference.
* Familiarize yourself with GraphQL to streamline the sharing and editing process.

#### Link to Loom

<https://loom.com/share/a041c87ef6e0499f81a02b18a31e912c>


---

# 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://manual-v2.firstresonance.io/os/ion-actions/managing-actions.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.
