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

# NSSentiment

## Constructors

### NSSentiment()

```crmscript theme={null}
NSSentiment
```

Initializes a new instance of the NSSentiment class.

## Methods

## GetConfidence()

```crmscript theme={null}
Integer GetConfidence()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Sentiment analysis confidence, where available. 0 = no idea, 100 = perfectly confident, -1 = no confidence score available.

**Example:**

```crmscript theme={null}
NSSentiment thing;
Integer confidence = thing.GetConfidence();
```

## GetScore()

```crmscript theme={null}
Integer GetScore()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Sentiment score, -100 = very unhappy, 100 = very happy, 0 = no idea (not recognized).

**Example:**

```crmscript theme={null}
NSSentiment thing;
Integer score = thing.GetScore();
```

## SetConfidence(Integer)

```crmscript theme={null}
Void SetConfidence(Integer confidence)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSSentiment thing;
Integer confidence;
thing.SetConfidence(confidence);
```

## SetScore(Integer)

```crmscript theme={null}
Void SetScore(Integer score)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSSentiment thing;
Integer score;
thing.SetScore(score);
```


## Related topics

- [NSAIAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSAIAgent.md)
- [sentiment](/en/api/mdo-providers/reference/sentiment.md)
- [Detect Sentiment](/en/api/reference/restful/agent/ai_agent/detect-sentiment.md)
- [SuperOffice.WebApi.Data.Sentiment](/en/api/reference/webapi/SuperOffice.WebApi.Data.Sentiment.md)
- [SuperOffice.WebApi.Data.AI DetectSentimentRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.AI_DetectSentimentRequest.md)
- [SuperOffice.WebApi.Agents.AIAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AIAgent.md)
