Close Won in Salesforce when a Docusign contract is signed
When a contract is signed in Docusign, mark the Salesforce opportunity Closed Won, kick off implementation in Linear, and celebrate the win in Slack.
Build me an agent workflow that turns a signed Docusign contract into a fully closed-won handoff across Salesforce, Linear, and Slack.
Trigger: poll Docusign for envelope_status_changed events, filtered to envelopes that just transitioned to completed (signed by all parties). Ignore sent, declined, voided, and expired transitions.
When a completed envelope comes in, the agent should:
1. Pull the envelope details with Docusign Get Envelope and Get Envelope Form Data. From those, identify the customer / counterparty name, the contract value (total amount), the signed/completed date, and any opportunity reference fields the team puts on the envelope. Also capture the link/URL to the signed envelope so it can be referenced later.
2. Find the matching Salesforce opportunity using a Salesforce SOQL Query. Match on customer/account name plus expected amount and recently-open stage. If there is an opportunity ID embedded in an envelope custom field, prefer that. If no confident match is found, stop and surface a clear message instead of guessing or creating a new opportunity.
3. Update that opportunity with Salesforce Update Opportunity: set StageName to Closed Won, set Amount to the signed contract value, set CloseDate to the envelope completion date, and store the signed contract URL on the opportunity (description or a designated custom field) so anyone in Salesforce can find the executed contract. Capture the AE / Owner from the opportunity so it can be referenced downstream.
4. Open a Linear issue with Linear Create Issue in the implementation/onboarding team to kick off customer onboarding. Title it something like "Onboard <Customer> ($<Deal Size>)". Description should include: customer name, deal size / ACV, AE/owner, contract effective date, a link to the signed Docusign envelope, and a link to the Salesforce opportunity. Set sensible defaults for priority and assignee (e.g. the implementation team lead) so it lands in their queue immediately.
5. Post a celebration message to the Slack #wins channel using Slack Send a Message. Tag the AE (use their Slack handle if available; otherwise their name from Salesforce). Format it cleanly: a 🎉 headline with the customer name and deal size, a short summary of the contract terms (amount, term length if available, start date), and links to the signed contract, the Salesforce opportunity, and the Linear onboarding issue. Keep it scannable, not a wall of text.
Guardrails: this should be idempotent. If the same envelope fires twice, do not re-update Salesforce, do not open a duplicate Linear issue, and do not double-post in Slack. Store the envelope ID on the Salesforce opportunity (or use it to dedupe) and check before each side effect.
Make the Slack channel name (#wins), the Linear team/assignee, and the Salesforce custom field for storing the signed contract URL configurable at the top of the workflow so they're easy to change later.
Additional information
What does this prompt do?
- Watches Docusign and runs the moment a contract envelope is signed by every party.
- Reads the customer name, contract value, and signed date out of the envelope so nothing has to be retyped.
- Finds the matching opportunity in Salesforce and updates it to Closed Won with the signed amount and close date.
- Opens a Linear issue for the implementation team with the customer name, deal size, account executive, and a link to the signed contract.
- Posts a clean celebration message in your Slack wins channel that tags the AE and summarizes the contract terms.
What do I need to use this?
- A Docusign account with access to the envelopes you want to track.
- A Salesforce login with permission to read and update opportunities.
- A Linear workspace with a team that owns customer onboarding.
- A Slack workspace and the name of the channel where you celebrate wins.
How can I customize it?
- Change which Slack channel gets the celebration, or post in more than one place.
- Tweak the Linear team, project, labels, or default assignee that owns implementation handoff.
- Adjust the format of the Slack post, including which contract terms get summarized and who gets tagged.
- Add filters so only certain envelope templates or deal sizes flow through the workflow.
FAQs
Does this work with Salesforce Professional, Enterprise, or Unlimited?
What if the customer or opportunity name in Docusign does not exactly match Salesforce?
Can I route the implementation handoff to a different tool instead of Linear?
How fast does the celebration post after the contract is signed?
Will it run for envelopes that get declined or voided?
Related templates
New roof inspection requests from your website form land in JobNimbus within a minute, with no duplicate records and nothing retyped by your team.
Every new customer request gets a priority, triage labels, a friendly reply with the right help article, and a Slack ping only when it is truly urgent.
When a bot opens a version bump pull request, we read the real documentation for that exact version and tell you whether it is safe to merge.
The moment a deal hits Closed Won, the right contract starts in Ironclad, the link lands on the deal, and your sales channel hears who owns the next step.
When someone asks a library or framework question in your help channel, they get a straight answer with working code and a source link, right in the thread.
Every Monday, find contracts renewing or expiring in the next 90 days, post a ranked digest to Slack, and open Asana tasks for the ones that need a decision now.
Stop hand-typing closed-won updates after every signature.
Connect Docusign, Salesforce, Linear, and Slack once, and Geni handles the CRM update, the implementation handoff, and the wins channel post the moment a contract is signed.