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

# SuperOffice.WebApi.Data.ChatSessionEntity

# <a id="SuperOffice_WebApi_Data_ChatSessionEntity" /> Class ChatSessionEntity

Namespace: [SuperOffice.WebApi.Data](SuperOffice.WebApi.Data.md)\
Assembly: SuperOffice.WebApi.dll

Carrier object for ChatSessionEntity.
Chat sessions belong to a chat topic, and contain messages to/from users

```csharp theme={null}
public class ChatSessionEntity : Carrier
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Carrier](SuperOffice.WebApi.Data.Carrier.md) ←
[ChatSessionEntity](SuperOffice.WebApi.Data.ChatSessionEntity.md)

#### Inherited Members

[Carrier.TableRight](SuperOffice.WebApi.Data.Carrier.md#SuperOffice_WebApi_Data_Carrier_TableRight),
[Carrier.FieldProperties](SuperOffice.WebApi.Data.Carrier.md#SuperOffice_WebApi_Data_Carrier_FieldProperties),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

Get ChatSessionEntity 123 using the WebApi client:
<pre><code class="lang-csharp">var configuration = new WebApiConfiguration(url);
var agent = new ChatAgent(configuration);
var chatSessionEntity = agent.GetChatSessionEntity( 123 );</code></pre>

## Remarks

Use <xref href="SuperOffice.CRM.Services.ArchiveAgent?text=Archive+agent" data-throw-if-not-resolved="false" />:
All ChatSessionEntity: <pre><code class="lang-csharp">"ChatSession"</code></pre>

## Constructors

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity__ctor" /> ChatSessionEntity()

Default constructor - defaults any enum props to 0.

```csharp theme={null}
public ChatSessionEntity()
```

## Properties

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_AlertLevel" /> AlertLevel

The alert level for this chat session.

```csharp theme={null}
public virtual int AlertLevel { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_ChatSessionId" /> ChatSessionId

The primary key (auto-incremented)

```csharp theme={null}
public virtual int ChatSessionId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_ChatbotIsActive" /> ChatbotIsActive

Indicates that a chatbot is active on the session. This will cause bot triggers to fire. Set to 0 when bot hands off to user.

```csharp theme={null}
public virtual bool ChatbotIsActive { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Contact" /> Contact

Contact this session is connected to - could be empty if we don't know exactly.

```csharp theme={null}
public virtual Contact Contact { get; set; }
```

#### Property Value

[Contact](SuperOffice.WebApi.Data.Contact.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerAlias" /> CustomerAlias

The alias for the customer.

```csharp theme={null}
public virtual string CustomerAlias { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerCompanyName" /> CustomerCompanyName

The name of the customers company, if provided

```csharp theme={null}
public virtual string CustomerCompanyName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerConsented" /> CustomerConsented

The customer consented when starting the session

```csharp theme={null}
public virtual bool CustomerConsented { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerEmail" /> CustomerEmail

The email address of the customer, if provided

```csharp theme={null}
public virtual string CustomerEmail { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerHost" /> CustomerHost

The hostname or IP address for the customer.

```csharp theme={null}
public virtual string CustomerHost { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerName" /> CustomerName

The name of customer, if provided

```csharp theme={null}
public virtual string CustomerName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_CustomerPhone" /> CustomerPhone

The phone number of the customer, if provided

```csharp theme={null}
public virtual string CustomerPhone { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_FirstMessage" /> FirstMessage

A copy of the first message in the chat session

```csharp theme={null}
public virtual string FirstMessage { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Flags" /> Flags

Various flags for the chat session
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public ChatSessionFlags? Flags { get; set; }
```

#### Property Value

[ChatSessionFlags](SuperOffice.WebApi.Data.ChatSessionFlags.md)?

#### See Also

[ChatSessionEntity](SuperOffice.WebApi.Data.ChatSessionEntity.md).[Flags\_String](SuperOffice.WebApi.Data.ChatSessionEntity.md#SuperOffice_WebApi_Data_ChatSessionEntity_Flags_String)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Flags_String" /> Flags\_String

Various flags for the chat session
Raw string enum value.

```csharp theme={null}
[JsonProperty("Flags")]
public string Flags_String { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

#### See Also

[ChatSessionEntity](SuperOffice.WebApi.Data.ChatSessionEntity.md).[Flags](SuperOffice.WebApi.Data.ChatSessionEntity.md#SuperOffice_WebApi_Data_ChatSessionEntity_Flags)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_InitialQueuePos" /> InitialQueuePos

The initial queue pos (i.e. the number of pending sessions + 1) when the session was requested.

```csharp theme={null}
public virtual int InitialQueuePos { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_LastMessage" /> LastMessage

A copy of the last message in the chat session

```csharp theme={null}
public virtual string LastMessage { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Person" /> Person

Customer person in this session - could be empty if we don't know exactly.

```csharp theme={null}
public virtual Person Person { get; set; }
```

#### Property Value

[Person](SuperOffice.WebApi.Data.Person.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Project" /> Project

Project the session is connectedto - could be empty if we don't know exactly.

```csharp theme={null}
public virtual Project Project { get; set; }
```

#### Property Value

[Project](SuperOffice.WebApi.Data.Project.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Rank" /> Rank

Lowest possible unique number for active sessions for user. User for color index. Starting at 1.

```csharp theme={null}
public virtual int Rank { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Rating" /> Rating

Rating of this chat conversation given by the customer

```csharp theme={null}
public virtual int Rating { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Sale" /> Sale

Sale the session is connected to - could be empty if we don't know exactly.

```csharp theme={null}
public virtual Sale Sale { get; set; }
```

#### Property Value

[Sale](SuperOffice.WebApi.Data.Sale.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_SessionKey" /> SessionKey

Key used to authenticate the session.

```csharp theme={null}
public virtual string SessionKey { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Status" /> Status

Enum indicating the status for the session (pending, active, closed, etc).
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public ChatSessionStatus? Status { get; set; }
```

#### Property Value

[ChatSessionStatus](SuperOffice.WebApi.Data.ChatSessionStatus.md)?

#### See Also

[ChatSessionEntity](SuperOffice.WebApi.Data.ChatSessionEntity.md).[Status\_String](SuperOffice.WebApi.Data.ChatSessionEntity.md#SuperOffice_WebApi_Data_ChatSessionEntity_Status_String)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Status_String" /> Status\_String

Enum indicating the status for the session (pending, active, closed, etc).
Raw string enum value.

```csharp theme={null}
[JsonProperty("Status")]
public string Status_String { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

#### See Also

[ChatSessionEntity](SuperOffice.WebApi.Data.ChatSessionEntity.md).[Status](SuperOffice.WebApi.Data.ChatSessionEntity.md#SuperOffice_WebApi_Data_ChatSessionEntity_Status)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_Ticket" /> Ticket

Ticket the session is connected to - could be empty if we don't know exactly.

```csharp theme={null}
public virtual Ticket Ticket { get; set; }
```

#### Property Value

[Ticket](SuperOffice.WebApi.Data.Ticket.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_TopicId" /> TopicId

The reference to the associated chat topic.

```csharp theme={null}
public virtual int TopicId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_TransferTo" /> TransferTo

User agent that has a pending transfer of the chat session

```csharp theme={null}
public virtual Associate TransferTo { get; set; }
```

#### Property Value

[Associate](SuperOffice.WebApi.Data.Associate.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_User" /> User

User agent handling this session

```csharp theme={null}
public virtual Associate User { get; set; }
```

#### Property Value

[Associate](SuperOffice.WebApi.Data.Associate.md)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_WhenEnded" /> WhenEnded

When the session was ended.

```csharp theme={null}
public virtual DateTime WhenEnded { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_WhenFetched" /> WhenFetched

The last time the customer\&apos;s client refetched the data. Used to detect \&apos;dead\&apos; session.

```csharp theme={null}
public virtual DateTime WhenFetched { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_WhenIdle" /> WhenIdle

The last time anyone sent a message for this session.

```csharp theme={null}
public virtual DateTime WhenIdle { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_WhenRequested" /> WhenRequested

When the session was requested by the customer.

```csharp theme={null}
public virtual DateTime WhenRequested { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_ChatSessionEntity_WhenStarted" /> WhenStarted

When the session was accepted by a user.

```csharp theme={null}
public virtual DateTime WhenStarted { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

## See Also

[ChatAgent](SuperOffice.WebApi.Agents.ChatAgent.md),
[ArchiveAgent](SuperOffice.WebApi.Agents.ArchiveAgent.md),


## Related topics

- [SuperOffice.WebApi.Agents.ChatAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ChatAgent.md)
- [SuperOffice.WebApi.Agents.IChatAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IChatAgent.md)
- [SuperOffice.WebApi.Data.ChatSession](/en/api/reference/webapi/SuperOffice.WebApi.Data.ChatSession.md)
- [Delete Chat Session Entity](/en/api/reference/restful/rest/chatsession/delete-chat-session-entity.md)
- [Save Chat Session Entity](/en/api/reference/restful/agent/chat_agent/save-chat-session-entity.md)
