Skip to main content
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.

Methods

GetAlertLevel()

Returns: CRMScript.Global.Integer - The alert level for this chat session. Example:

GetChatbotIsActive()

Returns: CRMScript.Global.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. Example:

GetChatSessionId()

Returns: CRMScript.Global.Integer - The primary key (auto-incremented). Example:

GetContact()

Returns: CRMScript.NetServer.NSContact - Contact this session is connected to. Could be empty if we don’t know exactly. Example:

GetCustomerAlias()

Returns: CRMScript.Global.String - The alias for the customer. Example:

GetCustomerCompanyName()

Returns: CRMScript.Global.String - The name of the customers company, if provided. Example:

GetCustomerConsented()

Returns: CRMScript.Global.Bool - The customer consented when starting the session. Example:

GetCustomerEmail()

Returns: CRMScript.Global.String - The email address of the customer, if provided. Example:

GetCustomerHost()

Returns: CRMScript.Global.String - The hostname or IP address for the customer. Example:

GetCustomerName()

Returns: CRMScript.Global.String - The name of customer, if provided. Example:

GetCustomerPhone()

Returns: CRMScript.Global.String - The phone number of the customer, if provided. Example:

GetFirstMessage()

Returns: CRMScript.Global.String - A copy of the first message in the chat session. Example:

GetFlags()

Returns: CRMScript.Global.Integer - Various flags for the chat session. See <xref href=“CRMScript.NetServer.ChatSessionFlags” data-throw-if-not-resolved=“false”></xref>. Example:

GetInitialQueuePos()

Returns: CRMScript.Global.Integer - The initial queue pos (the number of pending sessions + 1) when the session was requested. Example:

GetLastMessage()

Returns: CRMScript.Global.String - A copy of the last message in the chat session. Example:

GetPerson()

Returns: CRMScript.NetServer.NSPerson - Customer person in this session. Could be empty if we don’t know exactly. Example:

GetProject()

Returns: CRMScript.NetServer.NSProject - Project the session is connected to. Could be empty if we don’t know exactly. Example:

GetRank()

Returns: CRMScript.Global.Integer - Lowest possible unique number for active sessions for user. User for color index. Starting at 1. Example:

GetSale()

Returns: CRMScript.NetServer.NSSale - Sale the session is connected to. Could be empty if we don’t know exactly. Example:

GetSessionKey()

Returns: CRMScript.Global.String - Key used to authenticate the session. Example:

GetStatus()

Returns: CRMScript.Global.Integer - The status for the session. See <xref href=“CRMScript.NetServer.ChatSessionStatus” data-throw-if-not-resolved=“false”></xref>. Example:

GetTicket()

Returns: CRMScript.NetServer.NSTicket - Ticket the session is connected to. Could be empty if we don’t know exactly. Example:

GetTopicId()

Returns: CRMScript.Global.Integer - The reference to the associated chat topic. Example:

GetTransferTo()

Returns: CRMScript.NetServer.NSAssociate - User agent that has a pending transfer of the chat session. Example:

GetUser()

Returns: CRMScript.NetServer.NSAssociate - User agent handling this session. Example:

GetWhenEnded()

Returns: CRMScript.Global.DateTime - When the session was ended. Example:

GetWhenFetched()

Returns: CRMScript.Global.DateTime - The last time the customer’s client re-fetched the data. Used to detect dead session. Example:

GetWhenIdle()

Returns: CRMScript.Global.DateTime - The last time anyone sent a message for this session. Example:

GetWhenRequested()

Returns: CRMScript.Global.DateTime - When the session was requested by the customer. Example:

GetWhenStarted()

Returns: CRMScript.Global.DateTime - When the session was accepted by a user. Example:

SetAlertLevel(Integer)

Returns: CRMScript.Global.Void Example:

SetChatbotIsActive(Bool)

Returns: CRMScript.Global.Void Example:

SetChatSessionId(Integer)

Returns: CRMScript.Global.Void Example:

SetContact(NSContact)

Returns: CRMScript.Global.Void Example:

SetCustomerAlias(String)

Returns: CRMScript.Global.Void Example:

SetCustomerCompanyName(String)

Returns: CRMScript.Global.Void Example:

SetCustomerConsented(Bool)

Returns: CRMScript.Global.Void Example:

SetCustomerEmail(String)

Returns: CRMScript.Global.Void Example:

SetCustomerHost(String)

Returns: CRMScript.Global.Void Example:

SetCustomerName(String)

Returns: CRMScript.Global.Void Example:

SetCustomerPhone(String)

Returns: CRMScript.Global.Void Example:

SetFirstMessage(String)

Returns: CRMScript.Global.Void Example:

SetFlags(Integer)

Returns: CRMScript.Global.Void
n
Example:

SetInitialQueuePos(Integer)

Returns: CRMScript.Global.Void Example:

SetLastMessage(String)

Returns: CRMScript.Global.Void Example:

SetPerson(NSPerson)

Returns: CRMScript.Global.Void Example:

SetProject(NSProject)

Returns: CRMScript.Global.Void Example:

SetRank(Integer)

Returns: CRMScript.Global.Void Example:

SetSale(NSSale)

Returns: CRMScript.Global.Void Example:

SetSessionKey(String)

Returns: CRMScript.Global.Void Example:

SetStatus(Integer)

Returns: CRMScript.Global.Void Example:

SetTicket(NSTicket)

Returns: CRMScript.Global.Void Example:

SetTopicId(Integer)

Returns: CRMScript.Global.Void Example:

SetTransferTo(NSAssociate)

Returns: CRMScript.Global.Void Example:

SetUser(NSAssociate)

Returns: CRMScript.Global.Void Example:

SetWhenEnded(DateTime)

Returns: CRMScript.Global.Void Example:

SetWhenFetched(DateTime)

Returns: CRMScript.Global.Void Example:

SetWhenIdle(DateTime)

Returns: CRMScript.Global.Void Example:

SetWhenRequested(DateTime)

Returns: CRMScript.Global.Void Example:

SetWhenStarted(DateTime)

Returns: CRMScript.Global.Void Example: