POST Agents/Ticket/SaveTicketEntity
Some tooltip text!
• 21 minutes to read
• 21 minutes to read
POST /api/v1/Agents/Ticket/SaveTicketEntity
Updates the existing TicketEntity or creates a new TicketEntity if the id parameter is empty
Request Headers
Parameter Name | Description |
---|---|
Authorization | Supports 'Basic', 'SoTicket' and 'Bearer' schemes, depending on installation type. |
X-XSRF-TOKEN | If not using Authorization header, you must provide XSRF value from cookie or hidden input field |
Content-Type | Content-type of the request body: application/json , text/json , application/xml , text/xml , application/x-www-form-urlencoded , application/json-patch+json , application/merge-patch+json |
Accept | Content-type(s) you would like the response in: application/json , text/json , application/xml , text/xml , application/json-patch+json , application/merge-patch+json |
Accept-Language | Convert string references and multi-language values into a specified language (iso2) code. |
SO-Language | Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value. |
SO-Culture | Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set. |
SO-TimeZone | Specify the timezone code that you would like date/time responses converted to. |
SO-AppToken | The application token that identifies the partner app. Used when calling Online WebAPI from a server. |
Request Body: entity
The TicketEntity to be saved.
Property Name | Type | Description |
---|---|---|
TicketId | Integer | The primary key (auto-incremented) |
Title | String | The title of the ticket. |
CreatedAt | String | When the ticket was created. |
LastChanged | String | The last time the ticket was modified. |
ReadByOwner | String | The datetime for when the ticket last was read by the owner. |
ReadByCustomer | String | The datetime for when the ticket was read by the customer. |
FirstReadByOwner | String | The datetime for when the ticket first was read by the current owner. |
FirstReadByUser | String | The datetime for when the ticket first was read by a user. |
Activate | String | When the ticket should be activated, if it is postponed. |
ClosedAt | String | When the ticket was closed. |
RepliedAt | String | The datetime for when the ticket was replied to. I.e. the first external message added to the ticket. |
AlertTimeout | String | The datetime for when the ticket should jump to the next alert_level. |
Deadline | String | Deadline for ticket. |
CreatedBy | Associate | The associate who created this ticket |
Author | String | A string representing the author of the ticket (same as author of first message). |
OwnedBy | Associate | 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. |
Category | TicketCategoryEntity | The ticket category entity which this ticket is connected to |
Slevel | String | The securitylevel of the ticket. |
Priority | TicketPriorityEntity | The ticket priority entity which this ticket is connected to |
BaseStatus | String | The status of the ticket. I.e. active/closed/postponed/deleted |
Status | TicketStatusEntity | The ticket status entity which this ticket is connected to |
Origin | String | What is the origin of this ticket |
Person | Person | The primary person that this ticket is connected to |
SecondaryPersons | Array | The secondary persons this ticket is connected to |
AlertLevel | Integer | The alert level for the ticket. Matches the level value of the ticket_alert table. |
ConnectId | Integer | If a ticket is connected to another ticket, this field is set to the id of the 'master' ticket. |
ReadStatus | String | Whether the owner has read the ticket or not (red, yellow, green). |
TimeToReply | Integer | The time (minutes) between when the ticket was created and when it was replied to. Calculated based on priority's timeframe. |
RealTimeToReply | Integer | Same as time_to_reply, but not calculated based on priority. |
TimeToClose | Integer | The time (minutes) between when the ticket was created and when it was closed. Calculated based on priority's timeframe. |
RealTimeToClose | Integer | Same as time_to_close, but not calculated based on priority. |
TimeSpentInternally | Integer | The total time (seconds) within the priority's office hours the ticket has been in an open status (configurable), not including current state |
TimeSpentExternally | Integer | The total time (seconds) within the priority's office hours the ticket has been in a external waiting status (configurable), not including current state |
TimeSpentQueue | Integer | The total time (seconds) within the priority's office hours the ticket has been in a queue status, not including current state |
RealTimeSpentInternally | Integer | The total time (seconds) within 24x7 the ticket has been in an open status (configurable), not including current state |
RealTimeSpentExternally | Integer | The total time (seconds) within 24x7 the ticket has been in a external waiting status (configurable), not including current state |
RealTimeSpentQueue | Integer | The total time (seconds) within 24x7 hours the ticket has been in a queue status, not including current state |
TimeSpent | Integer | The total time (minutes). Aggregated time spent from ticket's messages. Read-only for external use. |
HasAttachment | Boolean | Boolean indicating if this ticket has one or more attachments. |
NumReplies | Integer | The number of replies (messages) to the customer for this request. |
NumMessages | Integer | The total number of messages for this request. |
FromAddress | String | The from-address used when this ticket got created, e.g. by email |
Messages | Array | TicketMessageId,CreatedAt,SLevel and Important for all the messages connected to this ticket. For message body see the TicketMessageEntity or the TicketMessage archive. |
Tags | Array | An array containing the tags assigned to this request |
Language | String | The language of the first external message |
Sentiment | Integer | The sentiment index of the last external message |
SentimentConfidence | Integer | The sentiment confidence of the last external message |
SuggestedCategoryId | Integer | Suggestion for categorization, based on the text of the message (AI) |
SuggestedCategoryName | String | Suggested category from AI |
OrigHumanCategoryId | Integer | Will contain the category id selected by the user, when having the choice of using the suggested category or manually selecting a category |
IconHint | String | Icon representing ticket's state |
Sale | Sale | The sale that this ticket is connected to |
Project | Project | The project that this ticket is connected to |
FormSubmission | TicketFormSubmission | The form submission that this ticket is connected to |
TicketType | TicketType | Type of the Request |
ActiveStatusMonitorId | Integer | Active status monitor identity for related contact. This is a read-only property and is ignored on Save |
ExtraFields | Object | Deprecated: Use {SuperOffice.CRM.Services.TicketEntity.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc. |
CustomFields | Object | 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 {SuperOffice.CRM.Services.TicketEntity.ExtraFields} and |
Response:
OK
Response | Description |
---|---|
200 | OK |
Response body: TicketEntity
Property Name | Type | Description |
---|---|---|
TicketId | int32 | The primary key (auto-incremented) |
Title | string | The title of the ticket. |
CreatedAt | date-time | When the ticket was created. |
LastChanged | date-time | The last time the ticket was modified. |
ReadByOwner | date-time | The datetime for when the ticket last was read by the owner. |
ReadByCustomer | date-time | The datetime for when the ticket was read by the customer. |
FirstReadByOwner | date-time | The datetime for when the ticket first was read by the current owner. |
FirstReadByUser | date-time | The datetime for when the ticket first was read by a user. |
Activate | date-time | When the ticket should be activated, if it is postponed. |
ClosedAt | date-time | When the ticket was closed. |
RepliedAt | date-time | The datetime for when the ticket was replied to. I.e. the first external message added to the ticket. |
AlertTimeout | date-time | The datetime for when the ticket should jump to the next alert_level. |
Deadline | date-time | Deadline for ticket. |
CreatedBy | Associate | The associate who created this ticket |
Author | string | A string representing the author of the ticket (same as author of first message). |
OwnedBy | Associate | 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. |
Category | TicketCategoryEntity | The ticket category entity which this ticket is connected to Use MDO List name "ejcategory" to get list items. |
Slevel | string | The securitylevel of the ticket. |
Priority | TicketPriorityEntity | The ticket priority entity which this ticket is connected to Use MDO List name "ticketpriority" to get list items. |
BaseStatus | string | The status of the ticket. I.e. active/closed/postponed/deleted Use MDO List name "ticketstatus" to get list items. |
Status | TicketStatusEntity | The ticket status entity which this ticket is connected to Use MDO List name "ticketstatus" to get list items. |
Origin | string | What is the origin of this ticket |
Person | Person | The primary person that this ticket is connected to Use MDO List name "person_new" to get list items. |
SecondaryPersons | array | The secondary persons this ticket is connected to Use MDO List name "person_new" to get list items. |
AlertLevel | int32 | The alert level for the ticket. Matches the level value of the ticket_alert table. |
ConnectId | int32 | If a ticket is connected to another ticket, this field is set to the id of the 'master' ticket. |
ReadStatus | string | Whether the owner has read the ticket or not (red, yellow, green). |
TimeToReply | int32 | The time (minutes) between when the ticket was created and when it was replied to. Calculated based on priority's timeframe. |
RealTimeToReply | int32 | Same as time_to_reply, but not calculated based on priority. |
TimeToClose | int32 | The time (minutes) between when the ticket was created and when it was closed. Calculated based on priority's timeframe. |
RealTimeToClose | int32 | Same as time_to_close, but not calculated based on priority. |
TimeSpentInternally | int32 | The total time (seconds) within the priority's office hours the ticket has been in an open status (configurable), not including current state |
TimeSpentExternally | int32 | The total time (seconds) within the priority's office hours the ticket has been in a external waiting status (configurable), not including current state |
TimeSpentQueue | int32 | The total time (seconds) within the priority's office hours the ticket has been in a queue status, not including current state |
RealTimeSpentInternally | int32 | The total time (seconds) within 24x7 the ticket has been in an open status (configurable), not including current state |
RealTimeSpentExternally | int32 | The total time (seconds) within 24x7 the ticket has been in a external waiting status (configurable), not including current state |
RealTimeSpentQueue | int32 | The total time (seconds) within 24x7 hours the ticket has been in a queue status, not including current state |
TimeSpent | int32 | The total time (minutes). Aggregated time spent from ticket's messages. Read-only for external use. |
HasAttachment | bool | Boolean indicating if this ticket has one or more attachments. |
NumReplies | int32 | The number of replies (messages) to the customer for this request. |
NumMessages | int32 | The total number of messages for this request. |
FromAddress | string | The from-address used when this ticket got created, e.g. by email |
Messages | array | TicketMessageId,CreatedAt,SLevel and Important for all the messages connected to this ticket. For message body see the TicketMessageEntity or the TicketMessage archive. |
Tags | array | An array containing the tags assigned to this request |
Language | string | The language of the first external message |
Sentiment | int32 | The sentiment index of the last external message |
SentimentConfidence | int32 | The sentiment confidence of the last external message |
SuggestedCategoryId | int32 | Suggestion for categorization, based on the text of the message (AI) |
SuggestedCategoryName | string | Suggested category from AI |
OrigHumanCategoryId | int32 | Will contain the category id selected by the user, when having the choice of using the suggested category or manually selecting a category |
IconHint | string | Icon representing ticket's state |
Sale | Sale | The sale that this ticket is connected to Use MDO List name "sale" to get list items. |
Project | Project | The project that this ticket is connected to Use MDO List name "project" to get list items. |
FormSubmission | TicketFormSubmission | The form submission that this ticket is connected to |
TicketType | TicketType | Type of the Request Use MDO List name "TicketType" to get list items. |
ActiveStatusMonitorId | int32 | Active status monitor identity for related contact. This is a read-only property and is ignored on Save |
ExtraFields | object | Deprecated: Use {SuperOffice.CRM.Services.TicketEntity.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc. |
CustomFields | object | 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 {SuperOffice.CRM.Services.TicketEntity.ExtraFields} and UserDefinedFields properties are deprecated in favor of this combined collection. |
TableRight | TableRight | The carrier's table right |
FieldProperties | object | Field property dictionary mapping field names to field access rights. |
Sample request
POST /api/v1/Agents/Ticket/SaveTicketEntity
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: en
Content-Type: application/json; charset=utf-8
{
"TicketId": 389,
"Title": "et",
"CreatedAt": "2002-12-18T14:13:41.4070755+01:00",
"LastChanged": "2022-02-07T14:13:41.4070755+01:00",
"ReadByOwner": "2024-08-06T14:13:41.4070755+02:00",
"ReadByCustomer": "2010-05-23T14:13:41.4070755+02:00",
"FirstReadByOwner": "2005-11-05T14:13:41.4070755+01:00",
"FirstReadByUser": "2020-11-19T14:13:41.4070755+01:00",
"Activate": "2021-06-12T14:13:41.4070755+02:00",
"ClosedAt": "2022-10-15T14:13:41.4070755+02:00",
"RepliedAt": "2006-06-15T14:13:41.4070755+02:00",
"AlertTimeout": "2007-05-16T14:13:41.4070755+02:00",
"Deadline": "2015-06-05T14:13:41.4070755+02:00",
"CreatedBy": null,
"Author": "dignissimos",
"OwnedBy": null,
"Category": null,
"Slevel": "External",
"Priority": null,
"BaseStatus": "Active",
"Status": null,
"Origin": "AutoGenerated",
"Person": null,
"SecondaryPersons": [
{
"Position": "eos",
"PersonId": 75,
"Mrmrs": "eos",
"Firstname": "Chaya",
"Lastname": "Cremin",
"MiddleName": "Fadel, Graham and Reichel",
"Title": "iusto",
"Description": "Networked didactic strategy",
"Email": "jessyca@dickinsonratke.com",
"FullName": "Kaitlin Brown",
"DirectPhone": "647.318.1300 x73441",
"FormalName": "Volkman-Strosin",
"CountryId": 280,
"ContactId": 978,
"ContactName": "Hegmann, Fisher and Cummings",
"Retired": 23,
"Rank": 348,
"ActiveInterests": 791,
"ContactDepartment": "",
"ContactCountryId": 760,
"ContactOrgNr": "901342",
"FaxPhone": "648.029.9294",
"MobilePhone": "434.653.6164",
"ContactPhone": "581.053.2646",
"AssociateName": "Simonis, Upton and Durgan",
"AssociateId": 602,
"UsePersonAddress": false,
"ContactFax": "alias",
"Kanafname": "perspiciatis",
"Kanalname": "cupiditate",
"Post1": "est",
"Post2": "nihil",
"Post3": "qui",
"EmailName": "georgianna.pagac@kutch.uk",
"ContactFullName": "Angel Jakob Price Jr.",
"ActiveErpLinks": 886,
"TicketPriorityId": 837,
"SupportLanguageId": 613,
"SupportAssociateId": 115,
"CategoryName": "VIP Customer",
"PersonNumber": "1220732"
}
],
"AlertLevel": 165,
"ConnectId": 447,
"ReadStatus": "Green",
"TimeToReply": 720,
"RealTimeToReply": 550,
"TimeToClose": 802,
"RealTimeToClose": 276,
"TimeSpentInternally": 229,
"TimeSpentExternally": 478,
"TimeSpentQueue": 213,
"RealTimeSpentInternally": 634,
"RealTimeSpentExternally": 290,
"RealTimeSpentQueue": 415,
"TimeSpent": 221,
"HasAttachment": false,
"NumReplies": 116,
"NumMessages": 814,
"FromAddress": "ratione",
"Messages": [
{
"TicketMessageId": 776,
"CreatedAt": "2017-03-13T14:13:41.4070755+01:00",
"Slevel": "External",
"Important": true,
"Author": "itaque",
"PersonId": 403,
"PersonFullName": "Prof. Cooper Sonny Paucek I",
"ContactId": 591,
"ContactName": "Haag Group",
"ContactDepartment": "",
"NumAttachments": 389,
"EmailHeader": "maryam_kemmer@beatty.uk",
"MessageHeaders": [
{},
{}
],
"Language": "aperiam",
"Sentiment": 28,
"SentimentConfidence": 428,
"CreatedBy": 362,
"ChangedAt": "2023-07-23T14:13:41.4070755+02:00",
"Badge": "Comment"
}
],
"Tags": [
{
"Id": 131,
"Name": "Bins, Willms and Fritsch",
"ToolTip": "Quis magnam velit harum totam mollitia fuga."
},
{
"Id": 131,
"Name": "Bins, Willms and Fritsch",
"ToolTip": "Quis magnam velit harum totam mollitia fuga."
}
],
"Language": "rem",
"Sentiment": 740,
"SentimentConfidence": 269,
"SuggestedCategoryId": 20,
"SuggestedCategoryName": "VIP Customer",
"OrigHumanCategoryId": 177,
"IconHint": "eos",
"Sale": null,
"Project": null,
"FormSubmission": null,
"TicketType": null,
"ActiveStatusMonitorId": 334,
"ExtraFields": {
"ExtraFields1": "aliquam",
"ExtraFields2": "dolores"
},
"CustomFields": {
"CustomFields1": "error",
"CustomFields2": "aut"
}
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"TicketId": 24,
"Title": "rem",
"CreatedAt": "2003-09-18T14:13:41.422697+02:00",
"LastChanged": "2004-04-18T14:13:41.422697+02:00",
"ReadByOwner": "2002-12-19T14:13:41.422697+01:00",
"ReadByCustomer": "1998-12-28T14:13:41.422697+01:00",
"FirstReadByOwner": "2020-05-06T14:13:41.422697+02:00",
"FirstReadByUser": "2003-03-20T14:13:41.422697+01:00",
"Activate": "2002-09-12T14:13:41.422697+02:00",
"ClosedAt": "2010-04-02T14:13:41.422697+02:00",
"RepliedAt": "2005-06-23T14:13:41.422697+02:00",
"AlertTimeout": "1999-05-29T14:13:41.422697+02:00",
"Deadline": "2010-08-21T14:13:41.422697+02:00",
"CreatedBy": null,
"Author": "alias",
"OwnedBy": null,
"Category": null,
"Slevel": "External",
"Priority": null,
"BaseStatus": "Active",
"Status": null,
"Origin": "AutoGenerated",
"Person": null,
"SecondaryPersons": [
{
"Position": "iste",
"PersonId": 259,
"Mrmrs": "consequatur",
"Firstname": "Alyson",
"Lastname": "Mann",
"MiddleName": "Bradtke-Cassin",
"Title": "nulla",
"Description": "Managed bifurcated analyzer",
"Email": "jonathan@schuster.biz",
"FullName": "Lura Sanford",
"DirectPhone": "1-795-067-0920",
"FormalName": "Blanda, Graham and Cassin",
"CountryId": 662,
"ContactId": 820,
"ContactName": "Bednar, VonRueden and Block",
"Retired": 287,
"Rank": 657,
"ActiveInterests": 489,
"ContactDepartment": "",
"ContactCountryId": 736,
"ContactOrgNr": "1336095",
"FaxPhone": "803-543-7490 x772",
"MobilePhone": "798-608-9608 x08239",
"ContactPhone": "(233)219-8623 x2157",
"AssociateName": "Marquardt LLC",
"AssociateId": 346,
"UsePersonAddress": false,
"ContactFax": "voluptas",
"Kanafname": "officia",
"Kanalname": "natus",
"Post1": "dignissimos",
"Post2": "aut",
"Post3": "consequatur",
"EmailName": "ceasar_schaefer@russel.com",
"ContactFullName": "Aryanna Philip Zboncak II",
"ActiveErpLinks": 12,
"TicketPriorityId": 229,
"SupportLanguageId": 756,
"SupportAssociateId": 168,
"CategoryName": "VIP Customer",
"PersonNumber": "1418954",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 895
}
}
}
],
"AlertLevel": 196,
"ConnectId": 144,
"ReadStatus": "Green",
"TimeToReply": 646,
"RealTimeToReply": 22,
"TimeToClose": 465,
"RealTimeToClose": 85,
"TimeSpentInternally": 288,
"TimeSpentExternally": 225,
"TimeSpentQueue": 369,
"RealTimeSpentInternally": 89,
"RealTimeSpentExternally": 260,
"RealTimeSpentQueue": 684,
"TimeSpent": 874,
"HasAttachment": false,
"NumReplies": 78,
"NumMessages": 218,
"FromAddress": "corporis",
"Messages": [
{
"TicketMessageId": 527,
"CreatedAt": "2014-12-07T14:13:41.422697+01:00",
"Slevel": "External",
"Important": false,
"Author": "quaerat",
"PersonId": 169,
"PersonFullName": "Pasquale Vandervort",
"ContactId": 971,
"ContactName": "Donnelly Group",
"ContactDepartment": "",
"NumAttachments": 211,
"EmailHeader": "aletha@kunze.us",
"MessageHeaders": [
{},
{}
],
"Language": "laudantium",
"Sentiment": 116,
"SentimentConfidence": 644,
"CreatedBy": 323,
"ChangedAt": "2021-12-01T14:13:41.422697+01:00",
"Badge": "Comment",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 892
}
}
}
],
"Tags": [
{
"Id": 672,
"Name": "Thompson Group",
"ToolTip": "Occaecati et totam.",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 641
}
}
},
{
"Id": 672,
"Name": "Thompson Group",
"ToolTip": "Occaecati et totam.",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 641
}
}
}
],
"Language": "ea",
"Sentiment": 170,
"SentimentConfidence": 997,
"SuggestedCategoryId": 608,
"SuggestedCategoryName": "VIP Customer",
"OrigHumanCategoryId": 974,
"IconHint": "consequatur",
"Sale": null,
"Project": null,
"FormSubmission": null,
"TicketType": null,
"ActiveStatusMonitorId": 201,
"ExtraFields": {
"ExtraFields1": "unde",
"ExtraFields2": "eligendi"
},
"CustomFields": {
"CustomFields1": "tempore",
"CustomFields2": "eum"
},
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 631
}
}
}