Not every opportunity update should trigger an alert—only closed-won deals. Add a filter to control this.
Click the + icon below your trigger
Search for Router and select it
In the configuration panel:
Condition: Set up the following logic:
Field: Stage (from the Salesforce trigger data)
Operator: equals
Value: Closed Won
Click Test to verify the condition evaluates correctly
The router creates two branches: one for when the condition is true (Closed Won) and one for when it’s false. You’ll only add steps to the “true” branch.
This is where the magic happens. Use Ask Attention to analyze the conversation and extract what made the deal successful.
Click + to add another step
Search for Ask Attention and select it
In the configuration panel:
Conversation: Use the Data Selector to insert the conversation ID from the previous step
Prompt: Enter a prompt like:
Analyze this sales conversation and provide:1. The key factors that helped close this deal2. Any objections the prospect raised and how they were handled3. A memorable quote from the call that captures the winKeep the response concise (under 150 words).
Click Test to see the AI-generated insights
Be specific in your prompts. The more focused your request, the more useful the output.
Your workflow is now live. Every time an opportunity is marked Closed Won in Salesforce, your team will receive a Slack notification with AI-powered insights.
Now that you’ve built your first workflow, try these variations:
Add a second channel: Use another Slack step to notify the account executive directly via DM
Update the CRM: Add a Salesforce step to log the AI insights back to the Opportunity record
Weekly digest: Create a scheduled workflow that summarizes all closed deals from the past week
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Attention Docs","colors":{"primary":"#4D32D3","light":"#6C58D1","dark":"#4D32D3"},"logo":{"light":"https://mintcdn.com/attentiontech/OKslMpjkB8v2VL99/logo/lightdupe.svg?fit=max\u0026auto=format\u0026n=OKslMpjkB8v2VL99\u0026q=85\u0026s=dd02d2ebdcb53fdfbddf19abdb741c14","dark":"https://mintcdn.com/attentiontech/OKslMpjkB8v2VL99/logo/darkdupe.svg?fit=max\u0026auto=format\u0026n=OKslMpjkB8v2VL99\u0026q=85\u0026s=5a6bfc6d8ef6b88aef97d56387f33d8e"},"favicon":"https://mintcdn.com/attentiontech/OKslMpjkB8v2VL99/logo/LogoIcon.svg?fit=max\u0026auto=format\u0026n=OKslMpjkB8v2VL99\u0026q=85\u0026s=9b760f3662cf396de0154754d7dce2ed","navbar":{"links":[{"href":"mailto:support@attention.com","label":"Support"}],"primary":{"type":"button","label":"Log In","href":"https://app.attention.tech"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/attentiontech"}},"seo":{"indexing":"navigable"},"integrations":{"posthog":{"apiKey":"phc_XuvFsZ0Dw9Q2BHKsX8j1pcGrEmmoSo9c0kaHsYuOVvq"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"attentiontech","hasAudioNarration":false,"actualSubdomain":"attentiontech","customDomains":["docs.attention.com"],"gitSource":{"type":"github","owner":"attentiontech","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af1d37dd7645d341e6eaf26","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"API Reference","count":99},{"language":"default","tag":"Documentation","count":76},{"language":"default","tag":"Model Context Protocol (MCP)","count":21},{"language":"default","tag":"Core Features","count":20},{"language":"default","tag":"Workspace Setup","count":20},{"language":"default","tag":"Tools Reference","count":18},{"language":"default","tag":"Conversation","count":17},{"language":"default","tag":"Super Agent","count":12},{"language":"default","tag":"Scim","count":11},{"language":"default","tag":"Scorecard","count":11}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@attention.tech"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"builder-101/tutorial-deal-alert","slug":"/builder-101/tutorial-deal-alert","pageMetadata":{"title":"Tutorial: Build a deal close alert","description":"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.","sidebarTitle":"Tutorial: Deal alert","availability":["enterprise","agent-builder"],"href":"/builder-101/tutorial-deal-alert"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This tutorial walks you through building a complete workflow from scratch. By the end, you’ll have a working automation that:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Triggers when a Salesforce opportunity closes`}),`\n`,_jsx(_components.li,{children:`Uses Ask Attention to extract winning insights from the final sales call`}),`\n`,_jsx(_components.li,{children:`Sends a celebratory Slack message to your team channel`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Time to complete:`}),` 15–20 minutes`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Prerequisites:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Admin or Builder access in Attention`}),`\n`,_jsx(_components.li,{children:`Salesforce integration connected`}),`\n`,_jsx(_components.li,{children:`Slack integration connected`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-create-a-new-workflow`,children:`Step 1: Create a new workflow`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Click your name in the top left corner of Attention`}),`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`Settings`}),` > `,_jsx(_components.strong,{children:`Builder`})]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`+ Create workflow`}),` in the top right`]}),`\n`,_jsx(_components.li,{children:`Name your workflow “Deal Close Alert”`}),`\n`]}),`\n`,_jsx(_components.p,{children:`You’ll see an empty canvas with a placeholder for your trigger.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-add-the-salesforce-trigger`,children:`Step 2: Add the Salesforce trigger`}),`\n`,_jsx(_components.p,{children:`The trigger determines when your workflow runs. For this workflow, we want it to fire whenever an opportunity is marked as Closed Won.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`+`}),` icon on the canvas to add a trigger`]}),`\n`,_jsxs(_components.li,{children:[`Search for `,_jsx(_components.strong,{children:`Salesforce`}),` and select `,_jsx(_components.strong,{children:`Record Updated`})]}),`\n`,_jsxs(_components.li,{children:[`In the configuration panel:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connection`}),`: Select your Salesforce connection (or create one if needed)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Object`}),`: Select `,_jsx(_components.strong,{children:`Opportunity`})]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Test`}),` to pull in sample data from a recent opportunity update`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Testing the trigger populates the Data Selector with real field values you can reference in later steps.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-add-a-filter-for-closed-won-deals`,children:`Step 3: Add a filter for Closed Won deals`}),`\n`,_jsx(_components.p,{children:`Not every opportunity update should trigger an alert—only closed-won deals. Add a filter to control this.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`+`}),` icon below your trigger`]}),`\n`,_jsxs(_components.li,{children:[`Search for `,_jsx(_components.strong,{children:`Router`}),` and select it`]}),`\n`,_jsxs(_components.li,{children:[`In the configuration panel:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Condition`}),`: Set up the following logic:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Field: `,_jsx(_components.code,{children:`Stage`}),` (from the Salesforce trigger data)`]}),`\n`,_jsxs(_components.li,{children:[`Operator: `,_jsx(_components.code,{children:`equals`})]}),`\n`,_jsxs(_components.li,{children:[`Value: `,_jsx(_components.code,{children:`Closed Won`})]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Test`}),` to verify the condition evaluates correctly`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The router creates two branches: one for when the condition is true (Closed Won) and one for when it’s false. You’ll only add steps to the “true” branch.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-4-fetch-the-related-conversation`,children:`Step 4: Fetch the related conversation`}),`\n`,_jsx(_components.p,{children:`Now we need to find the Attention conversation associated with this deal. This lets us extract insights from the winning sales call.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`On the `,_jsx(_components.strong,{children:`true`}),` branch, click `,_jsx(_components.strong,{children:`+`}),` to add a step`]}),`\n`,_jsxs(_components.li,{children:[`Search for `,_jsx(_components.strong,{children:`Attention`}),` and select `,_jsx(_components.strong,{children:`List Conversations`})]}),`\n`,_jsxs(_components.li,{children:[`In the configuration panel:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Filter by`}),`: CRM Record ID`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Value`}),`: Click into the field, open the `,_jsx(_components.strong,{children:`Data Selector`}),`, and insert the Opportunity ID from your Salesforce trigger`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Test`}),` to retrieve matching conversations`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This step returns all conversations linked to the opportunity. In most cases, you’ll want the most recent one.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-5-generate-insights-with-ask-attention`,children:`Step 5: Generate insights with Ask Attention`}),`\n`,_jsx(_components.p,{children:`This is where the magic happens. Use Ask Attention to analyze the conversation and extract what made the deal successful.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`+`}),` to add another step`]}),`\n`,_jsxs(_components.li,{children:[`Search for `,_jsx(_components.strong,{children:`Ask Attention`}),` and select it`]}),`\n`,_jsxs(_components.li,{children:[`In the configuration panel:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Conversation`}),`: Use the Data Selector to insert the conversation ID from the previous step`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Prompt`}),`: Enter a prompt like:`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Analyze this sales conversation and provide:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. The key factors that helped close this deal`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Any objections the prospect raised and how they were handled`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. A memorable quote from the call that captures the win`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Keep the response concise (under 150 words).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Test`}),` to see the AI-generated insights`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Be specific in your prompts. The more focused your request, the more useful the output.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-6-send-a-slack-notification`,children:`Step 6: Send a Slack notification`}),`\n`,_jsx(_components.p,{children:`Finally, share the win with your team by sending a Slack message.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`+`}),` to add the final step`]}),`\n`,_jsxs(_components.li,{children:[`Search for `,_jsx(_components.strong,{children:`Slack`}),` and select `,_jsx(_components.strong,{children:`Send Message`})]}),`\n`,_jsxs(_components.li,{children:[`In the configuration panel:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connection`}),`: Select your Slack connection`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Channel`}),`: Choose your team’s sales channel (e.g., `,_jsx(_components.code,{children:`#sales-wins`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Message`}),`: Compose your message using the Data Selector to pull in dynamic values:`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`🎉 *Deal Closed!*`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`*Account:* {{Salesforce trigger → Account Name}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`*Amount:* {{Salesforce trigger → Amount}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`*Owner:* {{Salesforce trigger → Owner Name}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`*Winning Insights:*`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{{Ask Attention → Output}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Test`}),` to send a test message to the channel`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-7-activate-your-workflow`,children:`Step 7: Activate your workflow`}),`\n`,_jsx(_components.p,{children:`Once all steps are configured and tested:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Review the complete workflow on the canvas`}),`\n`,_jsxs(_components.li,{children:[`Toggle the workflow to `,_jsx(_components.strong,{children:`Active`}),` in the top right`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Your workflow is now live. Every time an opportunity is marked Closed Won in Salesforce, your team will receive a Slack notification with AI-powered insights.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Issue`}),_jsx(_components.th,{children:`Solution`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Trigger not firing`}),_jsx(_components.td,{children:`Verify your Salesforce connection is active and has the correct permissions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No conversations found`}),_jsx(_components.td,{children:`Ensure conversations are linked to the Opportunity in Attention via CRM sync`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Slack message not sending`}),_jsx(_components.td,{children:`Check that the Slack connection has permission to post to the selected channel`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Empty AI insights`}),_jsx(_components.td,{children:`Confirm the conversation has been fully analyzed before the workflow runs`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsx(_components.p,{children:`Now that you’ve built your first workflow, try these variations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add a second channel`}),`: Use another Slack step to notify the account executive directly via DM`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Update the CRM`}),`: Add a Salesforce step to log the AI insights back to the Opportunity record`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Weekly digest`}),`: Create a scheduled workflow that summarizes all closed deals from the past week`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Tutorial: Build a deal close alert","description":"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.","sidebarTitle":"Tutorial: Deal alert","availability":["enterprise","agent-builder"],"href":"/builder-101/tutorial-deal-alert"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Step 1: Create a new workflow","slug":"step-1-create-a-new-workflow","depth":2,"children":[]},{"title":"Step 2: Add the Salesforce trigger","slug":"step-2-add-the-salesforce-trigger","depth":2,"children":[]},{"title":"Step 3: Add a filter for Closed Won deals","slug":"step-3-add-a-filter-for-closed-won-deals","depth":2,"children":[]},{"title":"Step 4: Fetch the related conversation","slug":"step-4-fetch-the-related-conversation","depth":2,"children":[]},{"title":"Step 5: Generate insights with Ask Attention","slug":"step-5-generate-insights-with-ask-attention","depth":2,"children":[]},{"title":"Step 6: Send a Slack notification","slug":"step-6-send-a-slack-notification","depth":2,"children":[]},{"title":"Step 7: Activate your workflow","slug":"step-7-activate-your-workflow","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"attentiontech","siteName":"Attention Docs","title":"Tutorial: Build a deal close alert - Attention Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-19T14:32:02.469Z","originalFileLocation":"builder-101/tutorial-deal-alert.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Attention Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tutorial: Build a deal close alert - Attention Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Attention Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.attention.com/builder-101/tutorial-deal-alert\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://attentiontech.mintlify.site/_mintlify/api/og/v2?division=Attention+Builder\u0026amp;title=Tutorial%3A+Build+a+deal+close+alert\u0026amp;description=Step-by-step+guide+to+building+a+workflow+that+notifies+your+team+when+a+deal+closes+and+shares+AI-generated+insights+from+the+winning+conversation.\u0026amp;theme=e5c1403fad24dfff759580f7\u0026amp;signature=76e0fc76bc751df25a92397fa3fbd18df358d95399543f5d27bf4912e576d710\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Tutorial: Build a deal close alert - Attention Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://attentiontech.mintlify.site/_mintlify/api/og/v2?division=Attention+Builder\u0026amp;title=Tutorial%3A+Build+a+deal+close+alert\u0026amp;description=Step-by-step+guide+to+building+a+workflow+that+notifies+your+team+when+a+deal+closes+and+shares+AI-generated+insights+from+the+winning+conversation.\u0026amp;theme=e5c1403fad24dfff759580f7\u0026amp;signature=76e0fc76bc751df25a92397fa3fbd18df358d95399543f5d27bf4912e576d710\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/attentiontech/FuboMWNs14Hlwhoo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Attention Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4D32D3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.attention.com/builder-101/tutorial-deal-alert\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/builder-101/tutorial-deal-alert.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.attention.com/#organization\",\"name\":\"Attention Docs\",\"url\":\"https://docs.attention.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/attentiontech/OKslMpjkB8v2VL99/logo/lightdupe.svg?fit=max\u0026auto=format\u0026n=OKslMpjkB8v2VL99\u0026q=85\u0026s=dd02d2ebdcb53fdfbddf19abdb741c14\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.attention.com#website\",\"name\":\"Attention Docs\",\"url\":\"https://docs.attention.com\",\"publisher\":{\"@id\":\"https://docs.attention.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.attention.com/builder-101/tutorial-deal-alert#webpage\",\"url\":\"https://docs.attention.com/builder-101/tutorial-deal-alert\",\"name\":\"Tutorial: Build a deal close alert\",\"description\":\"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\",\"dateModified\":\"2026-10-19T14:32:02.469Z\",\"isPartOf\":{\"@id\":\"https://docs.attention.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.attention.com/builder-101/tutorial-deal-alert#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.attention.com/builder-101/tutorial-deal-alert#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Attention Builder\",\"item\":\"https://docs.attention.com/builder-101/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Build a deal close alert\",\"item\":\"https://docs.attention.com/builder-101/tutorial-deal-alert\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.attention.com/builder-101/tutorial-deal-alert#article\",\"headline\":\"Tutorial: Build a deal close alert\",\"name\":\"Tutorial: Build a deal close alert\",\"description\":\"Step-by-step guide to building a workflow that notifies your team when a deal closes and shares AI-generated insights from the winning conversation.\",\"url\":\"https://docs.attention.com/builder-101/tutorial-deal-alert\",\"mainEntityOfPage\":{\"@id\":\"https://docs.attention.com/builder-101/tutorial-deal-alert#webpage\"},\"dateModified\":\"2026-10-19T14:32:02.469Z\",\"publisher\":{\"@id\":\"https://docs.attention.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.attention.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Attention Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Attention Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Welcome to Attention ⚡️","href":"/welcome"}]},{"group":"Your Account","pages":[{"title":"Find Your Way Around Home","sidebarTitle":"Home","icon":"house","href":"/core-features/home"},{"title":"Manage Your Personal Settings","sidebarTitle":"Personal Settings","icon":"gear","href":"/core-features/personal-settings"},{"title":"Choose Which Emails Attention Sends You","sidebarTitle":"Email Notifications","icon":"envelope","href":"/core-features/email-notifications"}]},{"group":"Recording","pages":[{"title":"Get Attention into Your Calls","sidebarTitle":"Get Attention into Calls","icon":"video","href":"/core-features/get-attention-into-calls"},{"title":"Set When Attention Joins Your Meetings","sidebarTitle":"Auto-Join Rules","icon":"calendar-check","href":"/core-features/auto-join-rules"},{"title":"Attention Desktop App","icon":"desktop","href":"/core-features/desktop-app"},{"title":"Attention Mobile App","sidebarTitle":"Mobile App","icon":"mobile-screen-button","href":"/core-features/mobile-app"}]},{"group":"Calls","pages":[{"title":"Find and Review Your Calls","sidebarTitle":"All Calls","icon":"list","href":"/core-features/all-calls"},{"title":"Navigate a Call Page","sidebarTitle":"Call Page","icon":"phone","href":"/core-features/call-page"},{"title":"Generate Call Insights","icon":"bolt-lightning","href":"/core-features/call-insights"},{"title":"Share a Call","icon":"share-nodes","href":"/core-features/share-a-call"},{"title":"Leave and Manage Comments","icon":"comment-dots","href":"/core-features/comments"},{"title":"Share Snippets from a Call","icon":"megaphone","href":"/core-features/snippets"},{"title":"Organize Snippets in the Library","sidebarTitle":"Snippet Library","icon":"folder-open","href":"/core-features/snippet-library"},{"title":"Send Follow‑Up Emails with Templates","sidebarTitle":"Email Templates","icon":"envelope-open-text","href":"/core-features/email-templates"}]},{"group":"Scorecards \u0026 Coaching","pages":[{"title":"Build a Scorecard Template","icon":"chart-user","href":"/workspace-setup/create-scorecards"},{"title":"Review Scorecards on a Call","sidebarTitle":"Scorecards on a Call","icon":"clipboard-check","href":"/core-features/scorecards-on-a-call"},{"title":"Track Scorecard Results Over Time","sidebarTitle":"Scoring Analytics","icon":"chart-line","href":"/core-features/scoring-analytics"},{"title":"Track Team Activity in Manager Analytics","sidebarTitle":"Manager Analytics","icon":"chart-simple","href":"/core-features/manager-analytics"}]},{"group":"CRM","pages":[{"title":"Integrate Attention with Salesforce","sidebarTitle":"Salesforce Integration","icon":"cloud","href":"/workspace-setup/salesforce-integration"},{"title":"Integrate Attention with HubSpot","sidebarTitle":"HubSpot Integration","icon":"hubspot","href":"/workspace-setup/hubspot-integration"},{"title":"Integrate Attention with Attio","sidebarTitle":"Attio Integration","icon":"database","href":"/workspace-setup/attio-integration"},{"title":"Configure CRM Settings","sidebarTitle":"CRM Settings","icon":"sliders","href":"/workspace-setup/crm-settings"},{"group":"Field Configurations","pages":[{"title":"Set Up CRM Field Configurations (V2)","sidebarTitle":"CRM Field Configurations V2","icon":"upload","href":"/workspace-setup/crm-field-configurations-push-to-crm"},{"title":"Set Up CRM Field Configurations (V1)","sidebarTitle":"CRM Field Configurations V1","icon":"map","href":"/workspace-setup/crm-config"}]},{"title":"Update Your CRM from a Call","sidebarTitle":"CRM Updates","icon":"rotate","href":"/core-features/crm-sync"},{"title":"Troubleshoot CRM Sync","sidebarTitle":"Troubleshoot CRM Sync","icon":"screwdriver-wrench","href":"/core-features/troubleshoot-crm-sync"}]},{"group":"Super Agent","pages":[{"title":"Super Agent","sidebarTitle":"Overview","icon":"sparkles","href":"/super-agent/guide"},{"group":"Channels","pages":[{"title":"Use Super Agent in the Web App","sidebarTitle":"Web app","icon":"browser","href":"/super-agent/web-app"},{"title":"Use Super Agent in Slack","sidebarTitle":"Slack","icon":"slack","href":"/super-agent/slack"},{"title":"Use Super Agent in Microsoft Teams","sidebarTitle":"Microsoft Teams","icon":"microsoft","href":"/super-agent/microsoft-teams"},{"title":"Use Super Agent Through the API","sidebarTitle":"API","icon":"code","href":"/super-agent/api"},{"title":"Use Super Agent Through MCP","sidebarTitle":"MCP","icon":"plug","href":"/super-agent/mcp"}]},{"title":"Manage Super Agent Access and Permissions","sidebarTitle":"Access and Permissions","icon":"user-shield","href":"/super-agent/access-and-permissions"},{"title":"Give Super Agent Your Company Knowledge","sidebarTitle":"Knowledge Base","icon":"book-open","href":"/super-agent/knowledge-base"}]},{"group":"Attention Builder","pages":[{"title":"Workflow Builder Overview","description":"Learn what workflows are, how they are structured, and how to configure steps in the builder.","sidebarTitle":"Overview","href":"/builder-101/getting-started"},{"title":"Tutorial: Build a deal close alert","sidebarTitle":"Tutorial: Deal alert","href":"/builder-101/tutorial-deal-alert"},{"title":"Build an Agent with Agent Builder","description":"Create an agent, describe what it should do in the build chat, and accept the changes it plans.","sidebarTitle":"Agent Builder","icon":"robot","href":"/builder-101/agent-builder"},{"group":"Triggers","pages":[{"title":"Triggers","href":"/builder-101/triggers"},{"title":"Attention Triggers","sidebarTitle":"Attention Triggers","href":"/builder-101/triggers/attention-triggers"}]},{"title":"Action Steps","href":"/builder-101/action-steps"},{"title":"Workflow Runs","href":"/builder-101/workflow-runs"}]},{"group":"Administration","pages":[{"title":"Invite and Manage Members","sidebarTitle":"Members","icon":"user-plus","href":"/workspace-setup/inviting-users"},{"title":"Set Up Teams, Roles \u0026 Seats","sidebarTitle":"Teams, Roles \u0026 Seats","icon":"user-group","href":"/workspace-setup/teams-roles-seats"},{"title":"Configure Your Organization Settings","sidebarTitle":"Organization Settings","icon":"sliders","href":"/workspace-setup/organization-settings"},{"title":"Create Call Labels","icon":"note-sticky","href":"/workspace-setup/call-labels"},{"group":"Security","pages":[{"title":"Single Sign-On (SSO)","icon":"key","href":"/workspace-setup/single-sign-on"},{"title":"SCIM Provisioning (Okta)","icon":"arrows-rotate","href":"/workspace-setup/scim-provisioning"}]}]},{"group":"Integrations","pages":[{"group":"Calendar \u0026 Messaging","pages":[{"title":"Google Integration","sidebarTitle":"Google Integration","icon":"google","href":"/workspace-setup/google-integration"},{"title":"Add Attention to your Slack Workspace","sidebarTitle":"Slack Integration","icon":"message-code","href":"/workspace-setup/slack-setup"},{"title":"Add Attention to Microsoft Teams","sidebarTitle":"Microsoft Teams Integration","icon":"microsoft","href":"/workspace-setup/microsoft-teams-integration"}]},{"group":"Phone","pages":[{"title":"Zoom Phone integration","sidebarTitle":"Zoom Phone","icon":"phone","href":"/workspace-setup/zoom-phone-integration"},{"title":"Import Calls from Aircall","sidebarTitle":"Aircall","icon":"phone","href":"/integrations/aircall-integration"}]},{"group":"Import Calls","pages":[{"title":"Import Calls from Gong","sidebarTitle":"Gong","icon":"file-import","href":"/integrations/gong-integration"},{"title":"Import Meetings from Granola","sidebarTitle":"Granola","icon":"file-import","href":"/integrations/granola-integration"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-authentication"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/change-log"}]}]},"basePath":"","title":"Tutorial: Build a deal close alert - Attention Docs","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}