Skip to main content
The ticket messages are e-mails, SMS or other messages attached to a ticket (aka request).

Constructors

NSTicketMessageEntity()

Initializes a new instance of the NSTicketMessageEntity class.

Methods

GetAuthor()

A string representing the author of the message. Could be a user’s name, or a persons email address.
Returns: CRMScript.Global.String Example:

GetBody()

The textbody for the message.
Returns: CRMScript.Global.String Example:

GetCreatedAt()

When the message was posted.
Returns: CRMScript.Global.DateTime Example:

GetCreatedBy()

The associate who created this ticket message
Returns: CRMScript.NetServer.NSAssociate Example:

GetCustomFields()

Gets the user-defined + extra fields on a TicketMessageEntity as a map.
Returns: CRMScript.Native.Map Example:

GetDebugInfo()

The debug info for the message.
Returns: CRMScript.Global.String Example:

GetEjMessageId()

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

GetEmailHeader()

The email header is saved in this field as raw text
Returns: CRMScript.Global.String Example:

GetExtraFields()

Gets the extra fields on TicketMessageEntity as a map.
Returns: CRMScript.Native.Map Example:

GetHtmlBody()

The HTML body for the message (if any).
Returns: CRMScript.Global.String Example:

GetImportant()

If this message is important or not.
Returns: CRMScript.Global.Bool Example:

GetMailSorter()

The name of the mail sorter used when the email was imported. Note: We must use name instead of id since the id’s change every time one changes the mail sorter. :-0
Returns: CRMScript.Global.String Example:

GetMessageCategory()

Returns: CRMScript.Global.Integer - Defines what kind of message this is. See <xref href=“CRMScript.NetServer.TicketMessageCategory” data-throw-if-not-resolved=“false”></xref>. Example:

GetMessageHeaders()

Returns: CRMScript.NetServer.NSTicketMessageHeader[] - Contains the message headers, like To, Cc, Bcc information, or custom headers. Example:

GetMessageId()

The X-Message-Id header value from the email. Used for threading, i.e. connecting messages to existing tickets.
Returns: CRMScript.Global.String Example:

GetPerson()

If this is an incoming message, this will contain the person
Returns: CRMScript.NetServer.NSPerson Example:

GetSearchTitle()

A copy of the title of the ticket, for search optimization and simpler reporting.
Returns: CRMScript.Global.String Example:

GetSlevel()

Returns: CRMScript.Global.Integer - The security level of the message. See <xref href=“CRMScript.NetServer.TicketSecurityLevel” data-throw-if-not-resolved=“false”></xref>. Example:

GetTicket()

The connected ticket
Returns: CRMScript.NetServer.NSTicket Example:

GetTimeSpent()

The time spent (minutes) for this message.
Returns: CRMScript.Global.Integer Example:

GetType()

Returns: CRMScript.Global.Integer - The type of the message (plaintext/html). See <xref href=“CRMScript.NetServer.TicketMessageType” data-throw-if-not-resolved=“false”></xref>. Example:

SetAuthor(String)

A string representing the author of the message. Could be a user’s name, or a persons email address.
Returns: CRMScript.Global.Void Example:

SetBody(String)

The textbody for the message.
Returns: CRMScript.Global.Void Example:

SetCreatedAt(DateTime)

When the message was posted.
Example:

SetCreatedBy(NSAssociate)

The associate who created this ticket message
Example:

SetCustomFields(Map)

Sets the user-defined and extra fields on a TicketMessageEntity with a map.
Returns: CRMScript.Global.Void Example:

SetDebugInfo(String)

The debug info for the message.
Returns: CRMScript.Global.Void Example:

SetEjMessageId(Integer)

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

SetEmailHeader(String)

The email header is saved in this field as raw text
Returns: CRMScript.Global.Void Example:

SetExtraFields(Map)

Sets the extra field values on TicketMessageEntity with a map.
Returns: CRMScript.Global.Void Example:

SetHtmlBody(String)

The HTML body for the message (if any).
Returns: CRMScript.Global.Void Example:

SetImportant(Bool)

If this message is important or not.
Returns: CRMScript.Global.Void Example:

SetMailSorter(String)

The name of the mail sorter used when the email was imported. Note: We must use name instead of id since the id’s change every time one changes the mail sorter. :-0
Returns: CRMScript.Global.Void Example:

SetMessageCategory(Integer)

Example:

SetMessageHeaders(NSTicketMessageHeader[])

Returns: CRMScript.Global.Void Example:

SetMessageId(String)

The X-Message-Id header value from the email. Used for threading, i.e. connecting messages to existing tickets.
Returns: CRMScript.Global.Void Example:

SetPerson(NSPerson)

If this is an incoming message, this will contain the person
Returns: CRMScript.Global.Void Example:

SetSearchTitle(String)

A copy of the title of the ticket, for search optimisation and simpler reporting.
Returns: CRMScript.Global.Void Example:

SetSlevel(Integer)

Returns: CRMScript.Global.Void Example:

SetTicket(NSTicket)

The connected ticket
Returns: CRMScript.Global.Void Example:

SetTimeSpent(Integer)

The time spent (minutes) for this message.
Returns: CRMScript.Global.Void Example:

SetType(Integer)

Example: