> ## 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.

# NSChatSummaryItem

> Chat session summary: id, title, created date. Carrier object for ChatSummaryItem.

Chat session summary: id, title, created date. Carrier object for ChatSummaryItem.

## Constructors

### NSChatSummaryItem()

```crmscript theme={null}
NSChatSummaryItem
```

Initializes a new instance of the NSChatSummaryItem class.

## Methods

## GetChatSessionId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The primary key (auto-incremented).

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
Integer chatSessionId = thing.GetChatSessionId();
```

## GetCompanyName()

```crmscript theme={null}
String GetCompanyName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the customers company, if provided.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String companyName = thing.GetCompanyName();
```

## GetFirstMessage()

```crmscript theme={null}
String GetFirstMessage()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - A copy of the first message in the chat session.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String firstMessage = thing.GetFirstMessage();
```

## GetLastMessage()

```crmscript theme={null}
String GetLastMessage()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - A copy of the last message in the chat session.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String lastMessage = thing.GetLastMessage();
```

## GetName()

```crmscript theme={null}
String GetName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of customer, if provided.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String name = thing.GetName();
```

## GetWhenEnded()

```crmscript theme={null}
DateTime GetWhenEnded()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - When the session was ended.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
DateTime whenEnded = thing.GetWhenEnded();
```

## GetWhenRequested()

```crmscript theme={null}
DateTime GetWhenRequested()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - When the session was requested by the customer.

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
DateTime whenRequested = thing.GetWhenRequested();
```

## SetChatSessionId(Integer)

```crmscript theme={null}
Void SetChatSessionId(Integer chatSessionId)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
Integer chatSessionId;
thing.SetChatSessionId(chatSessionId);
```

## SetCompanyName(String)

```crmscript theme={null}
Void SetCompanyName(String companyName)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String companyName;
thing.SetCompanyName(companyName);
```

## SetFirstMessage(String)

```crmscript theme={null}
Void SetFirstMessage(String firstMessage)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String firstMessage;
thing.SetFirstMessage(firstMessage);
```

## SetLastMessage(String)

```crmscript theme={null}
Void SetLastMessage(String lastMessage)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String lastMessage;
thing.SetLastMessage(lastMessage);
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
String name;
thing.SetName(name);
```

## SetWhenEnded(DateTime)

```crmscript theme={null}
Void SetWhenEnded(DateTime whenEnded)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
DateTime whenEnded;
thing.SetWhenEnded(whenEnded);
```

## SetWhenRequested(DateTime)

```crmscript theme={null}
Void SetWhenRequested(DateTime whenRequested)
```

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

**Example:**

```crmscript theme={null}
NSChatSummaryItem thing;
DateTime whenRequested;
thing.SetWhenRequested(whenRequested);
```


## Related topics

- [NSContactSummary](/en/automation/crmscript/reference/CRMScript.NetServer.NSContactSummary.md)
- [NSPersonSummary](/en/automation/crmscript/reference/CRMScript.NetServer.NSPersonSummary.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [SuperOffice.WebApi.Data.ChatSummaryItem](/en/api/reference/webapi/SuperOffice.WebApi.Data.ChatSummaryItem.md)
- [Summaries](/integrations/supernotes/summaries.md)
- [Get Person Summary](/en/api/reference/restful/rest/person/get-person-summary.md)
