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