> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/workflow.md).

# Workflow

DocBits Workflow Engine

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e72607efa766ce261106f8b5ee9115e2dbc1dbd1%2FBildschirmfoto%202024-03-12%20um%2019.42.57.png?alt=media" alt="Empty workflow builder with a Workflow name field, Add Card slots under When, And and Then, and a Save button"><figcaption></figcaption></figure>

## DocBits Workflow Engine: Simplifying Process Automation

### Understand and prepare workflows <a href="#workflow-orientation" id="workflow-orientation"></a>

Follow the real DocBits test account: eight workflow executions in the dashboard, two saved workflows with execution order 100/200, and three passing test scenarios. The tutorial also explains Standard and Advanced Workflows, licenses, templates and the Card SDK.

{% embed url="<https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4>" %}

[Watch with subtitles](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.html) · [Open video](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4) · [Subtitles (WebVTT)](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.vtt) · [Transcript](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.txt) · 3:35

<details>

<summary>Chapters and transcript</summary>

| Chapter                 | Start                                                                                                                            |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Meet the administrator  | [0:00](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=0.000)   |
| Organization and access | [0:02](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=2.292)   |
| Dashboard and filters   | [0:16](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=16.708)  |
| Workflow List           | [0:56](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=56.875)  |
| Execution order         | [1:14](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=74.083)  |
| Standard Workflow       | [1:34](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=94.458)  |
| Advanced Workflow       | [1:49](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=109.792) |
| Licenses                | [2:08](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=128.875) |
| Templates               | [2:30](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=150.667) |
| Test Manager            | [2:45](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=165.542) |
| Card SDK                | [3:02](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=182.875) |
| Preparation checklist   | [3:18](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-orientation-admin/v1/en.mp4#t=198.583) |

**Meet the administrator**

I look after DocBits here.

**Organization and access**

All right, I start by checking the organization at the top. These workflow settings belong to the selected organization. For this lesson I use our documentation test account.

**Dashboard and filters**

Workflow Dashboard gives me the overview. For this overview, I manually ran two training workflows eight times against a sample invoice. Here I see eight total runs and six successful runs. In two runs, the amount condition was not met. The success rate also counts these correctly completed checks. I filter by workflow name and check the date range. The counters and chart update for that selection. On the right, I switch between saved workflows and test scenarios. Test Manager runs are counted separately.

**Workflow List**

In Workflow List I manage individual workflows. I check the name, Standard or Advanced type, execution order, trigger and available actions. Search helps me find an existing workflow before creating another.

**Execution order**

Execution order matters when several workflows affect the same document. I check which workflow should run first and what data the next one needs. Here the invoice review has an order of one hundred and the next check has two hundred. Lower values run first.

**Standard Workflow**

For a linear rule I choose Standard Workflow. When defines the trigger, And adds conditions, and Then performs the actions. The card library provides the available building blocks.

**Advanced Workflow**

For alternative routes I use Advanced Workflow. This designer preview shows Start and explicit connections. Success, a false condition and an error can follow different routes. Card position alone does not define execution order.

**Licenses**

Under License I check the basic Workflow module and Advanced Workflow separately. Both are inactive here. The plan dialog shows available subscriptions. I close this inspection without changing the subscription. A designer preview is not an active workflow engine.

**Templates**

Templates help me reuse a starting point. I inspect the template library and its default-template option. I still check every field, recipient and action before using a template for my own process.

**Test Manager**

Test Manager holds saved test scenarios for Standard and Advanced workflows. After configuring a workflow, I add representative inputs and expected results. Run All Tests helps me check changes against those scenarios.

**Card SDK**

Card SDK is for custom extensions. Here developers can use a template, upload a package or import from GitHub. Ordinary workflow administration starts with the existing card library.

**Preparation checklist**

Before building, I confirm the organization, access, required license, document fields and intended result. I decide whether a linear rule is enough. The next lesson builds a Standard Workflow step by step.

</details>

### Introduction

{% embed url="<https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4>" %}

**Video:** Workflow terms: what is what · 1:34 · [Captions (WebVTT)](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.vtt)

<details>

<summary>Transcript</summary>

**The words in the videos** · [0:00](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=0.25)

The videos use a few words again and again. Here is what each one means.

**Standard and Advanced** · [0:06](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=6.05)

A Workflow is a set of rules for documents. There are two kinds.

**Standard: a fixed list** · [0:12](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=12.083)

A Standard workflow is a fixed list: When, And and Then cards, top to bottom.

**Advanced: a canvas** · [0:20](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=20.05)

An Advanced workflow is a canvas, where you place cards freely and connect them.

**When, And, Then** · [0:28](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=28.716)

Cards do the work. A When card decides which documents the workflow is for. And cards check conditions. Then cards act, for example assign or export.

**Every card is a node - not every node a card** · [0:42](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=42.05)

Everything on the canvas is a node. Every card is a node, but not every node is a card: OR, Wait ANY and Wait ALL join paths, and notes only hold text.

**One input, three exits** · [0:54](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=54.183)

A card has one input and up to three exits: success, failed condition in orange, and error in red.

**Connections make the path** · [1:03](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=63.683)

A connection leads from an exit to the input of the next node. The connections a document follows are its path.

**Variables** · [1:12](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=72.683)

Variables are the values in a card's fields. Workflow variables hold values that later cards can read.

**Run and test** · [1:21](https://docbits-videos.fra1.cdn.digitaloceanspaces.com/settings-assistant/workflow-terms/v1/en.mp4#t=81.283)

A run is the workflow working on a real document; its log shows the path. A test runs the canvas on a document you choose, and actions are only simulated.

</details>

In the realm of process automation, the DocBits Workflow Engine stands out for its straightforward and intuitive approach. This engine streamlines the creation and management of workflows through a clear and simple rule-based structure. The core principle behind its design is the "Easy When-And-Then" rule, which breaks down the automation process into three fundamental components: Trigger, Condition, and Action. This guide explains how each component functions within the system and how they work together to facilitate seamless automation.

### The "Easy When-And-Then" Rule Explained

The DocBits Workflow Engine operates on a basic yet powerful principle that makes workflow automation accessible to users of all skill levels. This principle is encapsulated in the "Easy When-And-Then" rule, which can be broken down as follows:

#### [When](#when-trigger) (Trigger)

* **Definition**: The "When" component represents the *Trigger* of the workflow. This is the event or condition that initiates the execution of the workflow. Triggers can be a variety of occurrences such as the arrival of a new email, a specific date and time, or the creation of a new document.
* **Example**: "When a new customer form is submitted..."

#### [And](#and-condition) (Condition)

* **Definition**: The "And" component introduces the *Condition* that must be met for the action to proceed. Conditions serve as filters or criteria that refine the trigger, ensuring that the workflow is executed only under certain circumstances.
* **Example**: "...and the customer is from the 'Enterprise' segment..."

#### [Then](#then-action) (Action)

* **Definition**: Finally, the "Then" part specifies the *Action* to be taken once the trigger occurs and the condition is satisfied. Actions are the tasks or operations executed by the workflow, such as sending an email, updating a database, or creating a task in a project management tool.
* **Example**: "...then assign the lead to the enterprise sales team and send a welcome email."

### Combining Components for Powerful Automations

By assembling these three components—Trigger, Condition, and Action—the DocBits Workflow Engine allows users to create highly customized and efficient workflows. This modular approach not only simplifies the process of setting up automations but also offers the flexibility to create complex workflows capable of handling a wide range of tasks and processes.

## Learning path from beginner to expert

[Learning path from beginner to expert](https://docs.docbits.com/administration-and-setup/workflow/workflow-learning-path.md). Work through the levels in order. Reading alone is insufficient: finish each level with your own configuration, a checkable expectation and evidence. P0 prevents basic execution mistakes; P1 develops data handling, business decisions and integrations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/workflow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
