ej_message Table (258)

This table contains the messages listed under tickets.

Fields

NameDescriptionTypeNull
idThe primary key (auto-incremented)PK
ticket_idThe ticket this message is a child of.FK ticket
search_titleA copy of the title of the ticket, for search optimisation and simpler reporting.String(255)
created_atWhen the message was posted.DateTime
created_byThe id of the user who posted the message. The value 1 (system user) for externally posted messages.FK ejuser
typeThe type of the message (plaintext/html).Enum TicketMessageType
message_categoryDefines what kind of message this is.Enum TicketMessageCategory
authorA string representing the author of the message. Could be a user's name, or a persons email address.String(255)
slevelThe securitylevel of the message.Enum TicketSecurityLevel
message_idThe Message-Id header value from the email. Used for threading, i.e. connecting messages to existing tickets.String(850)
time_spentThe time spent (minutes) for this message.Int
time_chargeThe amount of time (minutes) which should be invoiced for this message.Int
bodyThe textbody for the message.Clob
html_bodyThe html body for the message (if any).Clob
email_headerThe email header is saved in this field as raw textClob
debug_infoThe debug info for the message.Clob
mail_sorterThe 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. :-0String(255)
customer_idIf the message was created by email or from the customer center, this field will point to that customer. -1 if the message was created by an userFK person
body_attachmentIf the body is too long for the database, it's stored in this attachment instead.FK attachment
html_body_attachmentIf the htmlbody is too long for the database, it's stored in this attachment instead.FK attachment
html_body_inline_convertedTrue if the html_body has converted inline image links.Bool
inboxThe id of the inbox entry which created this message. Note: inbox entries are regularily deleted.FK inbox
importantIf this message is important or not.Bool
languageThe language this message is in, based on some kind of analysisString(10)
sentimentSentiment index, 100 = completely happy; -100 = suicidally unhappy; 0 = no ideaInt
sentimentConfidenceConfidence of sentiment index, 0 = no idea, 100 = completely sureInt
changed_atWhen the message was changed.DateTime
changed_byThe id of the user who changed the message.FK ejuser
badgeBadge to explicitly determine how a message was generatedEnum BadgeType

ej_message table relationship diagram

Indexes

FieldsTypesDescription
idPKClustered, Unique
ticket_idFKIndex
created_byFKIndex
message_idString(850)Index
customer_idFKIndex
body_attachmentFKIndex
html_body_attachmentFKIndex
search_title, body, html_bodyString(255), Clob, ClobFull text
created_atDateTimeIndex

Relationships

TableDescription
attachmentThis table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table.
ejuserThis table contains entries for the users of the system.
inboxInfo and status for safe email import
invoice_entryThis table contain all invoices, connected to a message
message_customersThis table contains all cutomers who are involved in a message
message_headerThis table contains small pieces of information which is listed over the body for each message.
outboxOutgoing emails with sending status and other info
personPersons
smsThis table will hold outgoing sms messages when transmitted with WebServices
ticketThis table contains the tickets (requests) of the system. Its purpose should be evident.
ticket_attachmentThis table connects an attachment to a message. It references the entry in the attachment table, and the message.
ticket_log_actionThis table contains actions for the tickets.
ticket_log_changeThis table contains log entries for the tickets.

Replication Flags

  • None

Security Flags

  • Sentry controls access to items in this table using user’s Role and data rights matrix on the table’s parent.