Skip to main content
You manage ION Actions two ways: on the Actions page in ION, a dedicated UI with a built-in code editor, or through the GraphQL API for programmatic deployment. For what an action is and how its parts fit together, see ION Actions.

Before you start

Actions must be enabled at the organization level before any action can fire. Confirm the setting in the built-in GraphiQL editor:
  1. In ION, go to Developer Platform > GraphQL to open the GraphiQL editor.
  2. Run this query to check the current setting:
  3. If enabled is false, an admin can turn it on with the updateOrganization mutation. See the API reference for the full mutation shape.

Create an action

  1. In ION, go to Developer Platform > Actions.
  2. Click Create Action. The new-action form opens on its own page, grouped into Identity, Trigger, and Logic.
  3. In Identity, enter a Title. It appears in the action’s error and warning messages, so keep it meaningful.
  4. In Trigger, set the Target record and the Event.
  5. Optional: in Logic, write the Python code and the Context query. See Action anatomy for what each part does. The Context query opens on a starting query that selects one record by id. Changing the Target record reshapes that starting query for the new target, but leaves a query you wrote yourself alone.
  6. Optional: turn on Enable on create.
  7. Click Create Action. The action’s page opens.
Title, Target record, and Event are the only required fields, and they are what Create Action waits on. Code and a context query can be written later. ION sets On violation to Block or Warn from the code when you save. Code that raises ValidationWarning saves as Warn. Any other code saves as Block, whichever option you picked. To make an action warn, see Create a warning action.
An action with no code matches every event on its target, so ION never arms one. Enable on create stays unavailable until code is written, and an action created without code is created paused.
A written context query has to be structurally valid before ION will create the action. It must select exactly one record type at the top level, hold a single query, and leave out edges at that level, which ION adds for you. A query that breaks these rules blocks creation. An empty query does not. To create an action programmatically, use the createRule mutation. See the API reference for the mutation shape, and the example actions for working configurations.
ION Actions can block changes in production. Test a new action in your sandbox before promoting it. For repeatable deployment, author through GraphQL and keep the action definition in your platform repo so you can re-deploy it from CI.

Draft an action with ION Intelligence

Depending on your settings, the form carries a Write with ION control that drafts the action from a plain-language description.
  1. On the new-action form, click Write with ION. ION Intelligence opens beside the form.
  2. Describe the action you want, naming the fields you want filled in.
  3. Wait for the answer to finish.
  4. Review every field, then click Create Action.
A turn that never mentions a field leaves that field as you had it, so a follow-up such as “shorten the title” does not clear a query you wrote by hand. ION checks each claim in the draft against the rules engine once the answer finishes. A claim it could not check stays Generated, not verified rather than becoming Verified. Review each claim rather than treating the draft as verified. Drafting is in beta. Check the output before you enable the action. The same control appears when you draft changes to an existing action, where Write with ION sits in the action’s header once you click Edit.

Create a warning action

A warning action lets the change save and shows a non-blocking message instead of blocking it. To make an action warn, raise ValidationWarning instead of ValidationError. Keep ruleType: VALIDATION; the exception type drives the behavior. For when to warn rather than block, see Blocking and warning.
The run step still completes, and the operator sees the warning. Warnings return in the GraphQL response under extensions.warnings and appear as a non-blocking toast.
Orange warning toast reading: Warning: [Rule 93] Warn when a Run Step is completed with open issues. This Run Step was completed while it still has open issues. Confirm the issues don't need to be resolved first.

The warning toast ION shows after a run step completes with open issues.

If a warning action and a validation action both fire in the same transaction, the error wins and the warning isn’t shown, though it’s still written to the execution logs.
Only one warning surfaces per change. If several warning actions fire for the same change, only the first appears; the next shows after the operator fixes it and resubmits.

Edit an action

An action’s page opens read-only. Everything on the Configuration tab is one form with one Save changes.
  1. In ION, go to Developer Platform > Actions.
  2. Click the action to open its page.
  3. Click Edit.
  4. Change what you need.
  5. Click Save changes.
To back out instead, click Discard changes. A context query you edited into something malformed holds Save changes back, though Discard changes stays available. A query that was already saved malformed doesn’t block the save, so you can still fix the other fields. To edit an action programmatically, use the updateRule mutation. See the API reference for the mutation shape.
Editing a live action changes its behavior right away. Test your changes in your sandbox before editing a production action.

When someone else saved first

Because the whole form saves at once, a save that lost a race is refused as a whole. ION reports what happened, tells you nothing of yours was saved, and offers three ways out:

Write a description with ION Intelligence

Depending on your settings, the Description field carries a Describe with Intelligence control that writes the description from the action’s own code, context query, target, and event. Click it on the action’s page. From read mode the description is written and saved on its own, so you can generate one without entering edit mode. Generate it while editing and it becomes an unsaved change like any other, stored by Save changes. To replace the description, click the control again.

Enable or disable an action

An action’s page carries the switch, labeled Action enabled or Action disabled. It commits on its own rather than through Save changes. To change several at once, select them with the checkboxes in the Actions list and enable or disable them there. A disabled action isn’t evaluated, which lets you stage an action before turning it on in production.
An action with no code matches every event on its target, so ION never enables one. The switch stays unavailable on a paused action with no code, a bulk enable skips those rows and reports how many it left paused, and saving an action whose code you emptied disables it. Disabling is never filtered: an action already running with no code is exactly the one to switch off.

Review an action’s executions

Open the action and switch to the Executions tab, beside Configuration. It carries the action’s execution metrics and its filterable log. For what each log holds, see View action execution logs.

Share an action across environments

To copy an action to another environment, open it and select Share in the More options (⋯) menu. ION generates the action’s createRule mutation; copy it and run it in the target environment’s GraphiQL editor to recreate the action there. The snippet is built from what is on the form, including any unsaved edits, so save first if you want to share what is stored.

Delete an action

  1. In ION, go to Developer Platform > Actions.
  2. Delete the action and confirm. On the action’s own page, Delete sits in the More options (⋯) menu. To remove several at once, select them with the checkboxes in the Actions list and delete them together.
To delete an action programmatically, use the deleteRule mutation. See the API reference for the mutation shape.
Deleting an action is permanent. If you only want to stop it from running, disable it instead.