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:- In ION, select GraphQL in the sidebar to open the GraphiQL editor.
-
Run this query to check the current setting:
-
If
enabledisfalse, an admin can turn it on with theupdateOrganizationmutation. See the API reference for the full mutation shape.
Create an action
- In ION, open Actions.
- Select Create Action.
- Set the title, target, and event.
- 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.
- Save the action.
createRule mutation. See the API reference for the mutation shape, and the example actions for working configurations.
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, raiseValidationWarning instead of ValidationError. Keep ruleType: VALIDATION; the exception type drives the behavior. For when to warn rather than block, see Blocking and warning.
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.'](https://mintcdn.com/firstresonance/3YHPQuEzl4qOwG1I/images/ion-actions/warning-actions-toast-new-ion.png?fit=max&auto=format&n=3YHPQuEzl4qOwG1I&q=85&s=8d57d9b386ca03cebacb6112f009de4f)
Warning toast in the New ION interface after completing a Run Step with open issues.
Edit an action
- In ION, open Actions.
- Select the action to open its detail page.
- Update the title, target, context, or code. The title appears in the action’s error and toast messages, so keep it meaningful.
- Select Save.
updateRule mutation. See the API reference for the mutation shape.
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’screateRule mutation; copy it and run it in the target environment’s GraphiQL editor to recreate the action there.
Delete an action
- In ION, open Actions.
- Find the action you want to remove.
- Delete it and confirm. To remove several at once, select them with the checkboxes and delete them together.
deleteRule mutation. See the API reference for the mutation shape.
Related
- ION Actions for how actions work and how to write their code
- View action execution logs to inspect and debug an action run
- Example actions for working action configurations