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

# Analyze Customer Sentiment

> Detect customer emotions in ticket communications to prioritize unhappy customers

The Analyze Customer Sentiment action uses AI to assess the emotional tone in customer communications, helping you quickly identify frustrated customers who need immediate attention and track overall satisfaction trends.

<Tip>
  By understanding customer sentiment, you can improve response times for critical issues, enhance customer relationships, and gain valuable insights into your service delivery quality.
</Tip>

## Quick start

<Steps>
  <Step title="Add to your workflow">
    Add the action to workflows that process tickets with customer communications.
  </Step>

  <Step title="Configure basic settings">
    The action works with default settings, but you can add custom instructions for your specific business context.
  </Step>

  <Step title="Set up custom fields (optional)">
    Create "Customer Sentiment" and "Sentiment Analysis Details" fields in your PSA to save results.
  </Step>

  <Step title="Add follow-up actions">
    Use "Update Ticket Fields" to save sentiment data and "Notify Internal Team" to alert staff about negative sentiment tickets.
  </Step>
</Steps>

## How it works

This action analyzes the conversation history within tickets, focusing on customer messages to determine if the overall sentiment is:

1. **Positive** - Appreciation, satisfaction, or optimism
2. **Negative** - Frustration, urgency, dissatisfaction, or complaints
3. **Neutral** - Factual, routine, or emotionally neutral communication

The AI provides detailed reasoning for its classification and can optionally save both the sentiment and reasoning to custom fields in your PSA.

## Setup

**Tickets to analyze**: Works with any tickets from your workflow - typically all tickets from a specific search or filter.

**Custom instructions (optional)**: Want to customize how sentiment is detected? Add specific guidance like:

* "Consider urgency keywords like 'ASAP' or 'critical' as negative sentiment"
* "Treat thank you messages as positive, even if brief"

**Save to PSA (optional)**: You can save sentiment results and reasoning directly to custom fields in your PSA system for tracking and reporting.

## What you get

After analysis, you'll have detailed sentiment reports for each ticket, including the reasoning behind each classification. If enabled, the sentiment and reasoning are automatically saved to your PSA custom fields.

## Common use cases

<AccordionGroup>
  <Accordion title="Prioritize unhappy customers">
    Automatically escalate tickets with negative sentiment by notifying team leads, increasing ticket priority, adding to "Needs Attention" queues, or assigning to senior technicians.
  </Accordion>

  <Accordion title="Track satisfaction trends">
    Run sentiment analysis on recently closed tickets to measure customer satisfaction over time and identify service improvement opportunities.
  </Accordion>

  <Accordion title="Proactive outreach">
    Monitor neutral sentiment on long-running tickets as opportunities for proactive customer check-ins to ensure satisfaction.
  </Accordion>

  <Accordion title="Service quality monitoring">
    Analyze sentiment patterns across different service types, technicians, or time periods to identify areas for improvement.
  </Accordion>
</AccordionGroup>

## Best practices

<AccordionGroup>
  <Accordion title="Set up custom fields first">
    If you plan to save sentiment data, create custom fields in your PSA before configuring this action. Add a text-based field like "Customer Sentiment" and optionally "Sentiment Analysis Details" for detailed reasoning.
  </Accordion>

  <Accordion title="Store both sentiment and reasoning">
    Enable saving both the classification and the AI's detailed reasoning to provide valuable context for understanding why a particular sentiment was assigned.
  </Accordion>

  <Accordion title="Combine with other actions">
    Maximize value by chaining with "Update Ticket Fields" to save sentiment data, "Notify Internal Team" to alert staff about negative sentiment, and "Add Ticket Note" to document findings.
  </Accordion>

  <Accordion title="Fine-tune with custom instructions">
    Customize for your business context. Consider additional negative indicators like competitor mentions or "multiple attempts". Treat thank you messages and resolution confirmations as positive.
  </Accordion>

  <Accordion title="Start simple, then expand">
    Begin by analyzing sentiment and adding internal notes. Once confident with results, enable saving to custom fields and triggering further automations.
  </Accordion>

  <Accordion title="Monitor and refine regularly">
    Regularly review your Event History to understand the AI's reasoning for sentiment classifications. This helps you refine custom instructions if needed.
  </Accordion>
</AccordionGroup>

## Example workflows

<AccordionGroup>
  <Accordion title="Negative Sentiment Escalation">
    1. **Trigger:** Customer reply to ticket
    2. **Analyze Customer Sentiment** - Detect emotional tone in customer messages
    3. **Update Ticket Fields** - Save sentiment to custom field
    4. **Notify Internal Team** - Alert managers about negative sentiment tickets
    5. **Result:** Unhappy customers get immediate management attention
  </Accordion>

  <Accordion title="Satisfaction Trend Tracking">
    1. **Trigger:** Ticket closed
    2. **Analyze Customer Sentiment** - Review final customer communications
    3. **Update Ticket Fields** - Save sentiment data for reporting
    4. **Result:** Track customer satisfaction trends over time
  </Accordion>

  <Accordion title="Proactive Customer Outreach">
    1. **Trigger:** Scheduled workflow (weekly)
    2. **Find Entities** - Get long-running tickets with neutral sentiment
    3. **Analyze Customer Sentiment** - Re-check current sentiment
    4. **Build Message** - Create proactive check-in message
    5. **Notify Ticket's Contact** - Reach out to ensure satisfaction
    6. **Result:** Prevent neutral customers from becoming unhappy
  </Accordion>
</AccordionGroup>
