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
171 lines
4.5 KiB
Plaintext
171 lines
4.5 KiB
Plaintext
---
|
|
title: Closed Won Automations
|
|
description: Automate post-win activities when opportunities close.
|
|
---
|
|
|
|
When a deal closes, multiple things need to happen: update company status, notify team members, create onboarding tasks. Automate all of this with a single workflow.
|
|
|
|
## The Problem
|
|
|
|
When an opportunity moves to "Closed Won":
|
|
- Company type needs to change from "Prospect" to "Customer"
|
|
- Onboarding tasks need to be created
|
|
- Customer success team needs to be notified
|
|
- Sales rep needs confirmation
|
|
|
|
Doing this manually is time-consuming and error-prone.
|
|
|
|
## The Solution
|
|
|
|
Create a workflow that handles all post-win activities automatically.
|
|
|
|
## Complete Workflow Setup
|
|
|
|
### Step 1: Create the Workflow
|
|
|
|
1. Go to **Settings → Workflows**
|
|
2. Click **+ New Workflow**
|
|
3. Name it "Deal Won - Post-Win Automation"
|
|
|
|
### Step 2: Configure the Trigger
|
|
|
|
1. Select **Record is Updated**
|
|
2. Choose **Opportunities**
|
|
3. Under "Fields to monitor", select **Stage**
|
|
|
|
### Step 3: Add Stage Filter
|
|
|
|
1. Add **Filter** action
|
|
2. Condition: `{{trigger.object.stage}}` equals "Closed Won"
|
|
|
|
### Step 4: Update Company Type
|
|
|
|
1. Add **Update Record** action
|
|
2. Configure:
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| **Object** | Companies |
|
|
| **Record** | `{{trigger.object.company.id}}` |
|
|
| **Type** | Customer |
|
|
| **First Deal Date** | `{{trigger.object.closedAt}}` |
|
|
| **Account Owner** | `{{trigger.object.owner.id}}` |
|
|
|
|
### Step 5: Create Onboarding Task
|
|
|
|
1. Add **Create Record** action
|
|
2. Configure:
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| **Object** | Tasks |
|
|
| **Title** | `Onboarding: {{trigger.object.name}}` |
|
|
| **Assignee** | Customer Success team member |
|
|
| **Due Date** | 3 days from now |
|
|
| **Priority** | High |
|
|
| **Related Company** | `{{trigger.object.company.id}}` |
|
|
| **Related Opportunity** | `{{trigger.object.id}}` |
|
|
| **Description** | `New customer onboarding for {{trigger.object.company.name}}. Deal value: {{trigger.object.amount}}` |
|
|
|
|
### Step 6: Notify Customer Success
|
|
|
|
1. Add **Send Email** action
|
|
2. Configure:
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| **To** | customer-success@yourcompany.com |
|
|
| **Subject** | `🎉 New Customer: {{trigger.object.company.name}}` |
|
|
| **Body** | See example below |
|
|
|
|
**Email body example**:
|
|
```
|
|
Hi CS Team,
|
|
|
|
We have a new customer!
|
|
|
|
Company: {{trigger.object.company.name}}
|
|
Deal: {{trigger.object.name}}
|
|
Value: {{trigger.object.amount}}
|
|
Sales Rep: {{trigger.object.owner.name}}
|
|
Close Date: {{trigger.object.closedAt}}
|
|
|
|
An onboarding task has been created automatically.
|
|
|
|
Let's give them a great start!
|
|
```
|
|
|
|
### Step 7: Confirm to Sales Rep
|
|
|
|
1. Add another **Send Email** action
|
|
2. Configure:
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| **To** | `{{trigger.object.owner.email}}` |
|
|
| **Subject** | `✅ Deal Closed: {{trigger.object.name}}` |
|
|
| **Body** | Congratulations! Your deal has been processed. The customer success team has been notified and onboarding has begun. |
|
|
|
|
### Step 8: Test and Activate
|
|
|
|
1. Test by moving a test opportunity to "Closed Won"
|
|
2. Verify:
|
|
- Company type changed to "Customer"
|
|
- Onboarding task created
|
|
- CS team received email
|
|
- Sales rep received confirmation
|
|
3. Activate when ready
|
|
|
|
## Handling Closed Lost
|
|
|
|
Create a similar workflow for lost deals:
|
|
|
|
### Trigger
|
|
- Record is Updated (Opportunities, Stage = "Closed Lost")
|
|
|
|
### Actions
|
|
1. **Create Record**: Task for "Lost Deal Analysis"
|
|
2. **Update Record**: Add lost reason to company record
|
|
3. **Send Email**: Notify manager of lost deal
|
|
|
|
## Advanced: Multi-Step Onboarding
|
|
|
|
For complex onboarding, create multiple tasks:
|
|
|
|
```javascript
|
|
export const main = async (params) => {
|
|
const tasks = [
|
|
{ title: "Welcome call", daysFromNow: 1, assignee: "CS" },
|
|
{ title: "Send onboarding materials", daysFromNow: 2, assignee: "CS" },
|
|
{ title: "Technical setup", daysFromNow: 5, assignee: "Support" },
|
|
{ title: "30-day check-in", daysFromNow: 30, assignee: "CS" }
|
|
];
|
|
|
|
return { tasks };
|
|
};
|
|
```
|
|
|
|
Use **Iterator** to create each task from the array.
|
|
|
|
## Customization Ideas
|
|
|
|
### Keep your other tools up-to-date
|
|
- Create customer in billing system with an **HTTP Request**
|
|
|
|
### Conditional actions
|
|
Use **Filter** actions to:
|
|
- Different onboarding for enterprise vs SMB
|
|
- Different assignees based on region
|
|
- Skip notifications for small deals
|
|
|
|
### Include Deal details
|
|
Use **Code** action to format:
|
|
- Deal summary documents
|
|
- Handoff notes for CS team
|
|
- Custom onboarding checklists
|
|
|
|
## Related
|
|
|
|
- [Workflow Actions](/user-guide/workflows/capabilities/workflow-actions)
|
|
- [Send Emails from Workflows](/user-guide/workflows/capabilities/send-emails-from-workflows)
|