Class TicketEntity
The ticket entity is used for representing a service ticket
Carrier object for TicketEntity. Services for the TicketEntity Carrier is available from the Ticket Agent.Implements
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.6.0.0")]
public class TicketEntity : Carrier, IExtraFieldCarrier
Examples
Get TicketEntity 123 using the agent:
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
var agent = new TicketAgent();
var ticketEntity = agent.GetTicketEntity( 123 );
}
Find all TicketEntity, get related items using archive agent.
var archive = new ArchiveAgent();
var rows = archive.GetArchiveListByColumns2("Ticket", "...", null, "getAllRows eq 1", null, 0, 100 );
var messages = archive.GetArchiveListByColumns2("TicketMessage", "...", null, "ticketId eq 123", null, 0, 100 );
Constructors
TicketEntity()
Default constructor
Declaration
public TicketEntity()
See Also
Properties
Activate
When the ticket should be activated, if it is postponed.
Declaration
[DataMember]
public virtual DateTime Activate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
ActiveStatusMonitorId
Active status monitor identity for related contact. This is a read-only property and is ignored on Save
Declaration
[DataMember]
public virtual int ActiveStatusMonitorId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
AlertLevel
The alert level for the ticket. Matches the level value of the ticket_alert table.
Declaration
[DataMember]
public virtual short AlertLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| short |
See Also
AlertTimeout
The datetime for when the ticket should jump to the next alert_level.
Declaration
[DataMember]
public virtual DateTime AlertTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
Author
A string representing the author of the ticket (same as author of first message).
Declaration
[DataMember]
public virtual string Author { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
BaseStatus
The status of the ticket. I.e. active/closed/postponed/deleted
Use MDO List name "ticketstatus" to get list items.
Declaration
[DataMember]
public virtual TicketBaseStatus BaseStatus { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketBaseStatus |
See Also
Category
The ticket category entity which this ticket is connected to
Use MDO List name "ejcategory" to get list items.
Declaration
[DataMember]
public virtual TicketCategoryEntity Category { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketCategoryEntity |
See Also
ClosedAt
When the ticket was closed.
Declaration
[DataMember]
public virtual DateTime ClosedAt { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
ConnectId
If a ticket is connected to another ticket, this field is set to the id of the 'master' ticket.
Declaration
[DataMember]
public virtual int ConnectId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
CreatedAt
When the ticket was created.
Declaration
[DataMember]
public virtual DateTime CreatedAt { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
CreatedBy
The associate who created this ticket
Declaration
[DataMember]
public virtual Associate CreatedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| Associate |
See Also
CustomFields
Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual ExtraFields and UserDefinedFields properties are deprecated in favor of this combined collection.
Declaration
[DataMember]
public StringDictionary CustomFields { get; set; }
Property Value
| Type | Description |
|---|---|
| StringDictionary |
Remarks
The naming convention of the key string is as follows:
| Extra field data |
[Extra field name]
Example:
|
| User defined field data |
[Prog-id name]
Example:
|
See Also
Deadline
Deadline for ticket.
Declaration
[DataMember]
public virtual DateTime Deadline { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
ExtraFields
Deprecated: Use CustomFields instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.
Declaration
[DataMember]
public StringDictionary ExtraFields { get; set; }
Property Value
| Type | Description |
|---|---|
| StringDictionary |
Remarks
The naming convention of the key string is as follows:
| Plug-in data | [Plug-in name].[Property name] Example: DocumentPlugin.DocumentType |
| Foreign key data | The device identity is appended directly to the device name if it exists. This is not commonly used, but the database opens for this as a possibility to have several devices with the same name, and hence we would ensure an unique key if this field is used. Example: Audience.SecretService.DefaultCountry |
| User defined table data | [Table name].[Field name] Example: Phunneling.AggregatedSales |
| Other | Other data sources must ensure an unique name. If the key already exists we do not add the data to the dictionary. We also ensure that SuperOffice data are added first, so that existing data doesnt change when more data sources are added (with duplicate data keys). |
See Also
FirstReadByOwner
The datetime for when the ticket first was read by the current owner.
Declaration
[DataMember]
public virtual DateTime FirstReadByOwner { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
FirstReadByUser
The datetime for when the ticket first was read by a user.
Declaration
[DataMember]
public virtual DateTime FirstReadByUser { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
FormSubmission
The form submission that this ticket is connected to
Declaration
[DataMember]
public virtual TicketFormSubmission FormSubmission { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketFormSubmission |
See Also
FromAddress
The from-address used when this ticket got created, e.g. by email
Declaration
[DataMember]
public virtual string FromAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
HasAttachment
Boolean indicating if this ticket has one or more attachments.
Declaration
[DataMember]
public virtual bool HasAttachment { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
IconHint
Icon representing ticket's state
Declaration
[DataMember]
public virtual string IconHint { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
Language
The language of the first external message
Declaration
[DataMember]
public virtual string Language { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
LastChanged
The last time the ticket was modified.
Declaration
[DataMember]
public virtual DateTime LastChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
Messages
TicketMessageId,CreatedAt,SLevel and Important for all the messages connected to this ticket. For message body see the TicketMessageEntity or the TicketMessage archive.
Declaration
[DataMember]
public virtual TicketMessage[] Messages { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketMessage[] |
See Also
NumMessages
The total number of messages for this request.
Declaration
[DataMember]
public virtual int NumMessages { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
NumReplies
The number of replies (messages) to the customer for this request.
Declaration
[DataMember]
public virtual int NumReplies { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
OrigHumanCategoryId
Will contain the category id selected by the user, when having the choice of using the suggested category or manually selecting a category
Declaration
[DataMember]
public virtual int OrigHumanCategoryId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
Origin
What is the origin of this ticket
Declaration
[DataMember]
public virtual TicketOrigin Origin { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketOrigin |
See Also
OwnedBy
The associate who owns this ticket. Setting the id to 0 will make the ticket unassigned. Setting the id to 2147483647 (MaxInt) will make it automatically assigned according to the ticket category assignment rules.
Use MDO List name "associate" to get list items.
Declaration
[DataMember]
public virtual Associate OwnedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| Associate |
See Also
Person
The primary person that this ticket is connected to
Use MDO List name "person_new" to get list items.
Declaration
[DataMember]
public virtual Person Person { get; set; }
Property Value
| Type | Description |
|---|---|
| Person |
See Also
Priority
The ticket priority entity which this ticket is connected to
Use MDO List name "ticketpriority" to get list items.
Declaration
[DataMember]
public virtual TicketPriorityEntity Priority { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketPriorityEntity |
See Also
Project
The project that this ticket is connected to
Use MDO List name "project" to get list items.
Declaration
[DataMember]
public virtual Project Project { get; set; }
Property Value
| Type | Description |
|---|---|
| Project |
See Also
ReadByCustomer
The datetime for when the ticket was read by the customer.
Declaration
[DataMember]
public virtual DateTime ReadByCustomer { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
ReadByOwner
The datetime for when the ticket last was read by the owner.
Declaration
[DataMember]
public virtual DateTime ReadByOwner { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
ReadStatus
Whether the owner has read the ticket or not (red, yellow, green).
Declaration
[DataMember]
public virtual TicketReadStatus ReadStatus { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketReadStatus |
See Also
RealTimeSpentExternally
The total time (seconds) within 24x7 the ticket has been in a external waiting status (configurable), not including current state
Declaration
[DataMember]
public virtual int RealTimeSpentExternally { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
RealTimeSpentInternally
The total time (seconds) within 24x7 the ticket has been in an open status (configurable), not including current state
Declaration
[DataMember]
public virtual int RealTimeSpentInternally { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
RealTimeSpentQueue
The total time (seconds) within 24x7 hours the ticket has been in a queue status, not including current state
Declaration
[DataMember]
public virtual int RealTimeSpentQueue { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
RealTimeToClose
Same as time_to_close, but not calculated based on priority.
Declaration
[DataMember]
public virtual int RealTimeToClose { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
RealTimeToReply
Same as time_to_reply, but not calculated based on priority.
Declaration
[DataMember]
public virtual int RealTimeToReply { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
RepliedAt
The datetime for when the ticket was replied to. I.e. the first external message added to the ticket.
Declaration
[DataMember]
public virtual DateTime RepliedAt { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
Sale
The sale that this ticket is connected to
Use MDO List name "sale" to get list items.
Declaration
[DataMember]
public virtual Sale Sale { get; set; }
Property Value
| Type | Description |
|---|---|
| Sale |
See Also
SecondaryPersons
The secondary persons this ticket is connected to
Use MDO List name "person_new" to get list items.
Declaration
[DataMember]
public virtual Person[] SecondaryPersons { get; set; }
Property Value
| Type | Description |
|---|---|
| Person[] |
See Also
Sentiment
The sentiment index of the last external message
Declaration
[DataMember]
public virtual int Sentiment { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
SentimentConfidence
The sentiment confidence of the last external message
Declaration
[DataMember]
public virtual int SentimentConfidence { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
Slevel
The securitylevel of the ticket.
Declaration
[DataMember]
public virtual TicketSecurityLevel Slevel { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketSecurityLevel |
See Also
Status
The ticket status entity which this ticket is connected to
Use MDO List name "ticketstatus" to get list items.
Declaration
[DataMember]
public virtual TicketStatusEntity Status { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketStatusEntity |
See Also
SuggestedCategoryId
Suggestion for categorization, based on the text of the message (AI)
Declaration
[DataMember]
public virtual int SuggestedCategoryId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
SuggestedCategoryName
Suggested category from AI
Declaration
[DataMember]
public virtual string SuggestedCategoryName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
Tags
An array containing the tags assigned to this request
Declaration
[DataMember]
public virtual Tag[] Tags { get; set; }
Property Value
| Type | Description |
|---|---|
| Tag[] |
See Also
TicketId
The primary key (auto-incremented)
Declaration
[DataMember]
public virtual int TicketId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TicketType
Type of the Request
Use MDO List name "TicketType" to get list items.
Declaration
[DataMember]
public virtual TicketType TicketType { get; set; }
Property Value
| Type | Description |
|---|---|
| TicketType |
See Also
TimeSpent
The total time (minutes). Aggregated time spent from ticket's messages. Read-only for external use.
Declaration
[DataMember]
public virtual int TimeSpent { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TimeSpentExternally
The total time (seconds) within the priority's office hours the ticket has been in a external waiting status (configurable), not including current state
Declaration
[DataMember]
public virtual int TimeSpentExternally { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TimeSpentInternally
The total time (seconds) within the priority's office hours the ticket has been in an open status (configurable), not including current state
Declaration
[DataMember]
public virtual int TimeSpentInternally { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TimeSpentQueue
The total time (seconds) within the priority's office hours the ticket has been in a queue status, not including current state
Declaration
[DataMember]
public virtual int TimeSpentQueue { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TimeToClose
The time (minutes) between when the ticket was created and when it was closed. Calculated based on priority's timeframe.
Declaration
[DataMember]
public virtual int TimeToClose { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
TimeToReply
The time (minutes) between when the ticket was created and when it was replied to. Calculated based on priority's timeframe.
Declaration
[DataMember]
public virtual int TimeToReply { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
Title
The title of the ticket.
Declaration
[DataMember]
public virtual string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
Methods
ToString()
Returns the carrier contents as a formatted string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The carrier contents. |
See Also
ToString(string)
Returns the carrier contents as a formatted string, useful for debugging. Each line in the output is prefixed with the input value.
Declaration
public string ToString(string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix | The line prefix (typically used for indenting) |
Returns
| Type | Description |
|---|---|
| string | The carrier contents. |