How-to
Article MarkdownReport an error

How to Create and Maintain an Action in ActionJail (Administrator)

ActionJail allows you to quickly add your own logic without developing the platform core. This instruction will help you create a new action, edit it, clone or delete it, as well as organize the config and parameter input form.


When It Will Be Useful

  • You need to add a business rule or integration without changing the main code.
  • You need to update the logic of an existing action after a process change.
  • There is a typical action that is faster to copy and adapt.

What's Important to Know

  • Action — a JS script with its own system ID (action_*), configuration, and UI schema for parameters.
  • Action wizard — 5 steps: Information → Code → JSON config → UI schema → Documentation.
  • System ID — does not change after creation; used in scenarios.

Before You Start


Step-by-Step Instructions

  1. Open Apps → ActionJail and click Add new action — the wizard opens.
  2. Action Information: specify the display name, check the system ID (action_*), add a short description of the purpose.
  3. Code: paste or write JS logic; if needed, use AI generation for a draft.
  4. JSON config: set launch parameters (keys, default values) so scenarios can pass data.
  5. UI schema: add input fields (name, type, required, hint, default); this is what scenario users see.
  6. Documentation: briefly describe what the action does, what parameters it expects, and a launch example.
  7. Click Complete — the action appears in the list. For edits, open the action from the list, change fields, and click Save.
  8. To clone, select an action → Make a copy — check the new system ID and save.
  9. To delete, select an action → Delete action → confirm.
  10. Testing: After saving, use the Testing section to test action execution with different parameters before using in scenarios.

What Happens After

  • A new or updated action is available in the list and can be used in scenarios.
  • A clone is created with a new system ID, the original is not changed.

How to Verify Everything Worked

  • The action is displayed in the library and opens without errors.
  • The system ID is unique and does not change during editing.
  • UI schema fields are visible in the action parameter form in the scenario.
  • Testing section is available in the action editor (for custom actions only) and allows testing execution with different parameters.

Disable an action / restrict it to bots

You can disable an action without deleting it, or allow it only for certain bots. Both settings are in the "Action information" block of the editor.

Disable an action

  1. Open the action in Menu -> Action library.
  2. In the "Action information" block turn off the Action is active switch and click Save.
  3. The action card in the library shows a Disabled tag.

A disabled action:

  • does not run in any bot: a scenario node with this action ends with the result error (if the node has an error branch, the scenario follows it);
  • is hidden from the action list when you add a node in the builder;
  • is not deleted: nodes that already use it stay in the scenarios and are displayed as before.

To enable the action again, turn the switch on and save.

Allow an action only for certain bots

  1. In the same block tick Only for selected bots.
  2. Select one or more bots in the list. An empty selection cannot be saved.
  3. Click Save — the card shows an "Only N bots" tag.

The action runs only in the selected bots. In other bots it returns error and does not appear in the builder's action list. The rule stays in force after a service restart, on every node, and for scheduled runs of the action (they are not tied to a bot and run without the check).

Who sees what in the library

  • An administrator sees all actions with tags.
  • Other users see actions allowed for at least one of their bots, and actions with no restriction.
  • This is a display convenience, not protection: the list of bots is what restricts execution.

Actions created by the agent

When the instance agent creates an action (with the agent-action review enabled), it appears disabled, with an "Awaiting review" tag and the justification in the form. The agent cannot enable such an action or widen its bot list. Review the code and the justification and turn on the Action is active switch — that is the approval.

Installing a ready-made action from the Marketplace over a disabled one does not enable it and does not lift a bot restriction.


Testing Actions

The Testing section allows you to test action execution before using it in scenarios. This helps verify that the action works correctly with different parameters.

When to Use Testing

  • After creating or updating an action code
  • Before connecting an action to a scenario
  • When debugging action logic
  • To verify parameter handling

How to Test an Action

  1. Open an action from the list (custom actions only — system actions don't have testing).
  2. Go to the Testing section (before Documentation).
  3. Choose a test mode:
    • Simple Mode: Enter JSON parameters directly (e.g., { "param1": "value1" }).
    • Full State Mode: Enter complete state structure (can be copied from Scenario Builder).
  4. If parameters are missing, click Add first parameter to quickly create a test parameter.
  5. Click Test Action — the action executes with provided parameters.
  6. Review the result:
    • Result: The value returned by the action
    • Logs: System logs from execution
    • Errors: Any errors that occurred during execution
    • Execution Time: How long the action took to execute

Test Modes

Simple Mode:

  • Enter only the parameters your action needs (from json_obj).
  • JSON editor auto-fills with default values from "Default JSON config" if available.
  • Suitable for quick testing of action logic.

Full State Mode:

  • Enter the complete KwizbotEngine state structure.
  • Includes node, const, position, and other context.
  • State can be copied from Scenario Builder for realistic testing.
  • Shows hint: "This state can be copied to Scenario Builder".

Tips

  • If "Default JSON config" is empty, you'll see "Parameters absent" with an option to add the first parameter.
  • Test with different parameter values to ensure robust handling.
  • Check logs to understand action execution flow.
  • Use Full State mode when testing actions that depend on scenario context.

Other Ways

  • Cloning instead of creating from scratch — faster for similar actions.
  • AI generation of code/config/documentation — for drafts, but check manually.

Using your own AI agent?Install the open skill so your AI agent can work with current official ConnectiveOne documentation.Get the skillNeed support?Couldn’t find the answer or need help from the ConnectiveOne team? Create a request in Client Portal.Create a request