Archive database schema for messaging
Types of data stored in the database
The database is designed to store and connect the following information about each message:
Processing Agent�the agent handling the message call
Received Message Data�the original message including tracking number, subject, text, header information, and file attachments
Current State�the status of the message
Responses Sent/Outbound Data�the outbound messages (does not include auto-acknowledgments) created by agents and sent to the customer or messages forwarded to SMEs within your organization
Responses Received�responses from SMEs and the customer
Agent Notes�notes created by an agent
Message History�history which includes timestamps and, where relevant, agent IDs for each event
Agent �Workbench�� stores messages saved by the agent.
Structure of the message archive database
The message archive database has the ODBC Data Source name �Message Care SQL Archive.� Within the message Database, message data is organized in the following tables:
Messages Table
The Messages Table contains �Received Message Data� and �CurrentState� information. It also has fields (as marked with �%�) needed to facilitate reporting and responses.
The messaging software assigns unique message tracking numbers to each message and inserts them in the subject line of any subsequent reply or forward messages. In this manner, all messages generated in response to the original message inherit the original tracking number (assuming the subject line is not manually modified by the sender). Provided the tracking number remains intact in the subject line, both the original message and all ensuing reply and forward messages will be linked on the basis of their shared tracking number.
Responses are distinguished from original messages by the fact that the Original Message flag is set to �No� for responses. In addition, other fields (for example, State) are not set for response messages, but are set in the corresponding Original Message.
The following table describes each database item found in the Messages Table:
Name Type/Size Description MsgID# Integer (long) The Counter (unique value for this table) (Primary Key). MailboxName Text 20 Identifies mailbox (Friendly Name) that received this message. MailboxID Integer (long) Matches a Mailbox ID in the Mailboxes table. Used by Web screens for per-mailbox options (for example, Closure Codes) (Foreign Key). Mime Type Text 255 The Message mime type. CharSet Text 32 Stores the message Character Set (for example, ISO-8859-1). TrackingNumber# Text 8 Each message has a tracking number which is used to identify related messages. The tracking number for �original messages� is a mathematical function of the ID (for example, ID modulus 100,000,000). For �related messages,� the Tracking number is found in the Message Subject (since that is the definition of a related message). SiteID Text 4 Detects when the entry was put in the database. DetectionTime Date/Time When the entry was put in the database. OriginalMsgID# Long The OriginalMsgID# is 0 if this is the first message with this TrackingNumber; otherwise, it is the MsgID# of the Original message. SendersAddress Text 255 The Sender of Message (�From� line from the Message, excluding name if included). SenderName Text 128 The Name of the Sender of Message (if included in �From� line). Subject Text 128 The subject in the message. Headers Memo The complete list of Headers from the Message. Body Memo The body of the Message. MessageDate Text 50 The date in the message header, usually the date/time the message was sent MessageHeaderID Text 128 Most SMTP servers put a unique ID in the message header. Using this field will help determine whether the messaging software already read a message from the mailbox and added it to the database but for some reason had not deleted it and is now attempting to read it again. ToAddress Text 255 The address this message was sent to (needed for reply). AttachCount Integer Indicates the number of attachments. AgentID Text 32 The Switch Agent Login ID number of agent last active on the call. For the DEFINITY ECS, the maximum size of an AgentID is the same as the maximum size of an extension (five digits).
StateTime Date/Time The time the current state was entered. StatusState Text 10 The call state of message, for example, queued, active, suspended. StatusStateNumber Integer (small) The number associated with the various call states. ReasonCode Text 20 Secondary information about the state (for example, how the message was completed). NewMsgArrived Yes/No Indicates if a related message arrived while an agent was processing the message. Attach Overflow Yes/No Indicates if the number of attachments is greater than 20 RevivalTime Date/Time The time it took to unsuspend the call Destination Text 32 The VDN number the call was directed to. For suspended messages, the VDN number to call when it is revived. ASAIDigits Text 16 The ASAI digits to be provided with the call. Applies to original calls and revived calls. UUIData Text 34 Provides capabilities to pass data (for example, account number or phone number) to a downstream CTI application. WorkbenchReply Yes/No Indicates �Yes� if a partial reply composition was saved in the workbench. WorkbenchForward Yes/No Indicates �Yes� if a partial forward composition was saved in the workbench. ViewURL Text 128 Same as the ViewURL in the Administration database but with parameters resolved. DeliveryURL Text 128 Same as the DeliveryURL in the Administration database but with parameters resolved. CustValue Text 128 The value for customer to add (for example, Account Number). The following fields are primarily for reporting purposes. RetryCount% Integer (short) The number of times the messaging software tried to make a call for this message. SuspendCount% Integer (short) How often this message was suspended. TouchCount% Integer (short) How many times this message was made active by an agent. FirstAnswerTime% Date/Time The time an agent first answered a call (should not be overwritten by subsequent answers). SpeedOfAnswer% Integer (long) The DetectionTime to FirstAnswerTime (in seconds). TimeToProcess% Integer (long) The sum of all active times by agents (from Answer to Suspend, Close or Transfer). CloseTime Date/Time The time an original message was marked closed by an agent. TimeToClose% Integer (long) The DetectionTime to CloseTime (in seconds). ReserveInt1 Integer A Reserved field, currently not used. ReserveInt2 Integer A Reserved field, currently not used. ReserveText1 Text 16 A Reserved field, currently not used. ReserveText2 Text 16 A Reserved field, currently not used. Attachments Table
The Attachments Table stores attachments associated with the message. Since there may be zero or more attachments in a message, they are stored in a separate table and linked by MsgID. The AttachCount in the Messages table serves to �flag� the existence of attachments.
The following table describes each database item found in the Attachments Table:
Name Type/Size Purpose ID# Integer (long) The counter (unique value for this table) (Primary Key) MsgID# Integer (long) Matches a MsgID in the Messages table (Foreign Key) MimeType Text 50 The mime type of the attachment (for example, application/msword). FileName Text 512 The name of the attachment. File OLE Object A image attachment; can conatin an arbitrarily large binary file. Outbound Table
The Outbound Table stores outbound data (forwards or replies created by agents).
The following table describes each database item found in the Outbound Table:
Name Type/Size Purpose ID# Integer (long) The counter (unique value for this table) (Primary Key). MsgID# Integer (long) Matches a MsgID in the Messages table (will always match an OriginalMessage MsgID) (Foreign Key). OriginalAttachmentID Integer (long) The ID of the message that has attachments included for reply/forward. AgentID Text 32 The agent who sent the reply or forward. Timestamp Date/Time The time this reply was sent. MessageType Text 10 Can be either �Forwarded,� �Replied,� or �Resent.� CharSet Text 32 Stores the Character Set of the message (for example, ISO-8859-1). Body Memo Can hold an arbitrarily large text file. ToAddress Text 255 To whom the message was sent (can be null value). CCList Text 255 To whom the message was copied. Subject Text 128 The subject sent with the message. AttachmentName Text 512 The name of the attachment sent with the message. OriginalAttachments Yes/No Indicates whether original message attachments were sent with this message. FromAddress Text 255 The return address of the mailbox from which the mail was sent. Notes Table
The Notes Table stores notes created by an agent.
The following table describes each database item found in the Notes Table:
Name Type/Size Purpose ID# Integer (long) The counter (unique value for this table) (Primary Key). MsgID# Integer (long) Matches a MsgID in the Messages table (will always match an OriginalMessage MsgID) (Foreign Key). AgentID Text 32 The agent who created the note. Timestamp Date/Time The time this note was saved. Note Memo Can hold an arbitrarily large text file. Events Table
The Events Table contains data corresponding to the Message History object.
The following table describes each database item found in the Events Table:
Name Type/Size Purpose ID# Integer (long) The counter (unique value for this table) (Primary Key). MsgID# Integer (long) Matches a MsgID in the Messages table (will always match an OriginalMessage MsgID) (Foreign Key). RelatedID Integer (long) For events that refer to a related message (for example, forward and reply events); this matches the MsgID of the related message. Timestamp Date/Time The time this event occurred. Event Text 20 Events include call states (for example, queued) and message processing states (for example, replied). ReasonCode Text 20 Secondary information about the state (for example, how the message was completed). AgentID Text 32 Applicable to some events (for example, answered, suspended). OtherData Text 50 Zero or more pieces of data associated with the event. Actual data depends on event. (For example, a suspend event may include the VDN to call on expiration of the Suspend timer.) Workbench Table
The Workbench Table stores saved versions of composed replies associated with the message. Since there may be 0, 1, or 2 of these per message and they may be large, they are each stored in a separate table and linked by MsgID. The WorkBench field in the Messages table is a �flag� as to whether there is a previously saved response. The layout of this table is very similar to the Outbound Table (minus the AgentID and Timestamp).
The following table describes each database item found in the Workbench Table
Name Type/Size Purpose ID# Integer (long) The counter (unique value for this table) (Primary Key). MsgID# Integer (long) Matches a MsgID in the Messages table (will always match an OriginalMessage MsgID) (Foreign Key). OriginalAttachmentID Integer (long) The Message ID of the message whose attachments have been included for reply/forward. MessageType Text 8 Can be either �Forward� or �Reply.� CharSet Text 32 Stores the Character Set of the message (for example, ISO-8859-1). Body Memo Can hold an arbitrarily large text file. ToAddress Text 255 To whom the message was sent. CCList Text 255 To whom the message was copied. Subject Text 128 The subject sent with the message. AttachmentName Text 128 The name of the attachment sent with the message. OriginalAttachments Yes/No Indicates whether the original message attachments were sent with this message. Customizing the archive database
Important!
Information about database customization refers only to the archive database. Under no circumstances should you attempt to edit the active messages database.
The messaging software supports the individual retrieval of each stored message. By using the Archive database schema for messaging, you can retrieve specific pieces of correspondence associated with a message record (for example, you may wish to retrieve only responses from the customer). These customer responses can than be extracted for storage into an internal customer contact database.
Schema information for the archive database can also be used to develop any data management tools you may need for extracting archived information for customized reports or for porting it to an internal database.
Things to know about managing the archive database
The messaging software gives you the flexibility to move archived messages to the storage location you specify. With sufficient planning and evaluation of your data storage requirements, you should be able to avoid the necessity of moving archived databases due to space limitations.
However, should it become necessary to move or copy databases, these activities should be undertaken only by personnel who possess appropriate training and knowledge of the Microsoft SQL-Server database management system.
Searching multiple archives
The search capabilities provided by the messaging Web pages will search only the current message storage system and a single archive. Searches on other archived messages must be provided by you.
For additional information on database archiving, see Archive message records.
Copyright © 2001
Avaya Inc.
All rights reserved.
Modified: March 19, 2001![]()