> For the complete documentation index, see [llms.txt](https://aican.gitbook.io/aican/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aican.gitbook.io/aican/aican-system/menu/chatbot/workflows.md).

# 工作流

## 简介

工作流用于建立聊天机器人的自动回复流程，从设置触发条件、编辑回复内容，到设置流程分流与转接规则，都可以在同一个页面中完成。

***

## 页面内容

<figure><img src="/files/XrTgBUAoqyOT2FDhEw7X" alt=""><figcaption></figcaption></figure>

整个工作流程主要分为两个区域：

* **工作流画布区域（左侧）**：用于建立与连接各个流程节点。
* **节点编辑区域（右侧）**：用于编辑节点内容与相关设置。

***

## 节点连接规则

建立工作流程时，请遵循以下规则：

* 每个工作流程都必须以触发器作为起始节点。
* 所有流程按钮都必须连接至下一节点。
* 未完成连接的按钮将无法保存工作流程。
* 建议完成设置后，使用对话测试功能确认流程是否正确。

***

## 触发入口节点（触发器）

触发器用于设置访客输入哪些内容时触发当前工作流程。

系统支持两种匹配方式：模糊匹配、精准匹配。

***

### 模糊匹配

<div align="left"><figure><img src="/files/1cJY0F2wdw0jjrDiAjCu" alt="" width="563"><figcaption></figcaption></figure></div>

系统会依据设置的关键字条件，寻找最符合条件的标准问题，并触发对应回复。

支援以下条件组合：

| 条件       | 说明          |
| -------- | ----------- |
| 或（OR）    | 输入任一关键字即可触发 |
| 且（AND）   | 必须同时符合多个条件  |
| 不包含（NOT） | 排除指定关键字     |

***

#### 设置范例

第一组关键字：

> 价格、费用、报价

＋

第二组关键字：

> 尊荣版、旗舰版

代表访客输入内容必须同时符合以下条件：

* 包含任一「价格、费用、报价」关键字。
* 包含任一「尊荣版、旗舰版」关键字。

例如：

<mark style="color:$success;">**✔**</mark> 尊荣版价格

<mark style="color:$success;">**✔**</mark> 旗舰版报价

<mark style="color:$success;">**✔**</mark> 尊荣版的费用

皆会触发工作流。

***

若设置「关键字不包含」：

> 免费

则：

<mark style="color:$success;">**✔**</mark> 尊荣版价格 → 会触发

<mark style="color:red;">**✘**</mark> 尊荣版免费价格 → 不会触发

{% hint style="warning" %}

#### 提醒

* 同一组关键字属于 OR 条件。
* 新增条件组属于 AND 条件。
* 「关键字不包含」属于 NOT 条件。
  {% endhint %}

***

### 精准匹配

<div align="left"><figure><img src="/files/MkXhkqJsdfIyzmzatfu2" alt="" width="563"><figcaption></figcaption></figure></div>

访客输入内容必须与设置内容完全一致（包含空格、标点符号及大小写），系统才会触发对应流程。

{% hint style="warning" %}

#### 提醒

同一个触发器只能选择一种匹配方式，不可同时使用模糊匹配与精准匹配。
{% endhint %}

***

## 画布操作工具

画布右侧提供下列辅助功能。

<div align="left"><figure><img src="/files/EklfQUXfFmcXhysh4cwW" alt="" width="563"><figcaption></figcaption></figure></div>

#### ① 添加步骤

点击【<img src="/files/2XKAMGSdL5dhN7x3JiVf" alt="" data-size="line">】按钮后，可新增下列节点：

* 消息节点
* 转接真人客服节点
* 导入其他问题节点

***

**导入其他问题节点**

<figure><img src="/files/j8yCKNFwwDsPzJZwuG5A" alt=""><figcaption></figcaption></figure>

此功能用于复用其他工作流中的流程内容。

点击后，可选择要导入的问题。系统仅会导入对应的流程步骤，不会导入触发器设置，可减少重复建立相同流程所需的时间，提高后续维护效率。

***

#### ② 自动布局

点击【<img src="/files/uN98iuiU2fOdhTG9qqGr" alt="" data-size="line">】自动布局后，系统会自动整理各个节点的位置，使工作流程排列更加整齐。

***

#### ③ 放大

点击【<img src="/files/gY4LoG7zq53HoBKE2bdb" alt="" data-size="line">】放大按钮，即可放大工作流画布，方便查看节点内容与连接关系。

***

#### ④ 缩小

点击【<img src="/files/V5ZjlohcB6FnpI3j11yQ" alt="" data-size="line">】缩小按钮，即可缩小工作流画布，以便浏览整体流程结构。

***

#### ⑤ 居中

点击【<img src="/files/jS1vZTboKYeToXw15sXN" alt="" data-size="line">】居中按钮后，系统会自动将画面移动至工作流中央区域，方便快速返回主要流程位置。

{% hint style="warning" %}

#### 提醒

* 「导入其他问题」仅会导入流程步骤，不会导入触发条件。
* 导入完成后，建议再次确认流程连接是否正确。
* 若流程按钮未完成连接，系统将无法保存工作流。
  {% endhint %}

***

## 小地图

<figure><img src="/files/X6FP50Y917KClM8hbcH9" alt=""><figcaption></figcaption></figure>

小地图位于画布右下角，可协助快速浏览整个工作流程，并移动至对应位置。

***

## 建议设置流程

建议依照以下顺序建立工作流：

1. 设置触发器（关键字规则）。
2. 新增发送消息节点。
3. 设置按钮及分流逻辑。
4. 视需求新增转接真人客服节点。
5. 完成所有按钮与节点连接。
6. 确认无误后点击**保存**。
7. 保存后即可使用**对话测试**验证流程。

<div align="left" data-with-frame="true"><figure><img src="/files/9RHXJtmTm52ACGaYsUcY" alt="" width="338"><figcaption></figcaption></figure></div>

***

#### 下一步

完成工作流设置后，您可以继续阅读「节点」章节，了解各个节点的设置方式。

***


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aican.gitbook.io/aican/aican-system/menu/chatbot/workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
