Class ChatSessionTableInfo
Table 'chat_session': This table contains chat sessions.
Implements
Inherited Members
Namespace: SuperOfficeCRMData
Assembly: SoDataBase.dll
Syntax
[DatabaseTable("chat_session")]
public class ChatSessionTableInfo : TableInfo, ICloneable
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetChatSessionInfo().
Fields
DictionaryTableName
Conceptual name of table ChatSession in the database dictionary: chat_session
Declaration
public const string DictionaryTableName = "chat_session"
Field Value
| Type | Description |
|---|---|
| string |
Properties
AlertLevel
Field 'alert_level' in table 'chat_session': Dictionary type Int, .NET type: int
The alert level for this chat session.
Declaration
public Int32FieldInfo AlertLevel { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
ChatSessionId
Field 'id' in table 'chat_session': Dictionary type PK, .NET type: int
The primary key (auto-incremented)
Declaration
public Int32FieldInfo ChatSessionId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
ChatbotIsactive
Field 'chatbot_isactive' in table 'chat_session': Dictionary type Bool, .NET type: short
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.
Declaration
public UInt16FieldInfo ChatbotIsactive { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
CompanyName
Field 'company_name' in table 'chat_session': Dictionary type String[256], .NET type: string
The name of the customers company, if provided
Declaration
public StringFieldInfo CompanyName { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
Consented
Field 'consented' in table 'chat_session': Dictionary type Bool, .NET type: short
The customer consented when starting the session
Declaration
public UInt16FieldInfo Consented { get; }
Property Value
| Type | Description |
|---|---|
| UInt16FieldInfo |
ContactId
Field 'contact_id' in table 'chat_session': Dictionary type FK, target: Contact, .NET type: int
The contact that this chat session is connected to
Declaration
public Int32FieldInfo ContactId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
ContactId_InnerJoin_Contact
Generated join from the foreign key ContactId in this table, to its target table ContactTableInfo.
Declaration
public TargetedInnerJoin<ContactTableInfo> ContactId_InnerJoin_Contact { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinContactTableInfo |
Country
Field 'country' in table 'chat_session': Dictionary type Int, .NET type: int
The country that the chat customer selected.
Declaration
public Int32FieldInfo Country { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
CustomerAlias
Field 'customer_alias' in table 'chat_session': Dictionary type String[65], .NET type: string
The alias for the customer.
Declaration
public StringFieldInfo CustomerAlias { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
CustomerFetch
Field 'customer_fetch' in table 'chat_session': Dictionary type DateTime, .NET type: DateTime
The last time the customer's client refetched the data. Used to detect 'dead' session.
Declaration
public DateTimeFieldInfo CustomerFetch { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
CustomerHost
Field 'customer_host' in table 'chat_session': Dictionary type String[256], .NET type: string
The hostname or IP address for the customer.
Declaration
public StringFieldInfo CustomerHost { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
CustomerId
Field 'customer_id' in table 'chat_session': Dictionary type FK, target: Person, .NET type: int
The reference to the associated customer. May be NULL or -1.
Declaration
public Int32FieldInfo CustomerId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
CustomerId_InnerJoin_Person
Generated join from the foreign key CustomerId in this table, to its target table PersonTableInfo.
Declaration
public TargetedInnerJoin<PersonTableInfo> CustomerId_InnerJoin_Person { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinPersonTableInfo |
Definition
Definition of the table as described in the deployed runtime dictionary
Declaration
public override SoTable Definition { get; }
Property Value
| Type | Description |
|---|---|
| SoTable |
Overrides
DictionaryTableNumber
Table number for table ChatSession in the database dictionary; potentially changes between databases, but always the same over the lifetime of any single database
Declaration
public int DictionaryTableNumber { get; }
Property Value
| Type | Description |
|---|---|
| int |
Field 'email' in table 'chat_session': Dictionary type String[256], .NET type: string
The email address of the customer, if provided
Declaration
public StringFieldInfo Email { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
FirstMessage
Field 'first_message' in table 'chat_session': Dictionary type String[1025], .NET type: string
A copy of the first message in the chat session
Declaration
public StringFieldInfo FirstMessage { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
Flags
Field 'flags' in table 'chat_session': Dictionary type Enum, .NET type: ChatSessionFlags
Various flags for the chat session
Declaration
public ChatSessionFlagsFieldInfo Flags { get; }
Property Value
| Type | Description |
|---|---|
| ChatSessionFlagsFieldInfo |
Idle
Field 'idle' in table 'chat_session': Dictionary type DateTime, .NET type: DateTime
The last time anyone sent a message for this session.
Declaration
public DateTimeFieldInfo Idle { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
InitialQueuePos
Field 'initial_queue_pos' in table 'chat_session': Dictionary type Int, .NET type: int
The initial queue pos (i.e. the number of pending sessions + 1) when the session was requested.
Declaration
public Int32FieldInfo InitialQueuePos { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
LastMessage
Field 'last_message' in table 'chat_session': Dictionary type String[1025], .NET type: string
A copy of the last message in the chat session
Declaration
public StringFieldInfo LastMessage { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
LeftOuterJoin_ChatMessage_SessionId
Generated left outer join from the primary key ChatSessionId on this table, to ChatMessage.SessionId.
Declaration
public TargetedLeftOuterJoin<ChatMessageTableInfo> LeftOuterJoin_ChatMessage_SessionId { get; }
Property Value
| Type | Description |
|---|---|
| TargetedLeftOuterJoinChatMessageTableInfo |
Name
Field 'name' in table 'chat_session': Dictionary type String[256], .NET type: string
The name of customer, if provided
Declaration
public StringFieldInfo Name { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
Phone
Field 'phone' in table 'chat_session': Dictionary type String[33], .NET type: string
The phone number of the customer, if provided
Declaration
public StringFieldInfo Phone { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
ProjectId
Field 'project_id' in table 'chat_session': Dictionary type FK, target: Project, .NET type: int
The project that this chat session is connected to
Declaration
public Int32FieldInfo ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
ProjectId_InnerJoin_Project
Generated join from the foreign key ProjectId in this table, to its target table ProjectTableInfo.
Declaration
public TargetedInnerJoin<ProjectTableInfo> ProjectId_InnerJoin_Project { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinProjectTableInfo |
Rank
Field 'rank' in table 'chat_session': Dictionary type Int, .NET type: int
Lowest possible unique number for active sessions for user. User for color index. Starting at 1.
Declaration
public Int32FieldInfo Rank { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
Rating
Field 'rating' in table 'chat_session': Dictionary type Int, .NET type: int
Rating of this chat conversation given by the customer
Declaration
public Int32FieldInfo Rating { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
RuntimeDefinition
Definition of the table as described in the deployed runtime dictionary
Declaration
[Obsolete("Use instance property Definition or static member DictionaryTableNumber", true)]
public static SoTable RuntimeDefinition { get; }
Property Value
| Type | Description |
|---|---|
| SoTable |
SaleId
Field 'sale_id' in table 'chat_session': Dictionary type FK, target: Sale, .NET type: int
The sale that this chat session is connected to
Declaration
public Int32FieldInfo SaleId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
SaleId_InnerJoin_Sale
Generated join from the foreign key SaleId in this table, to its target table SaleTableInfo.
Declaration
public TargetedInnerJoin<SaleTableInfo> SaleId_InnerJoin_Sale { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinSaleTableInfo |
SessionKey
Field 'session_key' in table 'chat_session': Dictionary type String[256], .NET type: string
Key used to authenticate the session.
Declaration
public StringFieldInfo SessionKey { get; }
Property Value
| Type | Description |
|---|---|
| StringFieldInfo |
Status
Field 'status' in table 'chat_session': Dictionary type Enum, .NET type: ChatSessionStatus
Enum indicating the status for the session (pending, active, closed, etc).
Declaration
public ChatSessionStatusFieldInfo Status { get; }
Property Value
| Type | Description |
|---|---|
| ChatSessionStatusFieldInfo |
TicketId
Field 'ticket_id' in table 'chat_session': Dictionary type FK, target: Ticket, .NET type: int
The ticket that this chat session is connected to
Declaration
public Int32FieldInfo TicketId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
TicketId_InnerJoin_Ticket
Generated join from the foreign key TicketId in this table, to its target table TicketTableInfo.
Declaration
public TargetedInnerJoin<TicketTableInfo> TicketId_InnerJoin_Ticket { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinTicketTableInfo |
TopicId
Field 'topic_id' in table 'chat_session': Dictionary type FK, target: ChatTopic, .NET type: int
The reference to the associated chat topic.
Declaration
public Int32FieldInfo TopicId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
TopicId_InnerJoin_ChatTopic
Generated join from the foreign key TopicId in this table, to its target table ChatTopicTableInfo.
Declaration
public TargetedInnerJoin<ChatTopicTableInfo> TopicId_InnerJoin_ChatTopic { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinChatTopicTableInfo |
TransferTo
Field 'transfer_to' in table 'chat_session': Dictionary type FK, target: Ejuser, .NET type: int
The ejuser that has a pending transfer of the chat session
Declaration
public Int32FieldInfo TransferTo { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
TransferTo_InnerJoin_Ejuser
Generated join from the foreign key TransferTo in this table, to its target table EjuserTableInfo.
Declaration
public TargetedInnerJoin<EjuserTableInfo> TransferTo_InnerJoin_Ejuser { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinEjuserTableInfo |
UserId
Field 'user_id' in table 'chat_session': Dictionary type FK, target: Ejuser, .NET type: int
The reference to the associated user.
Declaration
public Int32FieldInfo UserId { get; }
Property Value
| Type | Description |
|---|---|
| Int32FieldInfo |
UserId_InnerJoin_Ejuser
Generated join from the foreign key UserId in this table, to its target table EjuserTableInfo.
Declaration
public TargetedInnerJoin<EjuserTableInfo> UserId_InnerJoin_Ejuser { get; }
Property Value
| Type | Description |
|---|---|
| TargetedInnerJoinEjuserTableInfo |
WhenEnded
Field 'when_ended' in table 'chat_session': Dictionary type DateTime, .NET type: DateTime
When the session was ended.
Declaration
public DateTimeFieldInfo WhenEnded { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
WhenRequested
Field 'when_requested' in table 'chat_session': Dictionary type DateTime, .NET type: DateTime
When the session was requested by the customer.
Declaration
public DateTimeFieldInfo WhenRequested { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
WhenStarted
Field 'when_started' in table 'chat_session': Dictionary type DateTime, .NET type: DateTime
When the session was accepted by a user.
Declaration
public DateTimeFieldInfo WhenStarted { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeFieldInfo |
Methods
IdxStatus(ChatSessionStatus)
Shortcut method for looking up using the database index Status, which spans the following fields:
| Field | Description |
|---|---|
| Status | Enum indicating the status for the session (pending, active, closed, etc). |
Declaration
public Restriction IdxStatus(ChatSessionStatus status)
Parameters
| Type | Name | Description |
|---|---|---|
| ChatSessionStatus | status |
Returns
| Type | Description |
|---|---|
| Restriction |
IdxStatusTopicId(ChatSessionStatus, int)
Shortcut method for looking up using the database index StatusTopicId, which spans the following fields:
| Field | Description |
|---|---|
| Status | Enum indicating the status for the session (pending, active, closed, etc). |
| TopicId | The reference to the associated chat topic. |
Declaration
public Restriction IdxStatusTopicId(ChatSessionStatus status, int topicId)
Parameters
| Type | Name | Description |
|---|---|---|
| ChatSessionStatus | status | |
| int | topicId |
Returns
| Type | Description |
|---|---|
| Restriction |