Class NSChatSessionEntity
Chat sessions belong to a chat topic, and contain messages to/from users. Carrier object for ChatSessionEntity.
Syntax
Constructors
NSChatSessionEntity()
Initializes a new instance of the NSChatSessionEntity class.
Declaration
Methods
GetAlertLevel()
Declaration
Returns
Type |
Description |
Integer |
The alert level for this chat session.
|
Examples
NSChatSessionEntity thing;
Integer alertLevel = thing.GetAlertLevel();
GetChatbotIsActive()
Declaration
Bool GetChatbotIsActive()
Returns
Type |
Description |
Bool |
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.
|
Examples
NSChatSessionEntity thing;
Bool chatbotIsActive = thing.GetChatbotIsActive();
GetChatSessionId()
Declaration
Integer GetChatSessionId()
Returns
Type |
Description |
Integer |
The primary key (auto-incremented).
|
Examples
NSChatSessionEntity thing;
Integer chatSessionId = thing.GetChatSessionId();
Declaration
Returns
Type |
Description |
NSContact |
Contact this session is connected to. Could be empty if we don't know exactly.
|
NSChatSessionEntity thing;
NSContact contact = thing.GetContact();
GetCustomerAlias()
Declaration
String GetCustomerAlias()
Returns
Type |
Description |
String |
The alias for the customer.
|
Examples
NSChatSessionEntity thing;
String customerAlias = thing.GetCustomerAlias();
GetCustomerCompanyName()
Declaration
String GetCustomerCompanyName()
Returns
Type |
Description |
String |
The name of the customers company, if provided.
|
Examples
NSChatSessionEntity thing;
String customerCompanyName = thing.GetCustomerCompanyName();
GetCustomerConsented()
Declaration
Bool GetCustomerConsented()
Returns
Type |
Description |
Bool |
The customer consented when starting the session.
|
Examples
NSChatSessionEntity thing;
Bool customerConsented = thing.GetCustomerConsented();
GetCustomerEmail()
Declaration
String GetCustomerEmail()
Returns
Type |
Description |
String |
The email address of the customer, if provided.
|
Examples
NSChatSessionEntity thing;
String customerEmail = thing.GetCustomerEmail();
GetCustomerHost()
Declaration
Returns
Type |
Description |
String |
The hostname or IP address for the customer.
|
Examples
NSChatSessionEntity thing;
String customerHost = thing.GetCustomerHost();
GetCustomerName()
Declaration
Returns
Type |
Description |
String |
The name of customer, if provided.
|
Examples
NSChatSessionEntity thing;
String customerName = thing.GetCustomerName();
GetCustomerPhone()
Declaration
String GetCustomerPhone()
Returns
Type |
Description |
String |
The phone number of the customer, if provided.
|
Examples
NSChatSessionEntity thing;
String customerPhone = thing.GetCustomerPhone();
GetFirstMessage()
Declaration
Returns
Type |
Description |
String |
A copy of the first message in the chat session.
|
Examples
NSChatSessionEntity thing;
String firstMessage = thing.GetFirstMessage();
GetFlags()
Declaration
Returns
Examples
NSChatSessionEntity thing;
Integer flags = thing.GetFlags();
GetInitialQueuePos()
Declaration
Integer GetInitialQueuePos()
Returns
Type |
Description |
Integer |
The initial queue pos (the number of pending sessions + 1) when the session was requested.
|
Examples
NSChatSessionEntity thing;
Integer initialQueuePos = thing.GetInitialQueuePos();
GetLastMessage()
Declaration
Returns
Type |
Description |
String |
A copy of the last message in the chat session.
|
Examples
NSChatSessionEntity thing;
String lastMessage = thing.GetLastMessage();
GetPerson()
Declaration
Returns
Type |
Description |
NSPerson |
Customer person in this session. Could be empty if we don't know exactly.
|
Examples
NSChatSessionEntity thing;
NSPerson person = thing.GetPerson();
GetProject()
Declaration
Returns
Type |
Description |
NSProject |
Project the session is connected to. Could be empty if we don't know exactly.
|
Examples
NSChatSessionEntity thing;
NSProject project = thing.GetProject();
GetRank()
Declaration
Returns
Type |
Description |
Integer |
Lowest possible unique number for active sessions for user. User for color index. Starting at 1.
|
Examples
NSChatSessionEntity thing;
Integer rank = thing.GetRank();
GetSale()
Declaration
Returns
Type |
Description |
NSSale |
Sale the session is connected to. Could be empty if we don't know exactly.
|
Examples
NSChatSessionEntity thing;
NSSale sale = thing.GetSale();
GetSessionKey()
Declaration
Returns
Type |
Description |
String |
Key used to authenticate the session.
|
Examples
NSChatSessionEntity thing;
String sessionKey = thing.GetSessionKey();
GetStatus()
Declaration
Returns
Examples
NSChatSessionEntity thing;
Integer status = thing.GetStatus();
GetTicket()
Declaration
Returns
Type |
Description |
NSTicket |
Ticket the session is connected to. Could be empty if we don't know exactly.
|
Examples
NSChatSessionEntity thing;
NSTicket ticket = thing.GetTicket();
GetTopicId()
Declaration
Returns
Type |
Description |
Integer |
The reference to the associated chat topic.
|
Examples
NSChatSessionEntity thing;
Integer topicId = thing.GetTopicId();
GetTransferTo()
Declaration
NSAssociate GetTransferTo()
Returns
Type |
Description |
NSAssociate |
User agent that has a pending transfer of the chat session.
|
Examples
NSChatSessionEntity thing;
NSAssociate transferTo = thing.GetTransferTo();
GetUser()
Declaration
Returns
Type |
Description |
NSAssociate |
User agent handling this session.
|
Examples
NSChatSessionEntity thing;
NSAssociate user = thing.GetUser();
GetWhenEnded()
Declaration
Returns
Type |
Description |
DateTime |
When the session was ended.
|
Examples
NSChatSessionEntity thing;
DateTime whenEnded = thing.GetWhenEnded();
GetWhenFetched()
Declaration
DateTime GetWhenFetched()
Returns
Type |
Description |
DateTime |
The last time the customer's client re-fetched the data. Used to detect dead session.
|
Examples
NSChatSessionEntity thing;
DateTime whenFetched = thing.GetWhenFetched();
GetWhenIdle()
Declaration
Returns
Type |
Description |
DateTime |
The last time anyone sent a message for this session.
|
Examples
NSChatSessionEntity thing;
DateTime whenIdle = thing.GetWhenIdle();
GetWhenRequested()
Declaration
DateTime GetWhenRequested()
Returns
Type |
Description |
DateTime |
When the session was requested by the customer.
|
Examples
NSChatSessionEntity thing;
DateTime whenRequested = thing.GetWhenRequested();
GetWhenStarted()
Declaration
DateTime GetWhenStarted()
Returns
Type |
Description |
DateTime |
When the session was accepted by a user.
|
Examples
NSChatSessionEntity thing;
DateTime whenStarted = thing.GetWhenStarted();
SetAlertLevel(Integer)
Declaration
Void SetAlertLevel(Integer alertLevel)
Parameters
Type |
Name |
Description |
Integer |
alertLevel |
The alert level for this chat session.
|
Returns
Examples
NSChatSessionEntity thing;
Integer alertLevel;
thing.SetAlertLevel(alertLevel);
SetChatbotIsActive(Bool)
Declaration
Void SetChatbotIsActive(Bool chatbotIsActive)
Parameters
Type |
Name |
Description |
Bool |
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.
|
Returns
Examples
NSChatSessionEntity thing;
Bool chatbotIsActive;
thing.SetChatbotIsActive(chatbotIsActive);
SetChatSessionId(Integer)
Declaration
Void SetChatSessionId(Integer chatSessionId)
Parameters
Type |
Name |
Description |
Integer |
chatSessionId |
The primary key (auto-incremented).
|
Returns
Examples
NSChatSessionEntity thing;
Integer chatSessionId;
thing.SetChatSessionId(chatSessionId);
Declaration
Void SetContact(NSContact contact)
Parameters
Type |
Name |
Description |
NSContact |
contact |
Contact this session is connected to. Could be empty if we don't know exactly.
|
NSChatSessionEntity thing;
NSContact contact;
thing.SetContact(contact);
SetCustomerAlias(String)
Declaration
Void SetCustomerAlias(String customerAlias)
Parameters
Type |
Name |
Description |
String |
customerAlias |
The alias for the customer.
|
Returns
Examples
NSChatSessionEntity thing;
String customerAlias;
thing.SetCustomerAlias(customerAlias);
SetCustomerCompanyName(String)
Declaration
Void SetCustomerCompanyName(String customerCompanyName)
Parameters
Type |
Name |
Description |
String |
customerCompanyName |
The name of the customers company, if provided.
|
Returns
Examples
NSChatSessionEntity thing;
String customerCompanyName;
thing.SetCustomerCompanyName(customerCompanyName);
SetCustomerConsented(Bool)
Declaration
Void SetCustomerConsented(Bool customerConsented)
Parameters
Type |
Name |
Description |
Bool |
customerConsented |
The customer consented when starting the session.
|
Returns
Examples
NSChatSessionEntity thing;
Bool customerConsented;
thing.SetCustomerConsented(customerConsented);
SetCustomerEmail(String)
Declaration
Void SetCustomerEmail(String customerEmail)
Parameters
Type |
Name |
Description |
String |
customerEmail |
The email address of the customer, if provided.
|
Returns
Examples
NSChatSessionEntity thing;
String customerEmail;
thing.SetCustomerEmail(customerEmail);
SetCustomerHost(String)
Declaration
Void SetCustomerHost(String customerHost)
Parameters
Type |
Name |
Description |
String |
customerHost |
The hostname or IP address for the customer.
|
Returns
Examples
NSChatSessionEntity thing;
String customerHost;
thing.SetCustomerHost(customerHost);
SetCustomerName(String)
Declaration
Void SetCustomerName(String customerName)
Parameters
Type |
Name |
Description |
String |
customerName |
The name of customer, if provided.
|
Returns
Examples
NSChatSessionEntity thing;
String customerName;
thing.SetCustomerName(customerName);
SetCustomerPhone(String)
Declaration
Void SetCustomerPhone(String customerPhone)
Parameters
Type |
Name |
Description |
String |
customerPhone |
The phone number of the customer, if provided.
|
Returns
Examples
NSChatSessionEntity thing;
String customerPhone;
thing.SetCustomerPhone(customerPhone);
SetFirstMessage(String)
Declaration
Void SetFirstMessage(String firstMessage)
Parameters
Type |
Name |
Description |
String |
firstMessage |
A copy of the first message in the chat session.
|
Returns
Examples
NSChatSessionEntity thing;
String firstMessage;
thing.SetFirstMessage(firstMessage);
SetFlags(Integer)
Declaration
Void SetFlags(Integer flags)
Parameters
Returns
Examples
NSChatSessionEntity thing;
Integer flags;
thing.SetFlags(flags);
SetInitialQueuePos(Integer)
Declaration
Void SetInitialQueuePos(Integer initialQueuePos)
Parameters
Type |
Name |
Description |
Integer |
initialQueuePos |
The initial queue pos (the number of pending sessions + 1) when the session was requested.
|
Returns
Examples
NSChatSessionEntity thing;
Integer initialQueuePos;
thing.SetInitialQueuePos(initialQueuePos);
SetLastMessage(String)
Declaration
Void SetLastMessage(String lastMessage)
Parameters
Type |
Name |
Description |
String |
lastMessage |
A copy of the last message in the chat session.
|
Returns
Examples
NSChatSessionEntity thing;
String lastMessage;
thing.SetLastMessage(lastMessage);
SetPerson(NSPerson)
Declaration
Void SetPerson(NSPerson person)
Parameters
Type |
Name |
Description |
NSPerson |
person |
Customer person in this session. Could be empty if we don't know exactly.
|
Returns
Examples
NSChatSessionEntity thing;
NSPerson person;
thing.SetPerson(person);
SetProject(NSProject)
Declaration
Void SetProject(NSProject project)
Parameters
Type |
Name |
Description |
NSProject |
project |
Project the session is connected to. Could be empty if we don't know exactly.
|
Returns
Examples
NSChatSessionEntity thing;
NSProject project;
thing.SetProject(project);
SetRank(Integer)
Declaration
Void SetRank(Integer rank)
Parameters
Type |
Name |
Description |
Integer |
rank |
Lowest possible unique number for active sessions for user. User for color index. Starting at 1.
|
Returns
Examples
NSChatSessionEntity thing;
Integer rank;
thing.SetRank(rank);
SetSale(NSSale)
Declaration
Void SetSale(NSSale sale)
Parameters
Type |
Name |
Description |
NSSale |
sale |
Sale the session is connected to. Could be empty if we don't know exactly.
|
Returns
Examples
NSChatSessionEntity thing;
NSSale sale;
thing.SetSale(sale);
SetSessionKey(String)
Declaration
Void SetSessionKey(String sessionKey)
Parameters
Type |
Name |
Description |
String |
sessionKey |
Key used to authenticate the session.
|
Returns
Examples
NSChatSessionEntity thing;
String sessionKey;
thing.SetSessionKey(sessionKey);
SetStatus(Integer)
Declaration
Void SetStatus(Integer status)
Parameters
Examples
NSChatSessionEntity thing;
Integer status;
thing.SetStatus(status);
SetTicket(NSTicket)
Declaration
Void SetTicket(NSTicket ticket)
Parameters
Type |
Name |
Description |
NSTicket |
ticket |
Ticket the session is connected to. Could be empty if we don't know exactly.
|
Returns
Examples
NSChatSessionEntity thing;
NSTicket ticket;
thing.SetTicket(ticket);
SetTopicId(Integer)
Declaration
Void SetTopicId(Integer topicId)
Parameters
Type |
Name |
Description |
Integer |
topicId |
The reference to the associated chat topic.
|
Returns
Examples
NSChatSessionEntity thing;
Integer topicId;
thing.SetTopicId(topicId);
SetTransferTo(NSAssociate)
Declaration
Void SetTransferTo(NSAssociate transferTo)
Parameters
Type |
Name |
Description |
NSAssociate |
transferTo |
User agent that has a pending transfer of the chat session.
|
Returns
Examples
NSChatSessionEntity thing;
NSAssociate transferTo;
thing.SetTransferTo(transferTo);
SetUser(NSAssociate)
Declaration
Void SetUser(NSAssociate user)
Parameters
Type |
Name |
Description |
NSAssociate |
user |
User agent handling this session.
|
Returns
Examples
NSChatSessionEntity thing;
NSAssociate user;
thing.SetUser(user);
SetWhenEnded(DateTime)
Declaration
Void SetWhenEnded(DateTime whenEnded)
Parameters
Type |
Name |
Description |
DateTime |
whenEnded |
When the session was ended.
|
Returns
Examples
NSChatSessionEntity thing;
DateTime whenEnded;
thing.SetWhenEnded(whenEnded);
SetWhenFetched(DateTime)
Declaration
Void SetWhenFetched(DateTime whenFetched)
Parameters
Type |
Name |
Description |
DateTime |
whenFetched |
The last time the customer's client re-fetched the data. Used to detect dead session.
|
Returns
Examples
NSChatSessionEntity thing;
DateTime whenFetched;
thing.SetWhenFetched(whenFetched);
SetWhenIdle(DateTime)
Declaration
Void SetWhenIdle(DateTime whenIdle)
Parameters
Type |
Name |
Description |
DateTime |
whenIdle |
The last time anyone sent a message for this session.
|
Returns
Examples
NSChatSessionEntity thing;
DateTime whenIdle;
thing.SetWhenIdle(whenIdle);
SetWhenRequested(DateTime)
Declaration
Void SetWhenRequested(DateTime whenRequested)
Parameters
Type |
Name |
Description |
DateTime |
whenRequested |
When the session was requested by the customer.
|
Returns
Examples
NSChatSessionEntity thing;
DateTime whenRequested;
thing.SetWhenRequested(whenRequested);
SetWhenStarted(DateTime)
Declaration
Void SetWhenStarted(DateTime whenStarted)
Parameters
Type |
Name |
Description |
DateTime |
whenStarted |
When the session was accepted by a user.
|
Returns
Examples
NSChatSessionEntity thing;
DateTime whenStarted;
thing.SetWhenStarted(whenStarted);