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, select GraphQL in the sidebar 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, open Actions.
  2. Select Create Action.
  3. Set the title, target, and event.
  4. In the context, query the data your action needs, then write the code in the built-in editor. See Action anatomy for what each part does.
  5. Save the action.
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.

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 in the New ION interface 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.'

Warning toast in the New ION interface after completing a Run Step 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

  1. In ION, open Actions.
  2. Select the action to open its detail page.
  3. Update the title, target, context, or code. The title appears in the action’s error and toast messages, so keep it meaningful.
  4. Select Save.
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.

Enable or disable an action

In the Actions list, select one or more actions with the checkboxes, then enable or disable them. A disabled action isn’t evaluated, which lets you stage an action before turning it on in production.

Share an action across environments

To copy an action to another environment, open it and select Share. ION generates the action’s createRule mutation; copy it and run it in the target environment’s GraphiQL editor to recreate the action there.

Delete an action

  1. In ION, open Actions.
  2. Find the action you want to remove.
  3. Delete it and confirm. To remove several at once, select them with the checkboxes 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.