`AI_SENTIMENT`
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ❌ Tableau Hyper API
markdownreferencev1B1CN-T7DYguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`AI_SENTIMENT`Data 360Data CloudData 360 Query Guide
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 to analyze for sentiment. The function processes empty input values normally. The text must be a non-NULL value.
Returns a text sentiment label. Sentiment labels are:
Positive: Text expressing positive sentimentNegative: Text expressing negative sentimentNeutral: Text expressing neutral sentimentMixed: Text containing conflicting positive and negative signalsUnknown: 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_textmust be a non-NULL value. AddIS NOT NULLto theWHEREclause in your SQL statement to avoidNULLvalue 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: Learn about sentiment analysis models, use cases, and integration options.
- AI Models in Data Cloud: Read an overview of AI model capabilities.