A single chat session between a person and an AI assistant, recorded so conversations can be listed, resumed and counted per organisation. The chat id is the identifier the app uses for the conversation, and the app name records which app opened it. The chatter is either a Kademi profile or, where there is no profile such as an anonymous website visitor, the free text user id.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| appData | String | Free-form data the creating app stores against the conversation, typically JSON, limited to 5000 characters. The platform does not interpret it. Null when the app has stored nothing. |
| appName | String | The name of the app that created this conversation, used to keep chats from different apps apart. |
| chatId | String | The identifier the app uses for this conversation, which is how the messages of a chat are tied back to it. Distinct from the database id. |
| chatTitle | String | Display title for the conversation, as shown in a list of past chats. Free text, and null until a title has been given or generated. |
| createdDate | Date | When the conversation was started, as a timestamp. This is the field the per-organisation conversation counts are filtered on. Never null. |
| id | long | The database identifier of this conversation record. |
| profile | Profile | The Kademi profile having the conversation. Null for a chatter with no profile, in which case the user id identifies them instead. |
| userId | String | Identifies the chatter when there is no Kademi profile on the conversation, for example an anonymous website visitor. Ignore it where the profile is set. |
Methods
getId() · getChatId() · setChatId(String chatId) · getChatTitle() · setChatTitle(String chatTitle) · getAppName() · setAppName(String appName) · getAppData() · setAppData(String appData) · getUserId() · setUserId(String userId) · getProfile() · setProfile(Profile profile) · setOrganisation(Organisation organisation) · getCreatedDate() · setCreatedDate(Date createdDate)
getId()
Returns: long
The database identifier of this conversation record.
getChatId()
Returns: String
The identifier the app uses for this conversation, which is how the messages of a chat are tied back to it. Distinct from the database id.
setChatId(String chatId)
Returns: void
Sets the identifier the app uses for this conversation.
| Parameter | Description |
|---|---|
chatId | the app's identifier for the conversation |
getChatTitle()
Returns: String
Display title for the conversation, as shown in a list of past chats. Free text, and null until a title has been given or generated.
setChatTitle(String chatTitle)
Returns: void
Sets the display title for the conversation.
| Parameter | Description |
|---|---|
chatTitle | the conversation title |
getAppName()
Returns: String
The name of the app that created this conversation, used to keep chats from different apps apart.
setAppName(String appName)
Returns: void
Sets the name of the app that created this conversation.
| Parameter | Description |
|---|---|
appName | the creating app's name |
getAppData()
Returns: String
Free-form data the creating app stores against the conversation, typically JSON, limited to 5000 characters. The platform does not interpret it. Null when the app has stored nothing.
setAppData(String appData)
Returns: void
Sets the free-form data the creating app stores against the conversation.
| Parameter | Description |
|---|---|
appData | the app's own data, at most 5000 characters, or null for none |
getUserId()
Returns: String
Identifies the chatter when there is no Kademi profile on the conversation, for example an anonymous website visitor. Ignore it where the profile is set.
setUserId(String userId)
Returns: void
Sets the fallback identifier for the chatter, used when there is no profile.
| Parameter | Description |
|---|---|
userId | the fallback identifier for the chatter |
getProfile()
Returns: Profile
The Kademi profile having the conversation. Null for a chatter with no profile, in which case the user id identifies them instead.
setProfile(Profile profile)
Returns: void
Sets the Kademi profile having the conversation.
| Parameter | Description |
|---|---|
profile | the profile having the conversation, or null if there is none |
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation the conversation belongs to.
| Parameter | Description |
|---|---|
organisation | the owning organisation |
getCreatedDate()
Returns: Date
When the conversation was started, as a timestamp. This is the field the per-organisation conversation counts are filtered on. Never null.
setCreatedDate(Date createdDate)
Returns: void
Sets when the conversation was started.
| Parameter | Description |
|---|---|
createdDate | the date and time the conversation was created |