PUT ChatSession/{id}
Some tooltip text!
• 9 minutes to read
• 9 minutes to read
PUT /api/v1/ChatSession/{id}
Updates the existing ChatSessionEntity
NsApiSlow threshold: 5000 ms.
| Path Part | Type | Description |
|---|---|---|
| id | int32 | The ChatSessionEntity id to update. Required |
Query String Parameters
| Parameter Name | Type | Description |
|---|---|---|
| $select | string | Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category" Default = show all fields. |
PUT /api/v1/ChatSession/{id}?$select=name,department,category/id
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 ChatSessionEntity to be saved.
| Property Name | Type | Description |
|---|---|---|
| ChatSessionId | Integer | The primary key (auto-incremented) |
| TopicId | Integer | The reference to the associated chat topic. |
| User | Associate | User agent handling this session |
| Person | Person | Customer person in this session - could be empty if we don't know exactly. |
| CustomerAlias | String | The alias for the customer. |
| CustomerHost | String | The hostname or IP address for the customer. |
| CustomerName | String | The name of customer, if provided |
| CustomerEmail | String | The email address of the customer, if provided |
| CustomerPhone | String | The phone number of the customer, if provided |
| CustomerConsented | Boolean | The customer consented when starting the session |
| CustomerCompanyName | String | The name of the customers company, if provided |
| Status | String | Enum indicating the status for the session (pending, active, closed, etc). |
| FirstMessage | String | A copy of the first message in the chat session |
| LastMessage | String | A copy of the last message in the chat session |
| WhenRequested | String | When the session was requested by the customer. |
| WhenStarted | String | When the session was accepted by a user. |
| WhenEnded | String | When the session was ended. |
| WhenIdle | String | The last time anyone sent a message for this session. |
| WhenFetched | String | The last time the customer's client refetched the data. Used to detect 'dead' session. |
| SessionKey | String | Key used to authenticate the session. |
| InitialQueuePos | Integer | The initial queue pos (i.e. the number of pending sessions + 1) when the session was requested. |
| AlertLevel | Integer | The alert level for this chat session. |
| Rank | Integer | Lowest possible unique number for active sessions for user. User for color index. Starting at 1. |
| Flags | String | Various flags for the chat session |
| Contact | Contact | Contact this session is connected to - could be empty if we don't know exactly. |
| Project | Project | Project the session is connectedto - could be empty if we don't know exactly. |
| Sale | Sale | Sale the session is connected to - could be empty if we don't know exactly. |
| Ticket | Ticket | Ticket the session is connected to - could be empty if we don't know exactly. |
| TransferTo | Associate | User agent that has a pending transfer of the chat session |
| ChatbotIsActive | Boolean | Indicates that a chatbot is active on the session. This will cause bot triggers to fire. Set to 0 when bot hands off to user. |
| Rating | Integer | Rating of this chat conversation given by the customer |
Response:
ChatSessionEntity updated.
| Response | Description |
|---|---|
| 200 | ChatSessionEntity updated. |
| 400 | Bad request. Entity to save is not in request body. |
Response body: ChatSessionEntityWithLinks
| Property Name | Type | Description |
|---|---|---|
| ChatSessionId | int32 | The primary key (auto-incremented) |
| TopicId | int32 | The reference to the associated chat topic. |
| User | Associate | User agent handling this session |
| Person | Person | Customer person in this session - could be empty if we don't know exactly. |
| CustomerAlias | string | The alias for the customer. |
| CustomerHost | string | The hostname or IP address for the customer. |
| CustomerName | string | The name of customer, if provided |
| CustomerEmail | string | The email address of the customer, if provided |
| CustomerPhone | string | The phone number of the customer, if provided |
| CustomerConsented | bool | The customer consented when starting the session |
| CustomerCompanyName | string | The name of the customers company, if provided |
| Status | string | Enum indicating the status for the session (pending, active, closed, etc). |
| FirstMessage | string | A copy of the first message in the chat session |
| LastMessage | string | A copy of the last message in the chat session |
| WhenRequested | date-time | When the session was requested by the customer. |
| WhenStarted | date-time | When the session was accepted by a user. |
| WhenEnded | date-time | When the session was ended. |
| WhenIdle | date-time | The last time anyone sent a message for this session. |
| WhenFetched | date-time | The last time the customer's client refetched the data. Used to detect 'dead' session. |
| SessionKey | string | Key used to authenticate the session. |
| InitialQueuePos | int32 | The initial queue pos (i.e. the number of pending sessions + 1) when the session was requested. |
| AlertLevel | int32 | The alert level for this chat session. |
| Rank | int32 | Lowest possible unique number for active sessions for user. User for color index. Starting at 1. |
| Flags | string | Various flags for the chat session |
| Contact | Contact | Contact this session is connected to - could be empty if we don't know exactly. |
| Project | Project | Project the session is connectedto - could be empty if we don't know exactly. |
| Sale | Sale | Sale the session is connected to - could be empty if we don't know exactly. |
| Ticket | Ticket | Ticket the session is connected to - could be empty if we don't know exactly. |
| TransferTo | Associate | User agent that has a pending transfer of the chat session |
| ChatbotIsActive | bool | Indicates that a chatbot is active on the session. This will cause bot triggers to fire. Set to 0 when bot hands off to user. |
| Rating | int32 | Rating of this chat conversation given by the customer |
| TableRight | TableRight | The carrier's table right |
| FieldProperties | object | Field property dictionary mapping field names to field access rights. |
| _Links | object |
Sample request
PUT /api/v1/ChatSession/{id}
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: en
Content-Type: application/json; charset=utf-8
{
"ChatSessionId": 208,
"TopicId": 529,
"User": null,
"Person": null,
"CustomerAlias": "quis",
"CustomerHost": "ullam",
"CustomerName": "Graham-Streich",
"CustomerEmail": "toy_pacocha@cruickshank.info",
"CustomerPhone": "574.602.6320 x13321",
"CustomerConsented": true,
"CustomerCompanyName": "Funk-Stiedemann",
"Status": "Closed",
"FirstMessage": "optio",
"LastMessage": "ab",
"WhenRequested": "2011-06-17T14:34:01.5621812+02:00",
"WhenStarted": "2004-02-13T14:34:01.5621812+01:00",
"WhenEnded": "2010-12-03T14:34:01.5621812+01:00",
"WhenIdle": "1999-06-23T14:34:01.5621812+02:00",
"WhenFetched": "2009-02-13T14:34:01.5621812+01:00",
"SessionKey": "iste",
"InitialQueuePos": 526,
"AlertLevel": 310,
"Rank": 978,
"Flags": "CustomerIsTyping",
"Contact": null,
"Project": null,
"Sale": null,
"Ticket": null,
"TransferTo": null,
"ChatbotIsActive": false,
"Rating": 680
}
Sample response
HTTP/1.1 200 ChatSessionEntity updated.
Content-Type: application/json; charset=utf-8
{
"ChatSessionId": 948,
"TopicId": 220,
"User": null,
"Person": null,
"CustomerAlias": "rem",
"CustomerHost": "labore",
"CustomerName": "Conn LLC",
"CustomerEmail": "aurore_towne@okuneva.uk",
"CustomerPhone": "(124)181-9770 x0732",
"CustomerConsented": false,
"CustomerCompanyName": "Fay Inc and Sons",
"Status": "Closed",
"FirstMessage": "sed",
"LastMessage": "aspernatur",
"WhenRequested": "2023-02-25T14:34:01.565754+01:00",
"WhenStarted": "2018-06-09T14:34:01.565754+02:00",
"WhenEnded": "2007-01-18T14:34:01.565754+01:00",
"WhenIdle": "2022-07-25T14:34:01.565754+02:00",
"WhenFetched": "2003-02-22T14:34:01.565754+01:00",
"SessionKey": "itaque",
"InitialQueuePos": 302,
"AlertLevel": 779,
"Rank": 869,
"Flags": "CustomerIsTyping",
"Contact": null,
"Project": null,
"Sale": null,
"Ticket": null,
"TransferTo": null,
"ChatbotIsActive": false,
"Rating": 608,
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 806
}
},
"_Links": {
"Self": "https://www.example.com/api/v1/project/321",
"Archive": "https://www.example.com/api/v1/project"
}
}