> ## Documentation Index
> Fetch the complete documentation index at: https://docs.royaltyport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Composers

> Orchestrate multiple automations and hooks on a visual canvas

## What is a Composer?

A Composer is the top-level orchestrator in Automations. It lets you connect multiple automations and hooks on a visual canvas to define an execution flow. Think of it as the master plan that controls which workflows run and how they chain together.

## Creating a Composer

<Steps>
  <Step title="Switch to Test Mode">
    Composers can only be created in test mode. Use the mode toggle in the sidebar if you're currently in live mode.
  </Step>

  <Step title="Click Create">
    Click the **Create** button in the composers section of the sidebar.
  </Step>

  <Step title="Name Your Composer">
    Give your composer a descriptive name that reflects its purpose.
  </Step>
</Steps>

## The Composer Canvas

When you select a composer from the sidebar, the main area opens the **composer canvas** — a visual flow editor where you build your orchestration. It works similarly to the [Workflow Canvas](/automations/canvas): steps are nodes, and you connect them with edges to define the execution order.

### Trigger Node

Every composer has a **Trigger node** at the top of the canvas. Click the trigger node to open its configuration panel on the right and set how the composer starts:

| Trigger Type | Description                                                          |
| ------------ | -------------------------------------------------------------------- |
| **Events**   | Fires when a specified platform event occurs (e.g. Contract Created) |
| **Schedule** | Runs on a cron schedule you define                                   |
| **Manual**   | Started only by clicking the Run button                              |

### Step Types

| Type           | Description                                                                           |
| -------------- | ------------------------------------------------------------------------------------- |
| **Automation** | References a workflow built on the automation canvas                                  |
| **Sleep**      | Pauses execution for a specified duration before continuing                           |
| **Review**     | Pauses execution and creates a review request with a configurable timeout and message |

### Adding Steps

Add steps to the canvas in two ways:

* **Header button** — Click the **Step** dropdown in the canvas header and select a step type.
* **Right-click menu** — Right-click anywhere on the canvas to open a context menu with all step types.

### Connecting Steps

Drag from the output handle of one node to the input handle of another to connect them. The execution flows along these connections. Cycles are not permitted — the canvas prevents you from creating a circular connection.

### Configuring a Step

Click any node on the canvas to select it and open its configuration panel on the right side:

* **Automation step** — Toggle the step enabled or disabled. Click the drill-in icon on the node to open that automation's workflow canvas.
* **Sleep step** — Set the duration (e.g. `30s`, `5m`, `1h`).
* **Review step** — Enter a message for reviewers and a timeout after which the composer continues automatically.

### Repositioning Nodes

Drag nodes to rearrange them. The visual layout does not affect execution — only the connections matter.

### Removing Steps

Select a node and either press **Backspace** or click the trash icon in the configuration panel.

## View Mode and Edit Mode

The Automations page has two modes, switchable with the **View / Edit** toggle in the sidebar header.

| Mode     | What you see                                                                                                       | What you can do                                     |
| -------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- |
| **Edit** | The composer canvas and sidebar                                                                                    | Build and configure automations                     |
| **View** | A tabbed view: **Reviews** lists runs awaiting approval; **Automations** lists all composers with their run status | Review paused runs; batch-run composers in sequence |

### Reviews Tab

The **Reviews** tab is the first thing you see in View Mode. It shows every run that is currently paused at a **Review** step, waiting for a human to approve or reject before execution continues.

Runs are grouped by workflow. Each group header shows:

* The workflow name
* How long ago the latest awaiting run started
* A **Pending** badge with the number of review messages in that group

Below each group header, the pending reviews are listed in a **table** — one row per review entry. This keeps large batches (for example, every item of a loop or every page of a paginated workflow) scannable in one place. Each row shows:

| Column       | What it shows                                                                                                                                                               |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Checkbox** | Select the row for a bulk action. Only reviews in **Wait** mode that are still awaiting a decision are selectable.                                                          |
| **Review**   | The review's title and description.                                                                                                                                         |
| **Data**     | A short preview of the first couple of key-value fields in the review data (with any extra fields shown as a `+N` count). UUID values are resolved to human-readable names. |
| **Open**     | The configured link, if any — opens the related contract, recording, or external resource in a new tab.                                                                     |
| **Actions**  | Inline **Approve** and **Reject** buttons for that single review.                                                                                                           |

Click anywhere on a row to open a dialog with the full review data for that entry, where you can also approve or reject it.

#### Bulk Approve and Reject

A toolbar above the table lets you resolve many reviews at once:

* **Select All** toggles selection of every pending review in the section. You can also tick individual checkboxes, and the count of currently selected rows is shown in the toolbar.
* **Approve selected** approves every selected review and resumes those workflows.
* **Reject selected** rejects every selected review and stops those workflows.

After a bulk action, a summary toast reports how many reviews were processed (and how many failed, if any). Resolving a review — individually or in bulk — immediately unpauses the affected execution and refreshes the list. If no runs are awaiting review, the tab shows an empty state.

<Note>
  Starting a new run of a workflow automatically clears out any pending reviews from prior runs of the same automation — those reviews are auto-rejected, their workflows resumed, and the messages closed. See [Pending Reviews on Re-run](/automations/steps/review#pending-reviews-on-re-run) for details.
</Note>

### Automations Tab

The **Automations** tab lists all your composers with their last-run status. Use it to run your workflows in batch and to inspect step logs without leaving View Mode.

### Running Composers in View Mode

<Steps>
  <Step title="Switch to View Mode">
    Click **View** in the View / Edit toggle at the top of the sidebar (or the header, depending on which page is active).
  </Step>

  <Step title="Open the Automations tab">
    Click the **Automations** tab to see the full list of composers.
  </Step>

  <Step title="Click Run">
    Click the **Run** button in the top-right header. This opens the Run Composers dialog.
  </Step>

  <Step title="Select and Order Composers">
    All active composers are listed and pre-selected. Uncheck any you want to skip. Drag the grip handle on the left to reorder them — composers run sequentially from top to bottom.
  </Step>

  <Step title="Choose a Project (optional)">
    If your composers need a project context, pick one from the **Project** dropdown.
  </Step>

  <Step title="Start the Batch">
    Click **Start**. Each composer runs in order. The **Progress** footer at the bottom of the page expands to show live run cards for each completed step.
  </Step>
</Steps>

<Note>
  If any selected composer has configuration errors, a validation dialog appears before the batch starts, listing every issue that must be resolved.
</Note>

### Stopping a Batch

While a batch is running, the **Run** button in the header is replaced with a **Stop** button. Click **Stop** to force-stop the batch:

* The underlying batch run is cancelled outright, immediately halting everything in the batch — whether it is actively processing or parked on a Review step waiting for approval.
* The current and any queued composers are marked as cancelled.
* Still-running child runs are settled so their cards update immediately.
* Any open reviews tied to the batch are closed, so they drop out of the [Reviews tab](#reviews-tab) instead of lingering for a run that no longer exists.

Once stopping completes, the header switches back to the **Run** button so you can start a new batch.

### Composer Status in View Mode

Each row in the Automations tab shows the composer's current batch or last-run status:

| Status                 | Meaning                                                                |
| ---------------------- | ---------------------------------------------------------------------- |
| **Running**            | Currently executing in the active batch                                |
| **Queued**             | Waiting to run in the current batch                                    |
| **Done**               | Completed successfully in the current batch                            |
| **Failed**             | Encountered an error in the current batch                              |
| **Completed / Failed** | Status of the most recent previous run (shown when no batch is active) |

### Viewing Step Logs in View Mode

Expand any composer row in the Automations tab to see its execution logs. The expanded panel contains two tabs:

| Tab             | What it shows                                    |
| --------------- | ------------------------------------------------ |
| **Latest**      | Logs for the most recent completed or active run |
| **History (N)** | A list of all past runs, newest first            |

Each row in the **History** tab shows the run's status icon, how long ago it started, its duration, and a **mode** badge (e.g. Manual, Scheduled). The run tagged **Latest** is highlighted with a **Latest** badge. Click any history row to expand it and see its step-by-step logs.

An **Only errors** toggle sits next to the Latest / History tabs. Turn it on to hide successful steps and keep just the failed ones (with their parent loop iteration or paginated page as context). The setting applies to both the Latest and History tabs and resets when you collapse the composer. See [Only Errors Filter](/automations/runs#only-errors-filter) for details on how the filter behaves.

Click any step log entry to open a **step detail sheet** on the right side of the screen.

The sheet shows step-type-specific information:

| Step Type        | What the sheet shows                                            |
| ---------------- | --------------------------------------------------------------- |
| **API Request**  | HTTP method, URL, status code, response time, and response body |
| **Transformer**  | Transformation output                                           |
| **Validator**    | Pass/fail result and a list of any validation errors            |
| **Code**         | Code execution output                                           |
| **Database**     | Query and results                                               |
| **Loop**         | Per-iteration details                                           |
| **Notification** | Message content that was sent                                   |
| **Review**       | The review message and approval status                          |
| **SFTP**         | File transfer details                                           |
| **Sleep**        | Sleep duration                                                  |

Any step that encountered an error also shows the error message at the bottom of the sheet.

## Running a Single Composer

To run a single composer from the canvas, click the **Run** button in the canvas header. While running, active nodes pulse to show live execution status. Toggle the **Logs** panel (the logs icon in the header) to see step-by-step execution output inline.

When the composer reaches a **Review** step, execution pauses and the run status changes to **Awaiting Review**. A clock icon appears on the run card in the sidebar and in the Runs page. Execution resumes automatically once a reviewer approves or rejects the step (or when the configured timeout elapses).

### Running Workflows from View Mode

When the automations page is in **View Mode**, you can select one or more workflows and click **Run** to open the **Start Workflow** dialog. This dialog lets you:

* Check and drag-reorder which workflows will run.
* Review and update [Variables](/automations/variables) before execution begins. Royaltyport variables show a project picker; Custom variables show a **UI / Raw** toggle — UI mode displays each field as an individual input, Raw mode shows the full JSON editor. Each variable is collapsible so you can focus on what matters.
* Click **Run** to execute all selected workflows in order, one at a time.

## Managing Composers

### Renaming

Click on the composer name in the sidebar to edit it inline.

### Deleting

Delete a composer from the sidebar context menu. This removes the composer and all its step references.

<Warning>
  Deleting a composer is permanent. The underlying automations are not deleted, but the orchestration flow is lost.
</Warning>

## Managing Automations from the Sidebar

When a composer is expanded in the sidebar, the automations it references are listed beneath it. Hover over any automation item to reveal a three-dot menu (**⋮**) with the following actions:

* **Rename** — Edit the automation's name inline. Press **Enter** to save or **Escape** to cancel.
* **Delete** — Permanently delete the automation and all its steps, connectors, and execution logs. A confirmation dialog is shown before anything is removed.

<Note>
  The three-dot menu is only available in test mode. It is hidden when the composer is live.
</Note>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Workflow Canvas" icon="workflow" href="/automations/canvas">
    Build the automations that composers orchestrate.
  </Card>

  <Card title="Triggers" icon="play" href="/automations/triggers">
    Configure how composers are started.
  </Card>

  <Card title="Test & Deploy" icon="rocket" href="/automations/test-and-deploy">
    Test and deploy your composer workflows.
  </Card>

  <Card title="Runs & Logs" icon="list" href="/automations/runs">
    Full execution history and log details.
  </Card>
</CardGroup>
