Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 3s
150 lines
4.7 KiB
Plaintext
150 lines
4.7 KiB
Plaintext
---
|
||
title: 在您的销售管道中显示预期金额
|
||
description: 根据阶段概率计算并显示加权交易金额。
|
||
---
|
||
|
||
预期金额是一个计算值:**Amount × Probability**。 这有助于根据成交可能性为交易加权,从而预测收入。
|
||
|
||
<Tip>
|
||
这是使用工作流创建[公式字段](/l/zh/user-guide/workflows/how-tos/crm-automations/formula-fields)的示例。
|
||
</Tip>
|
||
|
||
本指南将引导您设置在管道中计算并显示预期金额所需的自定义字段和工作流。
|
||
|
||
## 步骤 1:创建自定义字段
|
||
|
||
您需要在商机对象上创建两个自定义字段。
|
||
|
||
### 创建 Probability 字段
|
||
|
||
1. 前往 **设置 → 数据模型 → 商机**
|
||
2. 点击 **+ 添加字段**
|
||
3. 配置:
|
||
* **名称**:Probability
|
||
* **类型**:数字
|
||
* **描述**:基于阶段的概率(0–100%)
|
||
4. 单击 **保存**
|
||
|
||
### 创建 Expected Amount 字段
|
||
|
||
1. 点击 **+ 添加字段**
|
||
2. 配置:
|
||
* **名称**:Expected Amount
|
||
* **类型**:货币
|
||
* **描述**:计算值:Amount × Probability
|
||
3. 单击 **保存**
|
||
|
||
### 可选:将字段设置为对用户只读
|
||
|
||
如果您不希望用户手动编辑这些计算字段:
|
||
|
||
1. 转到 **设置 → 成员 → 角色**
|
||
2. 选择要配置的角色
|
||
3. 找到商机对象
|
||
4. 将 **Probability** 和 **Expected Amount** 字段设为只读
|
||
|
||
这可确保只有工作流可以更新这些值。
|
||
|
||
## 步骤 2:创建工作流 #1 — 阶段变更时更新 Probability
|
||
|
||
当商机进入新阶段时,此工作流会自动设置 Probability。
|
||
|
||
### 创建工作流
|
||
|
||
1. 前往 **工作流**
|
||
2. 点击 **+ 新建工作流**
|
||
3. 将其命名为 "Update Probability on Stage Change"
|
||
|
||
### 配置触发器
|
||
|
||
1. 添加一个 **Record Created or Updated** 触发器
|
||
2. 选择 **Opportunities** 作为对象
|
||
3. 筛选条件:**Stage** 字段已更新
|
||
|
||
### 为每个阶段添加分支
|
||
|
||
为每个阶段创建一个分支,并设置相应的概率:
|
||
|
||
| 阶段 | 概率 |
|
||
| ------- | ---- |
|
||
| 新 | 10% |
|
||
| 合格 | 25% |
|
||
| 会议 | 40% |
|
||
| 提案 | 60% |
|
||
| 谈判 | 80% |
|
||
| 已成交(赢单) | 100% |
|
||
| 已关闭(丢单) | 0% |
|
||
|
||
<Note>
|
||
要创建新分支,在工作流画布上单击右键,然后点击 **新建操作**。 然后,从上一个节点拖动箭头到此新操作,将其与前一个节点连接。
|
||
</Note>
|
||
|
||
对于每个阶段:
|
||
|
||
1. 添加一个 **筛选** 节点:Stage = [阶段名称]
|
||
2. 添加一个 **更新记录** 操作:
|
||
* 记录:触发的商机
|
||
* 字段:Probability
|
||
* 值:[该阶段的概率]
|
||
|
||
### 计算 Expected Amount
|
||
|
||
在分支汇合之后:
|
||
|
||
1. 添加一个 **筛选** 节点:Amount 不为空
|
||
2. 添加一个 **更新记录** 操作:
|
||
* 记录:触发的商机
|
||
* 字段:Expected Amount
|
||
* 值:Amount × Probability
|
||
|
||
## 步骤 3:创建工作流 #2 — 当 Amount 发生变化时重新计算
|
||
|
||
当交易的 Amount 更改时,此工作流会更新 Expected Amount。
|
||
|
||
### 创建工作流
|
||
|
||
1. 前往 **工作流**
|
||
2. 点击 **+ 新建工作流**
|
||
3. 将其命名为 "Recalculate Expected Amount on Amount Change"
|
||
|
||
### 配置触发器
|
||
|
||
1. 添加一个 **Record Created or Updated** 触发器
|
||
2. 选择 **Opportunities** 作为对象
|
||
3. 筛选条件:**Amount** 字段已更新
|
||
|
||
### 添加逻辑
|
||
|
||
1. 添加一个 **筛选** 节点:Amount 不为空
|
||
2. 添加一个 **更新记录** 操作:
|
||
* 记录:触发的商机
|
||
* 字段:Expected Amount
|
||
* 值:Amount × Probability
|
||
|
||
## 步骤 4:在您的管道中显示
|
||
|
||
现在在看板视图中显示 Expected Amount 的总计:
|
||
|
||
1. 打开您的 **销售管道** 看板视图
|
||
2. 点击列顶部任一阶段名称旁的**数字**
|
||
3. 选择 **求和**
|
||
4. 选择 **Expected Amount**
|
||
|
||
现在,每列都会显示该阶段的加权管道总值。
|
||
|
||
## 摘要
|
||
|
||
| 组件 | 用途 |
|
||
| ---------------------- | ------------------------------------------------ |
|
||
| **Probability 字段** | 存储基于阶段的赢单概率 |
|
||
| **Expected Amount 字段** | 存储 Amount × Probability |
|
||
| **工作流 #1** | 当 Stage 变化时更新 Probability,然后重新计算 Expected Amount |
|
||
| **工作流 #2** | 当 Amount 变化时重新计算 Expected Amount |
|
||
| **聚合** | 按阶段显示 Expected Amount 的求和 |
|
||
|
||
## 相关内容
|
||
|
||
* [公式字段](/l/zh/user-guide/workflows/how-tos/crm-automations/formula-fields) — 使用工作流创建计算字段
|
||
* [看板视图](/l/zh/user-guide/views-pipelines/capabilities/kanban-views) — 列聚合
|
||
* [如何创建自定义字段](/l/zh/user-guide/data-model/how-tos/create-custom-fields) — 字段配置
|