Files
upstream-twenty/packages/twenty-docs/user-guide/views-pipelines/how-tos/show-expected-amount-in-pipeline.mdx
upstream-mirror e7da97194a
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
snapshot of https://github.com/twentyhq/twenty.git (main, 2026-09-17; blobs > 131072B omitted)
2026-09-17 23:28:13 +05:00

148 lines
4.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Show Expected Amount in Your Pipeline
description: Calculate and display weighted deal values based on stage probability.
---
The Expected Amount is a calculated value: **Amount × Probability**. This helps you forecast revenue by weighting deals based on how likely they are to close.
<Tip>
This is an example of creating [Formula Fields](/user-guide/workflows/how-tos/crm-automations/formula-fields) using workflows.
</Tip>
This guide walks you through setting up the custom fields and workflows needed to calculate and display expected amounts in your pipeline.
## Step 1: Create Custom Fields
You need two custom fields on the Opportunities object.
### Create the Probability Field
1. Go to **Settings → Data Model → Opportunities**
2. Click **+ Add Field**
3. Configure:
- **Name**: Probability
- **Type**: Number
- **Description**: Stage-based probability (0-100%)
4. Click **Save**
### Create the Expected Amount Field
1. Click **+ Add Field**
2. Configure:
- **Name**: Expected Amount
- **Type**: Currency
- **Description**: Calculated: Amount × Probability
3. Click **Save**
### Optional: Make Fields Read-Only for Users
If you don't want users manually editing these calculated fields:
1. Go to **Settings → Members → Roles**
2. Select the role to configure
3. Find the Opportunities object
4. Set **Probability** and **Expected Amount** fields to read-only
This ensures only the workflows can update these values.
## Step 2: Create Workflow #1 — Update Probability on Stage Change
This workflow automatically sets the Probability when an opportunity moves to a new stage.
### Create the Workflow
1. Go to **Workflows**
2. Click **+ New Workflow**
3. Name it "Update Probability on Stage Change"
### Configure the Trigger
1. Add a **Record Created or Updated** trigger
2. Select **Opportunities** as the object
3. Filter on: **Stage** field is updated
### Add Branches for Each Stage
Create a branch for each stage with its probability:
| Stage | Probability |
|-------|-------------|
| New | 10% |
| Qualified | 25% |
| Meeting | 40% |
| Proposal | 60% |
| Negotiation | 80% |
| Closed Won | 100% |
| Closed Lost | 0% |
<Note>
To create a new branch, right click on the workflow canvas and click **New action**. Then, link this action to the previous node by dragging the arrow from the previous node to this new action.
</Note>
For each stage:
1. Add a **Filter** node: Stage = [stage name]
2. Add an **Update Record** action:
- Record: The triggering Opportunity
- Field: Probability
- Value: [probability for that stage]
### Calculate Expected Amount
After the branches rejoin:
1. Add a **Filter** node: Amount is not empty
2. Add an **Update Record** action:
- Record: The triggering Opportunity
- Field: Expected Amount
- Value: Amount × Probability
## Step 3: Create Workflow #2 — Recalculate on Amount Change
This workflow updates the Expected Amount when the deal Amount changes.
### Create the Workflow
1. Go to **Workflows**
2. Click **+ New Workflow**
3. Name it "Recalculate Expected Amount on Amount Change"
### Configure the Trigger
1. Add a **Record Created or Updated** trigger
2. Select **Opportunities** as the object
3. Filter on: **Amount** field is updated
### Add the Logic
1. Add a **Filter** node: Amount is not empty
2. Add an **Update Record** action:
- Record: The triggering Opportunity
- Field: Expected Amount
- Value: Amount × Probability
## Step 4: Display in Your Pipeline
Now show the Expected Amount totals in your Kanban view:
1. Open your **Sales Pipeline** Kanban view
2. Click the **number** next to any Stage name at the top of a column
3. Select **Sum**
4. Choose **Expected Amount**
Each column now shows the total weighted pipeline value for that stage.
## Summary
| Component | Purpose |
|-----------|---------|
| **Probability field** | Stores the stage-based win probability |
| **Expected Amount field** | Stores Amount × Probability |
| **Workflow #1** | Updates Probability when Stage changes, then recalculates Expected Amount |
| **Workflow #2** | Recalculates Expected Amount when Amount changes |
| **Aggregation** | Displays Sum of Expected Amount per stage |
## Related
- [Formula Fields](/user-guide/workflows/how-tos/crm-automations/formula-fields) — create calculated fields using workflows
- [Kanban Views](/user-guide/views-pipelines/capabilities/kanban-views) — column aggregations
- [How to Create Custom Fields](/user-guide/data-model/how-tos/create-custom-fields) — field configuration