Enables scripted content fragments to use ConversationMessages
Properties
| Name | Access | Type | Description |
|---|---|---|---|
| ContentTypeId | Read | Guid | The content type for conversation messages |
| NotificationTypeId | Read | Guid | The default notification type id for conversation messagees |
Methods
Create
Create Overload 1
Creates a new conversation
Velocity
#set($conversationMessageResponse = $core_v2_conversationMessage.Create($conversationId, $body))
JavaScript
var conversationMessageResponse = core_v2_conversationMessage.Create(conversationId, body);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of the conversation | Required | ||
| body | String | Body of the conversation | Required |
Create Overload 2
Creates a new conversation message
Velocity
#set($conversationMessageResponse = $core_v2_conversationMessage.Create($conversationId, $body, "%{ Subject = $subjectArg }"))JavaScript
var conversationMessageResponse = core_v2_conversationMessage.Create(conversationId, body, { Subject: subjectArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of the conversation | Required | ||
| body | String | Body of the message | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| Subject | String | Subject of the message. Obsolete in v10.0: Subject is no longer used. | Optional |
Returns
Delete
Delete a conversation message
Velocity
#set($additionalInfoResponse = $core_v2_conversationMessage.Delete($conversationId, $id))
JavaScript
var additionalInfoResponse = core_v2_conversationMessage.Delete(conversationId, id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of the parent conversation | Required | ||
| id | Guid | Id of the conversation message | Required |
Returns
Get
Get a conversation message
Velocity
#set($conversationMessageResponse = $core_v2_conversationMessage.Get($id))
JavaScript
var conversationMessageResponse = core_v2_conversationMessage.Get(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id | Required |
Returns
List
List Overload 1
List conversation messages for a conversation
Velocity
#set($pagedListResponse = $core_v2_conversationMessage.List($conversationId))
JavaScript
var pagedListResponse = core_v2_conversationMessage.List(conversationId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of a conversation | Required |
List Overload 2
List conversation messages for a conversation
Velocity
#set($pagedListResponse = $core_v2_conversationMessage.List($conversationId, "%{ EndDate = $endDateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortOrder = $sortOrderArg, StartDate = $startDateArg }"))JavaScript
var pagedListResponse = core_v2_conversationMessage.List(conversationId, { EndDate: endDateArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortOrder: sortOrderArg, StartDate: startDateArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of a conversation | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| EndDate | DateTime | Requires messages be older than this date | Optional | ||
| PageIndex | Int32 | Zero-based | Optional | 0 | |
| PageSize | Int32 | Amount of messages to return per page | Optional | 20 | |
| SortOrder | String | Ascending or Descending | Optional | Ascending | Ascending, Descending |
| StartDate | DateTime | Requires messages be newer than this date | Optional |
Returns
Search
List conversation messages for a conversation
Velocity
#set($pagedListResponse = $core_v2_conversationMessage.Search("%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg, Query = $queryArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))JavaScript
var pagedListResponse = core_v2_conversationMessage.Search({ PageIndex: pageIndexArg, PageSize: pageSizeArg, Query: queryArg, SortBy: sortByArg, SortOrder: sortOrderArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | Options | Set of optional parameters including: | Required | ||
| PageIndex | Int32 | Zero-based | Optional | 0 | |
| PageSize | Int32 | Amount of messages to return per page | Optional | 20 | |
| Query | String | Text to search. Required. | Optional | ||
| SortBy | String | Specify how results are sorted | Optional | score | date, score |
| SortOrder | String | Specify what order results are sorted | Optional | desc | asc, ascending, desc, descending |