---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/ai-classify.md
cuppy_section: docs
cuppy_doc: SV79-2M2K
cuppy_doc_uuid: 3d87e9e1-077d-4b23-a2e8-789da07256d5
cuppy_permalink: https://cuppy.io/salesforce/d/SV79-2M2K
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-classify
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 6b4a739d554bc20684a48d2f525482f98a4bbbc3fd616097a1dace94d3219584
# 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-classify.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_CLASSIFY`

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

Analyzes text and classifies it into the best matching category from a list of categories you define. This function uses the classification model to categorize support cases, customer inquiries, product feedback, 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 classify.
*   `<input_categories>`: A text [array](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array.html) of categories with at least one unique value. An empty category list results in the `Input categories cannot be empty` validation error message.

After analyzing the `input_text`, returns the category with the highest confidence score from the `input_categories`.

*   **Input text length**: The function supports input text up to 512 tokens (approximately 400-500 words). For longer text such as full emails or lengthy documents, split the content into shorter passages before classifying.
*   **Best for short text**: This function works best on short, intent-rich text such as support case descriptions, product inquiries, and customer feedback.
*   **Category consistency**: The `input_categories` parameter must be constant across all rows in the query.
*   **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.

Classify issues in an automobile repair center based on the type of issue.

Returns:

| issuesIdentified__c | category |
| --- | --- |
| Electrical system failure causing intermittent starting and dashboard warnings | Electrical |
| Shock absorber replacement due to oil leakage and poor ride quality | Chassis |
| Engine overheating issue traced to failed radiator and thermostat replacement | Engine |
| Exhaust system repair and catalytic converter replacement | Engine |
| Steering system malfunction requiring tie rod and power steering pump replacement | Chassis |

Returns only the rows matching the defined classification.

Returns all reported vehicle issues related to the engine.

*   [Topic Classification](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_predictive_model_classify.htm&type=5): Learn about topic classification 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 -->
