---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/ai-sentiment.md
cuppy_section: docs
cuppy_doc: B1CN-T7DY
cuppy_doc_uuid: 9d456c01-50a4-4626-9010-a4a15eeabca0
cuppy_permalink: https://cuppy.io/salesforce/d/B1CN-T7DY
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/ai-sentiment
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 95deb820ad7738107ebb8b893b085f39e9c4d8b0f629ea4b3544306a521b5ee1
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/ai-sentiment.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## `AI_SENTIMENT`

**Applies to:** ✅ Data 360 SQL ❌ Tableau Hyper API

Performs sentiment analysis on text input and returns a sentiment label. This function uses a multilingual sentiment model to analyze customer feedback, support tickets, survey responses, and other unstructured text.

*   `input_text`: The [text](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.html) to analyze for sentiment. The function processes empty input values normally. The text must be a non-NULL value.

Returns a [text](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.html) sentiment label. Sentiment labels are:

*   `Positive`: Text expressing positive sentiment
*   `Negative`: Text expressing negative sentiment
*   `Neutral`: Text expressing neutral sentiment
*   `Mixed`: Text containing conflicting positive and negative signals
*   `Unknown`: Text with unclear or indeterminate sentiment

*   **Input text length**: The function supports input text up to 512 tokens (approximately 400-500 words). For longer text such as full call transcripts or lengthy emails, split the content into shorter passages before analyzing.
*   **Best for short text**: This function works best on short, intent-rich text such as support tickets, CRM notes, social media posts, and chat messages.
*   **Performance**: Requests to the function time out after 30 seconds.
*   **First execution**: When executing this function on a large number of rows for the first time, you can encounter timeout or capacity errors. Start with smaller row counts and gradually increase volume to avoid these issues.
*   **Non-NULL values**: `input_text` must be a non-NULL value. Add `IS NOT NULL` to the `WHERE` clause in your SQL statement to avoid `NULL` value errors.
*   **Multilingual support**: The underlying model supports multiple languages.

Analyzes sentiment for multiple rows from a table.

Returns the sentiment of the feedback for each row in the `AutomobileServiceFeedback__dll`.

Show only positive feedback in a table.

Returns all positive feedback.

*   [Sentiment Analysis](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_predictive_model_sentiment.htm&type=5): Learn about sentiment analysis models, use cases, and integration options.
*   [AI Models in Data Cloud](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_create_connect_activate_models.htm&type=5): Read an overview of AI model capabilities.


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
