> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Riepiloghi sullo stato di salute dei clienti in Slack

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="Riepiloghi sullo stato dei clienti in Slack" description="Usa Dana e un playbook per recuperare le metriche degli account cliente dal tuo database e mostrarle in Slack su richiesta." prompt="@Devin !dana !customer-health Dammi un riepilogo dell'account di Acme Corp" category="Dati e analisi" features="Integrations, Playbooks, MCP" agent="dana" />

<div className="uc-detail-wrapper">
  <Tip>Non vuoi configurarlo manualmente? Incolla un collegamento a questa pagina in una sessione di Devin e chiedi a lui di impostare tutto per te.</Tip>

  <Steps>
    <Step title="Collega il database dei clienti tramite MCP">
      Dana ha bisogno di accedere al database in cui sono archiviati i dati dei tuoi clienti. Vai su **Settings > Connections > server MCP**, trova il tuo provider di database e fai clic su **Enable**.

      Configurazioni comuni per le metriche sui clienti:

      * **PostgreSQL** per i dati applicativi (utenti, account, feature flag)
      * **Redshift** o **BigQuery** per i dati del data warehouse di analytics (eventi di utilizzo, ricavi)
      * **Snowflake** per dati operativi e di analytics combinati

      Se il tuo provider non è nell'elenco, fai clic su **Add Your Own** e fornisci una stringa di connessione. Per i database di produzione, usa sempre una stringa di connessione **read-only** o un utente del database con permessi limitati.

      Una volta connesso, verifica che funzioni avviando rapidamente una [Dana session](/it/work-with-devin/data-analyst) dalla web app di Devin:

      <PromptBlock agent="dana">
        ```txt Verify database connection theme={null}
        !dana List all tables in the analytics schema that contain the word "user" or "account"
        ```
      </PromptBlock>

      Se Dana restituisce i nomi delle tue tabelle, il tuo MCP funziona correttamente. In caso contrario, ricontrolla le credenziali in **Settings > Connections > server MCP** e assicurati che il tuo database consenta connessioni dagli intervalli di indirizzi IP di Devin.
    </Step>

    <Step title="Crea un playbook per la salute dei clienti">
      Vai su [**Settings > Playbooks > Create playbook**](https://app.devin.ai/settings/playbooks/create?utm_source=docs\&utm_medium=use-case-gallery) e chiamalo `!customer-health` — il prefisso `!` lo trasforma in una [macro](/it/product-guides/using-playbooks) che puoi richiamare da Slack.

      Definisci le metriche che Dana deve estrarre per ogni account. Mantieni il playbook generico — Dana individuerà le tabelle e le query corrette a partire dal tuo schema:

      <PromptBlock type="playbook">
        ```txt Customer Account Health Summary theme={null}
        When given a customer name, find and report:

        1. **Monthly active users** — 6-month trend with month-over-month change
        2. **Feature adoption** — which features the account used in the past 30 days and how many distinct users per feature
        3. **Support tickets** — open vs resolved in the past 30 days, average resolution time
        4. **Revenue** — current MRR and 6-month trend

        Format the output as:
        - A summary line with health verdict (Healthy / At Risk / Needs Attention)
        - A table with MAU trend, feature adoption count, open tickets, and current MRR
        - A short list of risk factors or positive signals based on the data
        ```
      </PromptBlock>

      Puoi anche chiedere a Devin di generare un playbook di customer health personalizzato in base al tuo schema e alle tue metriche specifiche.
    </Step>

    <Step title="Eseguilo direttamente da Slack">
      Assicurati di aver collegato l'[integrazione Slack](/it/integrations/slack) in **Settings > Connections** e che Devin sia stato aggiunto al canale in cui il tuo team discute degli account dei clienti.

      Attiva il playbook usando la parola chiave `!dana` e il nome della tua macro:

      <PromptBlock agent="dana">
        ```txt Pull customer health summary theme={null}
        @Devin !dana !customer-health Give me an account summary for Acme Corp
        ```
      </PromptBlock>

      Dana interroga i database collegati, esegue le query SQL dal tuo playbook e risponde nel thread con un riepilogo formattato:

      > **Acme Corp — A rischio**
      >
      > | Metrica              | Valore                   | Andamento                  |
      > | -------------------- | ------------------------ | -------------------------- |
      > | Monthly Active Users | 342                      | -8% mese su mese (MoM)     |
      > | Features Used (30d)  | 6 of 10                  | Stabile                    |
      > | Open Support Tickets | 12 (avg 8.2h resolution) | +3 rispetto al mese scorso |
      > | MRR                  | \$4,850                  | Stabile da 3 mesi          |
      >
      > **Fattori di rischio:** MAU in calo, nessuna espansione negli ultimi 3 mesi, 3 ticket recenti relativi a errori di accesso.

      Puoi proseguire nella stessa conversazione per approfondire:

      <PromptBlock agent="dana">
        ```txt Drill into user activity theme={null}
        @Devin !dana For Acme Corp, show me the daily active users for the past
        30 days. Flag any days where DAU dropped below 50% of the 30-day average.
        ```
      </PromptBlock>

      <PromptBlock agent="dana">
        ```txt Compare to plan average theme={null}
        @Devin !dana Compare Acme Corp's feature adoption and MAU to the median
        for all Enterprise-plan accounts. Where are they lagging?
        ```
      </PromptBlock>
    </Step>

    <Step title="Trasformalo in una routine">
      Una volta che il playbook funziona bene per le consultazioni ad hoc, valuta di automatizzarlo:

      * **Sessioni pianificate**: Usa le [sessioni Devin pianificate](/it/product-guides/scheduled-sessions) per fare in modo che Dana pubblichi ogni lunedì mattina un riepilogo dello stato di salute dei tuoi 10 account principali nel canale `#customer-health`.
      * **Preparazione alla riunione**: Prima di una business review trimestrale, chiedi a Dana di recuperare i riepiloghi per tutti gli account in un determinato livello di piano — `@Devin !dana !customer-health Run this for all accounts where plan = 'Enterprise'`.
    </Step>
  </Steps>
</div>
