---
schema_version: "1"
id: 279296885ad457b2066c2e31578914217403a10b75f3165dff9e0bd74c88755e
title: Perform Survey Sentiment Analysis
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-feedback-management-dev-guide/guides/api-action/objects/actions-obj-survey-sentiment-analysis.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/actions-obj-survey-sentiment-analysis.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d9a94b4bfbf6b128d001d91be84b2212a4aacc8e56bd340f80e27d9defb1da61
products:
  - Salesforce Feedback Management Developer Guide
  - Service Cloud Developer Content
---

# Perform Survey Sentiment Analysis

Create or update the AI Sentiment Result records. You can get insights into the sentiments underlying survey responses and save the sentiment analysis in the SentimentAnalysisResult object.

This action is available in API version 55.0 and later.

## Special Access Rules

To access the Perform Survey Sentiment Analysis action, you must have the Feedback Management - Starter and Feedback Management - Growth licenses.

## Supported REST HTTP Methods

**URI:** `/services/data/vXX.X/actions/standard/performSurveySentimentAnalysis`

Where `XX.X` is the latest API version.

**Formats:** JSON

**HTTP Methods:** POST

**Authentication:** `Authorization: Bearer TOKEN`

Where `TOKEN` is a variable.

## Inputs

|Input|Type|Description|
|-----|----|-----------|
|`surveyId`|ID|Required. The ID of the survey containing the questions for whose responses you want to get sentiment insights.|
|`surveyQuestionIds`|ID|Required. The IDs of the questions for whose responses you want to get sentiment insights.|
|`startDate`|Datetime|Required. The date from when participant responses are processed to get sentiment insights.|
|`endDate`|Datetime|Required. The date until when participant responses are processed to get sentiment insights.|
|`typeOfOperation`|String|Required. The type of operation to be performed on the survey responses. Use `create` to bulk process survey responses and create AI Sentiment Result records with Submitted status. Use `update` to bulk process survey responses that have associated AI Sentiment Result records in Draft status and update them to Submitted status. You can only update a sentiment analysis result record with the Draft status.|

## Outputs

None.

## Example

**Sample Request**

Here's an example POST request to create or update the AI Sentiment Result records:

```nolang
{
   "inputs":[{
      "surveyId":"0Kdx00000000GYeCAM",
      "surveyQuestionIds":["0Kux00000000xDgCAI","0Kux00000000xDiCAI"],
      "startDate":"1-07-2022",
      "endDate":"12-07-2022",
      "typeOfOperation":"create"
   }]
}
```

