# Aug. 2025 ION Actions Transition

{% hint style="info" %}
Improved ION Actions are now live in your sandbox environment for validation. The First Resonance team will reach out to customers that have Actions that must be transitioned. Otherwise, check out the new [capabilities](/supply-chain/inventory/inventory-actions.md)! ([GOV](https://app-v2.staging.gov.buildwithion.com/actions)) ([PUB](https://app-v2.staging.buildwithion.com/actions))
{% endhint %}

### ION Actions Update: Summer 2025

In the summer of 2025, both the frontend and backend of ION Actions received updates to enhance user visibility and control over digital guardrails. These improvements have also optimized ION Actions' performance and expanded use cases, including more granular inventory control.

Due to these upgrades, some existing ION Actions will require modifications. This documentation provides guidelines on identifying and updating those actions, allowing you to test and validate changes in your Sandbox environments before the scheduled deployment to all production environments at the end of August 2025.

### Required Changes

The primary change involves modifying the context queries, particularly transitioning from using `edges` queries to simpler direct-object queries.

Below is guidance on updating your existing rules to conform to the new schema:

#### Old Schema Example

Here is an example of a common action defined using the old schema:

```javascript
{
    title: "Issue Must Have an Assignee Before Being Submitted for Review.",
    ruleType: "VALIDATION",
    eventType: "CREATE",
    target: "ISSUEAPPROVALREQUEST",
    code: "if (context.get('issueApprovalRequests', {}).get('issue', {}).get('status') in ['PENDING','IN_PROGRESS'] and context.get('issueApprovalRequests', {}).get('issue', {}).get('assignedTo') is None): raise ValidationError()",
    context: "{issueApprovalRequests(filters: {id: {eq: $id}}) {edges {node {id issue {status assignedTo {id}}}}}}",
}
```

#### New Schema Example

Below is the equivalent action reformatted according to the new schema:

```javascript
{
    title: "Issue Must Have an Assignee Before Being Submitted for Review.",
    ruleType: "VALIDATION",
    eventType: "CREATE",
    target: "ISSUEAPPROVALREQUEST",
    code: "issue_approval_request = context.get('issueApprovalRequest') or {}\nissue = issue_approval_request.get('issue') or {}\nstatus = issue.get('status')\nassigned_to = issue.get('assignedTo')\n\nif status in ['PENDING', 'IN_PROGRESS'] and assigned_to is None:\n    raise ValidationError()\n",
    context: "{\n  issueApprovalRequest(id: $id) {\n    id\n    issue {\n      status\n      assignedTo {\n        id\n      }\n    }\n  }\n}"
}
```

#### Key Changes to Note

* **Context Query:**
  * Replace `edges` queries with direct-object queries. Instead of wrapping your queries inside `{ edges { node { }}}`, directly reference the target object.
  * This simplifies accessing data within the rule logic, enhancing clarity and reducing complexity.
* **Code Adjustments:**
  * Adjust the code logic to directly access the simplified context object structure as demonstrated in the new schema example.

### Recommended Workflow

To efficiently iterate on ION Actions, we recommend using the New ION Experience, which provides a dedicated management page for Actions. Refer to the documentation on [Managing Actions](/os/ion-actions/managing-actions.md) for instructions on how to find, edit, and manage Actions using this new interface. If you do not know how to access the new ION experience, talk to your CSM today! Please test any rules you need to transition in your sandbox environment today. We will reach out individually to customers who require coordination for the production rollout.


---

# 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/aug.-2025-ion-actions-transition.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.
