# Task integrations, appointments and embedded pages

Connect task branches to a registered integration, appointment form or embedded page and continue according to the result.

*Release 3.3 · admin, developer, visitor*

**Settings › Bots › Virtual Assistant › Tasks**

## What it is

An integration action lets a task use a registered business operation, offer appointment scheduling or open an embedded page. The task can continue along a success, failure, unavailable or integration-specific branch. Browser function actions can also trigger configured behaviour on the visitor's page.

## Who uses it and why

- Administrators with **Bot Trainer** access choose an installed integration and connect its results to task steps.
- Developers define the integration inputs, expected results and embedded-page behaviour with Powerfront.
- Visitors complete the appointment or embedded interaction and see the configured next step.

## Where to find it

With the **Bot Trainer** role, open a step's actions in **Settings › Bots › Virtual Assistant › Tasks** and choose **Step Action**. The choices include **Run Integration Script**, **Run Scheduling Form** and **Run IFrame**. Additional actions include **Run Async Integration Script** and, for supported answer types, **Run a Javascript Function**.

## How it works

**Run Integration Script** runs the selected registered integration with the current visitor and conversation context. A true result follows success, false follows failure and no result follows unavailable. An integration can declare named results with their own branches. An unrecognised text result follows failure.

**Run Async Integration Script** adds script work alongside the answer's other actions. Use **Run Integration Script** when the integration's result must decide the next branch.

**Run Scheduling Form** gathers eligible scheduling operators from the selected operators and teams, taking the visitor's subsite into account. On web chat, INSIDE presents the appointment form and waits for the interaction result. If no eligible operators or teams are available, the visitor flow submits a failed result.

**Run IFrame** opens the configured page and makes the selected available field values part of the embedded interaction's context. The integration must return its result so the journey can continue as configured.

**Run a Javascript Function** sends configured browser work to the connected web visitor. It depends on the visitor page providing the expected function and context.

## Configure it

1. Agree the operation, inputs and possible results with your developer and Powerfront. Powerfront can arrange installation or changes to registered scripts.
2. Choose the appropriate **Step Action** and **Integration Script**, or enter **Iframe URL**.
3. Select only the **Data Fields** needed by the embedded page. For scheduling, choose the intended operators and teams.
4. Set each success, failure, unavailable and named return action that the integration offers.
5. Add visitor messages and a suitable fallback or handover path.
6. Preview the surrounding task, then check the actual integration on the intended channel with controlled data.

### Fields

| Field | Where | Required | What it is for |
|---|---|---|---|
| Step Action | Settings › Bots › Virtual Assistant › Tasks | Yes | Selects Run Integration Script, Run Scheduling Form or Run IFrame as the next task action. |
| Integration Script | Settings › Bots › Virtual Assistant › Tasks | Yes | Selects a registered workflow integration and its available return actions. Required when Step Action is Run Integration Script. |
| Iframe URL | Settings › Bots › Virtual Assistant › Tasks | Yes | Sets the page opened by Run IFrame. Required when Step Action is Run IFrame. |
| Data Fields | Settings › Bots › Virtual Assistant › Tasks | No | Selects stored task fields to pass to the embedded interaction. Fields with no storage are not offered in this selector. |
| Run Async Integration Script | Settings › Bots › Virtual Assistant › Tasks | No | Adds an integration script as an additional action rather than using its result as the main branch decision. |
| Run a Javascript Function | Settings › Bots › Virtual Assistant › Tasks | No | Adds a browser-side function action where the answer-action editor offers it. |

### Permissions

| Permission | Lets you |
|---|---|
| Bot Trainer | Select registered integrations and configure their task branches. |

## Limits and good to know

- The integration selector lists registered workflow integrations available to the website. It is not a place to create a new integration.
- Named return actions depend on the selected script. An error is not automatically the same as a declared business failure.
- Scheduling must be enabled. Eligible appointment operators and teams can differ from operators available for immediate chat.
- Embedded pages and browser functions require the connected visitor interface. Do not assume that a web interaction works on a messaging channel.
- The embedded-page field selector offers stored fields. A selected field must also have an available value to pass data.
- Preview does not verify an external operation or completed appointment.

## Depends on and works with

### This feature uses

- **Requires** [Virtual Assistant task setup](ENG-009.md): External interaction actions must be configured within an authored task.
- **Requires** [Virtual Assistant task steps and branches](ENG-011.md): Integration actions run within the task sequence.
- **Configured in** [Integration script selection for automated actions](EXT-016.md): Script registration declares the name, eligibility and possible workflow results.
- **Configured in** [Business hours and scheduling](ADM-016.md): Appointment setup and operator availability affect scheduling choices.
- **Configured in** [Teams](ADM-013.md): Scheduling can be limited to selected teams.
- **Works better with** [Virtual Assistant task data fields](ENG-012.md): Collected data fields can provide integration input.
- **Works better with** [Virtual Assistant task messages and identity](ENG-014.md): Action messages explain the integration and its outcome.
- **Works better with** [Virtual Assistant task pauses and handover](ENG-015.md): Failure or unavailable branches can hand over to an operator.
- **Works better with** [Custom scripts managed by Powerfront](EXT-015.md): Custom script installation makes registered integration scripts available.
- **Works better with** [Media callbacks and embedded form results](EXT-021.md): Embedded interactions return results through the configured callback integration.
- **Works better with** [Appointment booking for visitors](VX-023.md): Scheduling actions use the visitor appointment form and eligible scheduling operators.
- **Works better with** [Virtual Assistant task preview](ENG-018.md): Preview checks the surrounding journey but cannot establish external integration success.

### Used by

- **Configures** [Virtual Assistant task setup](ENG-009.md): Integration actions and their return branches define external interactions within a task.
- **Configures** [Virtual Assistant task steps and branches](ENG-011.md): Integration actions and their return branches determine how external results continue the task.
- **Configures** [Integration script selection for automated actions](EXT-016.md): Task integration actions select a script and the branches followed for its returned outcomes.
- **Configures** [Custom integrations](EXT-017.md): Task integration actions select a custom integration and define the branches followed for its results.
- **Configures** [Media callbacks and embedded form results](EXT-021.md): Task integration actions define the embedded page and the branches followed for its result.
- **Enhances** [Chat tasks and topics for visitors](VX-017.md): A configured step can show an embedded external interaction.

## FAQ and troubleshooting

**Why is my integration absent from Integration Script?**

Ask Powerfront to check that it is installed, registered for workflow use and available to this website.

**Why does an integration follow the failure branch?**

Check the integration's expected result with its developer. False and unrecognised text results follow failure; no result follows unavailable. Investigate errors separately.

**Why does scheduling offer no appointments or fail immediately?**

Check scheduling activation, the selected teams and operators, their appointment setup and subsite eligibility.

**Why does the task wait after opening the embedded page?**

The page must complete its result integration. Check page loading, the selected fields and result handling with the integration developer.
