# Integration script selection for automated actions

Select a deployed custom script for an event, workflow or AI function, with choices limited to the relevant website and purpose.

*Release 3.3 · admin, developer*

**Settings › Events › Visitor Events** · **Settings › Events › Email Events** · **Settings › Bots › Virtual Assistant › Tasks** · **Settings › Bots › Virtual Assistant › Steps** · **Settings › AI › Functions**

## What it is

INSIDE offers deployed scripts in selectors for events, workflows and AI functions. Each selector shows scripts for its purpose and website. Scripts can also respond automatically to platform events, such as a conversation message or assignment.

## Who uses it and why

Use **Settings** or **Manager** access to configure permitted event actions. A **Bot Trainer** selects integration scripts in Virtual Assistant workflows. **Settings** or **Developer** access provides the AI function editor, subject to the applicable permissions.

As a developer, agree the script's purpose, website scope and expected outcomes with Powerfront before it is deployed.

## Where to find it

- **Settings › Events › Visitor Events** and **Settings › Events › Email Events** offer eligible custom event actions.
- **Settings › Bots › Virtual Assistant › Tasks** and **Settings › Bots › Virtual Assistant › Steps** provide workflow configuration. Choose **Run Integration Script** and then **Integration Script** where the action offers it.
- **Settings › AI › Functions** offers **Custom Script** for a script-backed AI function.

Automatic hooks do not have a general-purpose Settings editor. Ask Powerfront to change their implementation or website scope.

## How it works

INSIDE discovers loaded scripts that are global or assigned to your selected website. It then limits choices by category. An event action, workflow integration script and AI custom script serve different purposes, so their lists can differ.

For a workflow integration action:

1. Choose **Run Integration Script** in the workflow action editor.
2. Select an **Integration Script**.
3. Configure the available return actions, including any extra outcomes supplied by that script.

The workflow waits for the integration result. A true result means success, a false result means failure, and an empty result means unavailable. A text result must match a declared outcome; an unknown text result means failure. The workflow then follows the action configured for that outcome.

Automatic hooks work differently. INSIDE invokes scripts when the associated platform event occurs. Some calls wait for scripts to finish; others start background work. Do not rely on background scripts finishing in a particular order.

## Configure it

Ask Powerfront to load the script for the intended website and purpose. Then open the relevant editor and select it by its displayed name.

For workflows, configure the success, failure, unavailable and custom outcomes that the selected script needs. For AI functions, select the script in **Custom Script** and configure the function through the normal AI function editor.

### Fields

| Field | Where | Required | What it is for |
|---|---|---|---|
| Integration Script | Settings › Bots › Virtual Assistant › Steps | Yes | Selects the deployed script used by a Run Integration Script workflow action. |
| Custom Script | Settings › Events › Visitor Events | No | Adds an eligible deployed script to a visitor event. |
| Custom Script | Settings › AI › Functions | Yes | Selects the deployed script that fulfils a Custom Script AI function. |

### Permissions

| Permission | Lets you |
|---|---|
| Settings | Provides access to Visitor Events, Email Events and AI Functions, subject to delegated Settings permissions. |
| Manager | Provides access to Visitor Events and Email Events, subject to delegated Manager permissions. |
| Bot Trainer | Provides access to Virtual Assistant Tasks and Steps. |
| Developer | Provides access to AI Functions. |

## Limits and good to know

- A script's presence in one selector does not make it available for every other purpose.
- A visible name is not the script's execution identity. Ask Powerfront to investigate duplicate or ambiguous names.
- Automatic hook failures can be logged while other handlers continue. The original event's completion does not prove that every integration succeeded.
- The script catalogue does not provide a guaranteed recurring schedule or replay of missed events.

## Depends on and works with

### This feature uses

- **Requires** [Custom scripts managed by Powerfront](EXT-015.md): Scripts must be deployed and loaded before they can be selected or invoked.
- **Configured in** [Roles and permissions](ADM-008.md): Role permissions control access to each editor that offers script selection.
- **Configured in** [AI integrations and automation tools](AI-018.md): AI Functions selects the custom script used by a script-backed tool.
- **Configured in** [Visitor event rules and actions](ENG-001.md): Visitor Events selects custom script actions and defines when they run.
- **Configured in** [Task integrations, appointments and embedded pages](ENG-017.md): Task integration actions select a script and the branches followed for its returned outcomes.
- **Configured in** [Email event rules and actions](ENG-022.md): Email Events defines the triggers, priority and cooldown for rules with Powerfront-configured script actions.
- **Works better with** [Starting, ending and expiring chats](CHAT-001.md): Conversation-end hooks can invoke custom scripts.
- **Works better with** [Messages and rich content](CHAT-002.md): Conversation-message hooks can invoke custom scripts.
- **Works better with** [Chat queue](CHAT-005.md): Queue events can invoke custom scripts during queue processing.

### Used by

- **Configures** [Task integrations, appointments and embedded pages](ENG-017.md): Script registration declares the name, eligibility and possible workflow results.
- **Configures** [AI integrations and automation tools](AI-018.md): Script catalogue configuration supplies available custom scripts.
- **Configures** [Custom integrations](EXT-017.md): Script scope and category determine where an integration is available.
- **Enhances** [Visitor event rules and actions](ENG-001.md): Integration scripts can trigger labelled events or provide custom actions.
- **Enhances** [Visitor event targeting conditions](ENG-002.md): Registered custom filters extend the available choices.
- **Enhances** [Visitor event updates to customer context](ENG-007.md): Registered scripts supply optional custom actions.
- **Enhances** [Custom scripts managed by Powerfront](EXT-015.md): Loaded scripts can appear in category-specific selectors and respond to platform events.

## FAQ and troubleshooting

### Why is my script missing from the list?

Check that you selected the correct website. Ask Powerfront to confirm the script loaded successfully and has the category required by that editor.

### Why do two screens show different scripts?

The screens filter scripts by purpose. A workflow script is not automatically an event action or an AI function.

### Why did my workflow take the failure or unavailable branch?

An empty result means unavailable. False or an unrecognised text outcome means failure. Ask Powerfront to check the script result and compare it with the workflow's configured return actions.

### Why are custom outcomes missing?

The selected script must declare those outcomes. Ask Powerfront to check its workflow compatibility and reload the corrected script, then reopen the action editor.
