> For the complete documentation index, see [llms.txt](https://docs.distro.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distro.so/guides/closed-won-handoff.md).

# Closed won to customer success

When a deal closes won, assign a CSM, open a Slack channel with the deal context, and book the kickoff.

The post-sales handoff moves a closed-won deal from the rep who sold it to the customer success manager (CSM) who onboards the customer. It breaks down when nobody is assigned, the CSM hears days later, or the context stays in the rep's head. One Distro workflow picks a CSM, writes them to the CRM, opens a Slack channel, and posts the deal details.

## At a glance

1. **Salesforce object updated** fires when an Opportunity moves to `Closed Won`, and **Update Salesforce Record** marks it so later edits don't start it again.
2. **Match Salesforce Record** finds the account.
3. **Assign from Queue** picks a CSM from your customer success queue.
4. **Update Salesforce Record** writes the CSM as account owner.
5. **Create Slack Channel** and **Add Members to Slack Channel** open a private channel with the CSM.
6. **Notify in Slack** posts the deal details to that channel.
7. **Log Salesforce Task** gives the CSM a kickoff task.

## Build the workflow

{% stepper %}
{% step %}

### Trigger on Closed Won

Choose **Salesforce object updated** with `Opportunity`. Include `Name`, `StageName`, `Amount`, `NextStep`, `AccountId`, and a checkbox such as `Handoff_Started__c`. Set **Start only when** to `StageName` **Equals** `Closed Won` and `Handoff_Started__c` **Does not equal** `true`. Add a condition on `Type` to leave out renewals.
{% endstep %}

{% step %}

### Mark the handoff as started

Add **Update Salesforce Record** for the trigger's opportunity with `Handoff_Started__c` set to `true`. **Start only when** is checked after every change to the record, so without this mark, later edits to a won deal would start the handoff again and pick another CSM.
{% endstep %}

{% step %}

### Find the account and pick the CSM

Add **Match Salesforce Record** on `Account` with `Id` set to the opportunity's `AccountId`. On **Matched**, add **Assign from Queue** with `Customer Success`.
{% endstep %}

{% step %}

### Write the CSM to the account

Add **Update Salesforce Record** for the matched account with `OwnerId` set to the assignee. The queue counts the turn only when the assignee is written to the standard owner field.
{% endstep %}

{% step %}

### Open the channel

Add **Create Slack Channel** with **Channel Name** `cs-` plus the account name, and turn on **Make Channel Private?**. Add **Add Members to Slack Channel** with the created channel and the **Earlier assignee** under **Internal members**. Customer emails under **External members** get a Slack Connect invitation.
{% endstep %}

{% step %}

### Post the context and add a task

Add **Notify in Slack** to the created channel with the deal name, amount, and next step, ending with the ask: "Please send the customer your kickoff link." Add **Log Salesforce Task** owned by the assignee and linked to the account.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Slack channel names are unique. A second deal for the same account fails to create the same channel, so add the opportunity name or limit the trigger to new business.
{% endhint %}

## Book the kickoff

| Option                                                 | How                                                                                                                                                                                                       |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The CSM sends their booking link                       | From **Booking links**.                                                                                                                                                                                   |
| The rep books on the CSM's calendar from the extension | A second workflow: **Browser extension** → **Match Salesforce Record** on the account → **Show Scheduler** with **CRM record owner** (now the CSM) and the `Customer Success` queue as **Fallback host**. |
| Move an existing meeting to the CSM                    | **Hand off** the meeting from **Bookings**.                                                                                                                                                               |

## HubSpot differences

Trigger on a Deal with **Hubspot record updated** and **Only when selected properties change**: `dealstage`. Find the company with **Match HubSpot Record** and **Match by association** from the deal, write `Company owner`, and add the task with **Create HubSpot Engagement**.

## Troubleshoot

| What you see                                   | What to check                                                                                   |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Never starts                                   | The stage value matches exactly, and `StageName` and the checkbox are in **Fields to include**. |
| The handoff runs again on a later edit         | The opportunity isn't marked before the rest of the workflow.                                   |
| The same CSM gets every account                | The CSM isn't written to `OwnerId`, so the queue never counts the turn.                         |
| **Add Members to Slack Channel** skips someone | Map the member's Slack user under **Connected identities**.                                     |


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.distro.so/guides/closed-won-handoff.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 `build a script that syncs our docs to a CMS` 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.
