# Workflows

> A workflow guides people step by step through a process such as a customer intake or a case review. It has its own menu entry, every piece of work is a run with a status, and AI steps suggest what you then check and confirm. This page shows how to start and continue runs, who sees what and how a workflow is built.

Some work runs the same way every time: collect the facts, gather the documents, have them checked, record the result. A workflow turns that into a guided process. It shows the steps in order, says what is still missing in each one and lets the AI do the groundwork where it can help. What finally gets created or changed in nexxus is your decision, made with one click.

Every workflow gets its own entry in the menu, named after what it handles, for example "Customer intakes". Each individual piece of work is a **run**. A run remembers which step it is at, whose turn it is and what has happened so far. You can save it, continue later and share it with colleagues.

<Flow
  steps={[
    { icon: 'clipboard-list', title: 'Collect', text: 'Forms, picking records, uploading files.' },
    { icon: 'sparkles', title: 'AI does the groundwork', text: 'With your rights and read-only: fills in fields and assesses.', tone: 'lavender' },
    { icon: 'list-checks', title: 'Check', text: 'You confirm or change every suggestion.', tone: 'cyan' },
    { icon: 'check-check', title: 'Complete', text: 'An action creates or changes records, only after your click.' },
  ]}
  caption="A typical run. Which steps a workflow has is up to the person who builds it."
/>

## Before you start

- You need the permission <Ui>AI workflows</Ui> › <Ui>Use</Ui> (`aiWorkflow.use`). Roles that may use the AI Assistant received it when workflows arrived. Without it, the <Ui>Workflows</Ui> area is missing from the rail.
- A workflow shows up for you once it is published and you belong to its audience.
- AI steps need an AI model that is set up, just like the AI Assistant.

## Where to find workflows

The <Ui>Workflows</Ui> area in the rail has three kinds of entries:

| Entry | Address | What it shows |
|---|---|---|
| <Ui>Overview</Ui> | `/workflows` | <Ui>Waiting for you</Ui>: the runs where it is your turn. Below it, <Ui>Start</Ui> with every workflow you may use. |
| One entry per workflow | `/workflows/w/<key>` | The runs of that workflow with a search, <Ui>Mine</Ui> or <Ui>All visible</Ui> and a status filter |
| <Ui>Manage</Ui> | `/workflows/verwalten` | Create and edit workflows. Only with the permission `aiWorkflow.manage`. |

<Screenshot src={shot_overview} url="/workflows" alt="The workflows overview with six open runs and the workflow Kundenaufnahme to start" caption="Workflows › Overview. The workflow in this picture was written in German: names, steps and fields appear exactly as the person who built the workflow wrote them. The app does not translate them." />

A run has one of these statuses: <Ui>In progress</Ui>, <Ui>Waiting</Ui>, <Ui>Completed</Ui>, <Ui>Cancelled</Ui> or <Ui>Failed</Ui>.

## Start and continue a run

<Steps>

1. In the <Ui>Overview</Ui>, click the start button of the workflow you want. Its label is set by the workflow, for example "New customer intake". The run begins at the first step.

2. At the top you see all steps. A tick means done, the ring marks the current step. Clicking a step that is done reopens it (<Ui>Reopen this step</Ui>), for example to correct an entry.

3. Fill in the step. <Ui>Save for now</Ui> keeps what you entered without moving on. <Ui>Next</Ui> checks your input and goes to the next step. If something is missing, the message appears at the field, for example <Ui>Please fill in.</Ui>

4. In the last step the button reads <Ui>Complete</Ui>. The run then shows a summary and, under <Ui>Created and changed</Ui>, the records it created or changed.

</Steps>

<Screenshot src={shot_run} url="/workflows/w/kurzpruefung/14" alt="A run at the first of four steps, a form with two fields and the button Fill in with AI" caption="A run. The steps at the top, Chat about this run and Details at the top right, Back, Save for now and Next at the bottom." />

In the header of a run you find:

- <Ui>Chat about this run</Ui> opens the AI Assistant with this run. It sees what has been entered and can fill in form steps for you. Ask it, for example, <Ui>What is missing?</Ui>
- <Ui>Share</Ui>, if you started the run or manage the workflow (see below).
- <Ui>Details</Ui> shows the <Ui>Facts</Ui> of the run and its <Ui>History</Ui> on the right: who completed, shared or reopened which step and when.
- <Ui>More actions</Ui> (⋯) holds <Ui>Cancel run</Ui>. A cancelled run cannot be continued. What it has already created stays.

## The steps

| Step | What you do |
|---|---|
| <Ui>Information</Ui> | Read. The text explains what this is about or what comes next. |
| <Ui>Form</Ui> | Fill in fields, including lists with several entries (<Ui>Duplicate</Ui>, <Ui>Remove</Ui>) |
| <Ui>Pick records</Ui> | Choose one or more records from nexxus, for example a partner |
| <Ui>Upload files</Ui> | Upload documents. The step shows the list <Ui>Expected documents</Ui> and matches files by their name. |
| <Ui>AI</Ui> | The AI evaluates what the earlier steps collected and fills the fields of its output |
| <Ui>Work through a list</Ui> | Decide item by item, starting from the AI's suggestion |
| <Ui>Action</Ui> | Create or change records, after a check |

A step marked <Ui>optional</Ui> may stay empty.

## Where the AI helps

**Fill in with AI.** In form steps the AI suggests values for empty fields, based on what the earlier steps collected. Under <Ui>What should the AI pay attention to?</Ui> you can give it a hint, for example "use the figures from the offer of 12 November". Every suggestion is marked as an <Ui>AI suggestion</Ui> and names its source. <Ui>Discard</Ui> or <Ui>Discard all</Ui> takes suggestions back. The AI does not overwrite fields you have already filled in.

**AI steps.** Depending on the workflow, an AI step starts by itself as soon as it is reached, or with <Ui>Run AI</Ui>. The result carries a confidence (<Ui>High confidence</Ui>, <Ui>Medium confidence</Ui>, <Ui>Low confidence</Ui>) and the number of sources. <Ui>Run again</Ui> lets the AI work once more, <Ui>Fill in yourself</Ui> replaces its result with yours. If you later change a step before it, the step bar marks the AI step as <Ui>outdated, run again?</Ui>

**Work through a list.** Here the AI suggests a decision for every item. You accept it with <Ui>Use</Ui> or choose yourself and, if needed, add a <Ui>Reason</Ui>. The <Ui>Summary</Ui> tab shows how the decisions are distributed, the areas under <Ui>By area</Ui> and the <Ui>AI summary</Ui>. Until an item is confirmed, the AI's suggestion counts, which is why the result reads <Ui>Preliminary result</Ui> until then.

:::note[The AI never writes on its own]
The AI works with your rights and may at most read. It fills in fields, assesses and suggests. Only an <Ui>Action</Ui> step can create or change records: it checks with <Ui>Check</Ui> whether everything fits and runs only with <Ui>Execute</Ui>, with the rights of the person who clicks.
:::

## Who sees which runs

How far a run is visible is set by the workflow under <Ui>Who sees the runs</Ui>:

| Setting | Who sees the runs |
|---|---|
| <Ui>Own only</Ui> (default) | Everyone sees their own runs and those shared with them. |
| <Ui>Own unit</Ui> | Also the runs of one's own organisational unit |
| <Ui>Everyone in the audience</Ui> | Everyone who may use the workflow sees all of its runs. |

Anyone with the permission <Ui>AI workflows</Ui> › <Ui>Read all</Ui> (`aiWorkflow.runs.all`) reads every run of every workflow, for example a team lead or an auditor. No role gets this permission by itself.

## Share runs

<Steps>

1. Open the run and click <Ui>Share</Ui>.

2. Under <Ui>Share with</Ui>, choose a <Ui>Person</Ui>, a <Ui>Business unit</Ui> or <Ui>Everyone in the company</Ui>.

3. Choose the <Ui>Role</Ui>: <Ui>Read</Ui> shows the run, <Ui>Edit</Ui> also allows filling in and submitting steps. Click <Ui>Share</Ui>.

</Steps>

A person you share with gets a notification with a link to the run. Sharing and <Ui>Remove share</Ui> appear in the history. Test runs cannot be shared.

Shared runs show inputs and AI results. Linked records and files, however, each person sees only with their own rights. Without access, the place shows <Ui>No access to this record</Ui> or <Ui>No access to the source file</Ui> and next to it <Ui>Request access</Ui>. The request goes to the person who started the run, at most once a day per record.

## Build a workflow

Workflows are built by people with the permission <Ui>AI workflows</Ui> › <Ui>Manage</Ui> (`aiWorkflow.manage`). Administrators have it.

<Steps>

1. Open <MenuPath to="Workflows > Manage" /> and click <Ui>New workflow</Ui>. Enter a <Ui>Name</Ui> and a <Ui>Key</Ui>. The key is part of the address and is fixed after the first publication.

2. The draft starts with an info step. Under <Ui>Steps</Ui> you add more with <Ui>Add step</Ui>, order them with <Ui>Move up</Ui> and <Ui>Move down</Ui> and see in the <Ui>Preview</Ui> how the step looks in a run.

3. Under <Ui>General</Ui> you set what a run is called: <Ui>Word for one run</Ui>, the <Ui>Plural (menu entry)</Ui> and the <Ui>Start button</Ui>, for example "New case review". Under <Ui>Access</Ui> you set whether <Ui>All employees may use the workflow</Ui> applies, and <Ui>Who sees the runs</Ui>.

4. <Ui>Check</Ui> shows what is still missing. <Ui>Test run</Ui> starts a run on the draft, only for you. You delete a test run afterwards with <Ui>Delete test run</Ui>.

5. <Ui>Publish</Ui> turns the draft into the next version, for example <Ui>Published as version 1.</Ui> From then on the workflow is in the menu.

</Steps>

A published version never changes. If you keep editing the workflow, a new draft is created (<Ui>Draft changed</Ui>), and only the next publication turns it into the new version. Every run stays on the version it was started with. <Ui>Archive</Ui> takes the workflow out of the menu. New runs can no longer be started, runs in progress stay.

:::tip[Build it with the AI Assistant]
You can also build a workflow in conversation. Tell the AI Assistant what the workflow is for, or click <Ui>Edit with AI</Ui> in the editor. The assistant suggests steps, fields and texts. It shows you every change to the workflow as an action, and the change only runs once you confirm. The editor then reloads the draft.
:::

## When something goes wrong

| Message | What it means |
|---|---|
| <Ui>You can read this run but not continue it.</Ui> | The run was shared with you for reading, or you see it through the workflow's visibility. Continuing it needs the role <Ui>Edit</Ui>. |
| <Ui>Someone changed the run in the meantime. It has been reloaded.</Ui> | Two people worked at the same time. Check the new state and save again. |
| <Ui>The AI did not get through.</Ui> | The AI step failed, for example because no model is set up. Try <Ui>Run again</Ui>, or fill it in by hand with <Ui>Fill in yourself</Ui>. |
| <Ui>At least one check did not pass. Change the values or the steps before.</Ui> | The action would fail with these values. Correct them and click <Ui>Check again</Ui>. |
| <Ui>The draft still has errors; the messages are above.</Ui> | When publishing. The messages above the editor name the step and the field. |

## Next steps

<CardGrid>
  <LinkCard title="Working with the AI Assistant" href="/use/assistant/" description="How the assistant suggests actions and what you see before you confirm." />
  <LinkCard title="How automations work" href="/automations/overview/" description="For if-then rules that run without a click. Workflows are for processes a person leads." />
</CardGrid>