# Internal Actions

Internal actions are built-in actions provided by Buttons itself, as opposed to actions from external connections. They control variables, navigation, routing, surfaces, and other core platform features.

**Available in Workflow** indicates whether the action can be used inside a Workflow. Actions marked `No` are only available on buttons.

### Set Workflow Variable

**Available in Workflow:** No



Sets a variable on a specific workflow by ID.

### Set Section Variable

**Available in Workflow:** Yes



Setting a section variable inside the section.



Setting a section variable in the same position from outside of the section.



Setting a section variable from another position.



Setting a section variable in a shared section docked in a specific position
Setting a section variable from a workflow 

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `'parent'` | `'id'` | Yes | `parent` uses the button's own section; `id` requires explicit IDs below |
| `variableId` | string | Yes | ID of the variable to set |
| `value` | string | number | boolean | null | No | Value to assign |
| `sharedSections` | boolean | No | Whether the target is a shared section |
| `sharedSectionId` | string | No | ID of the shared section (required when `sharedSections` is true) |
| `positionId` | string | No | Position ID (for shared sections) |
| `sectionId` | string | No | Section ID (required when `target` is `id`) |

### Set Position Variable

**Available in Workflow:** Yes



Sets a variable on a position. Can target the current position or a specific position by ID.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `'position'` | `'id'` | Yes | `position` uses the current position; `id` requires `positionId` |
| `variableId` | string | Yes | ID of the variable to set |
| `value` | string | number | boolean | null | No | Value to assign |
| `positionId` | string | No | Position ID (required when `target` is `id`) |

### Set Button Variable

**Available in Workflow:** Yes

 Sets a variable on a button. Can target the current button or a specific button by ID.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `'self'` | `'id'` | Yes | `self` uses the current button; `id` requires explicit IDs below |
| `variableId` | string | Yes | ID of the variable to set |
| `value` | string | number | boolean | null | No | Value to assign |
| `sharedSections` | boolean | No | Whether the target is in a shared section |
| `sharedSectionId` | string | No | ID of the shared section |
| `positionId` | string | No | Position ID |
| `buttonId` | string | No | Button ID (required when `target` is `id`) |

### Set Active Step Index

**ID:** `button_set_activeStepIndex`
**Available in Workflow:** No

Navigates a button to a specific step. Step index is 1-based.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `'self'` | `'id'` | Yes | `self` uses the current button; `id` requires explicit IDs below |
| `stepIndex` | number (min: 1) | Yes | Step to activate (1-based) |
| `sharedSections` | boolean | No | Whether the target is in a shared section |
| `sharedSectionId` | string | No | ID of the shared section |
| `positionId` | string | No | Position ID |
| `buttonId` | string | No | Button ID (required when `target` is `id`) |

### Set Active Page

**ID:** `section_set_activePageId`
**Available in Workflow:** Yes

Navigates a folder or shift-section to a specific page.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `pageId` | string | Yes | ID of the page to navigate to |
| `sharedSections` | boolean | No | Whether the target is a shared section |
| `sharedSectionId` | string | No | ID of the shared section |
| `positionId` | string | No | Position ID (defaults to current position) |
| `sectionId` | string | No | Section ID (defaults to current parent section) |

### Set Popover State

**ID:** `popover_set_state`
**Available in Workflow:** No

Opens, closes, or toggles a popover. Can target local, foreign, or shared popovers.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `popoverId` | string | Yes | ID of the popover |
| `command` | `'open'`\n`'closed'`\n`'toggle'` | Yes | State to apply |
| `positionId` | string | No | Position ID (defaults to current position) |
| `sharedSections` | boolean | No | Whether the target is a shared section |
| `sharedSectionId` | string | No | ID of the shared section |

### Take Route

**ID:** `route_execute`
**Available in Workflow:** Yes

Executes one or more routing changes simultaneously.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `mappings` | RouteMapping[] | Yes | Array of route mappings to apply |

Each mapping in `mappings`:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Route ID |
| `route_destinationPortId` | string | Yes | Destination port |
| `route_sourcePortId` | string | null | Yes | Source port; `null` to unroute |
| `route_ignoreLock` | boolean | No | Whether to bypass route locks |

### Execute Routing Preset

**ID:** `salvo_execute`
**Available in Workflow:** Yes

Executes a saved routing preset (salvo), applying multiple routes at once.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `salvoId` | string | Yes | ID of the routing preset to execute |

### Set Connection Enabled

**ID:** `connection_set_enabled`
**Available in Workflow:** Yes

Enables, disables, or toggles one or more connections.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `connectionIds` | string[] | `'*'` | Yes | List of connection IDs, or `'*'` for all |
| `enabled` | `'true'`\n`'false'` \n`'toggle'` | Yes | State to apply |

### Set Workflow Enabled

**ID:** `workflow_set_enabled`
**Available in Workflow:** Yes

Enables, disables, or toggles one or more workflows.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workflowIds` | string[] | `'*'` | Yes | List of workflow IDs, or `'*'` for all |
| `enabled` | `'true'` | `'false'` | `'toggle'` | Yes | State to apply |

### Set Surface Settings

**ID:** `assign_surface_to_position`
**Available in Workflow:** Yes

Updates settings on one or more surfaces: coordinates, position assignment, brightness, or display state.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `subjectType` | `'self'` \n`'surfaceId'`\n`'fromPositionSelf'`\n`'fromPositionId'` | Yes | How to select the target surface(s) |
| `subjectId` | string | Conditional | Surface ID (when `subjectType` is `surfaceId`) or Position ID (when `fromPositionId`) |
| `setCoordinates` | boolean | No | Enable coordinate update |
| `x` | number | No | X coordinate |
| `y` | number | No | Y coordinate |
| `setPosition` | boolean | No | Enable position assignment update |
| `clearPosition` | boolean | No | Remove position assignment |
| `positionId` | string | null | No | Position ID to assign |
| `setDisplayBrightness` | boolean | No | Enable brightness update |
| `displayBrightness` | number | variable | No | Brightness level (0–100) |
| `setDisplayEnabled` | boolean | No | Enable display on/off update |
| `displayEnabled` | boolean | No | Whether the display should be on |

`subjectType` values:

- `self` — the surface that triggered this action
- `surfaceId` — a specific surface by ID
- `fromPositionSelf` — all surfaces assigned to the current position
- `fromPositionId` — all surfaces assigned to a specific position

### Cuelist Command

**ID:** `cuelist_command`
**Available in Workflow:** Yes

Sends a navigation or execution command to a cuelist.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `cuelistId` | string | Yes | ID of the cuelist |
| `command` | `'SELECT_NEXT'` | `'SELECT_PREVIOUS'` | `'EXECUTE_SELECTED'` | Yes | Command to send |

Commands:

- `SELECT_NEXT` — advance the selection to the next cue
- `SELECT_PREVIOUS` — move the selection to the previous cue
- `EXECUTE_SELECTED` — execute the currently selected cue

### Trigger Button

**ID:** `button_trigger`
**Available in Workflow:** Yes

Programmatically triggers a press, release, or press-then-release on another button.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `buttonId` | string | Yes | ID of the button to trigger |
| `action` | `'press'`\n`'release'`\n`'pressRelease'` | Yes | Action to perform (default: `pressRelease`) |
| `delayMs` | number (0–10000) | No | Delay in ms between press and release (default: `100`) |
| `sharedSections` | boolean | No | Whether the target is in a shared section |
| `sharedSectionId` | string | No | ID of the shared section |
| `positionId` | string | No | Position ID (defaults to current position) |

### Logout Session

**ID:** `session_logout`
**Available in Workflow:** No

Logs out all authenticated users on a position, clearing their session state.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `positionId` | string | No | Position to log out (defaults to current position) |
