Enables scripted content fragments to use Conversations
Properties
| Name | Access | Type | Description |
|---|---|---|---|
| ContentTypeId | Read | Guid | Content type identifier for conversations |
| Current | Read | Conversation | Current |
Methods
CanStartConversationWith
Identifies whether the accessing user can start a conversation with the provided user.
Velocity
#set($booleanResponse = $core_v2_conversation.CanStartConversationWith($userName))
JavaScript
var booleanResponse = core_v2_conversation.CanStartConversationWith(userName);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| userName | String | User Name | Required |
Returns
Create
Create Overload 1
Obsolete in 10: Use Create(body, usernames) instead. Obsolete in 10: Use Create(body, usernames) instead.
Velocity
#set($conversationResponse = $core_v2_conversation.Create($subject, $body, $usernames))
JavaScript
var conversationResponse = core_v2_conversation.Create(subject, body, usernames);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| subject | String | Obsolete in 10 | Required | ||
| body | String | Body of the conversation's first message | Required | ||
| usernames | String | One or more usernames to include in the conversation (comma separated). | Required |
Create Overload 2
Creates a new conversation
Velocity
#set($conversationResponse = $core_v2_conversation.Create($body, $usernames))
JavaScript
var conversationResponse = core_v2_conversation.Create(body, usernames);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| body | String | Body of the conversation's first message | Required | ||
| usernames | String | One or more usernames to include in the conversation (comma separated). | Required |
Returns
Delete
Delete/hide a conversation. The conversation will be deleted when all participants delete or leave the conversation. If any participant replies, all participants who deleted the conversation will see the full conversation again.
Velocity
#set($additionalInfoResponse = $core_v2_conversation.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_conversation.Delete(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to delete | Required |
Returns
Get
Get Overload 1
Gets a conversation
Velocity
#set($conversationResponse = $core_v2_conversation.Get($conversationId))
JavaScript
var conversationResponse = core_v2_conversation.Get(conversationId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Conversation identifier | Required |
Get Overload 2
Velocity
#set($conversationResponse = $core_v2_conversation.Get($usernames))
JavaScript
var conversationResponse = core_v2_conversation.Get(usernames);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| usernames | String | Usernames | Required |
Returns
HasLeft
Identifies if a participant has left the conversation.
Velocity
#set($booleanResponse = $core_v2_conversation.HasLeft($id, $userId))
JavaScript
var booleanResponse = core_v2_conversation.HasLeft(id, userId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id of the conversation | Required | ||
| userId | Number | The user ID of the participant to review. | Required |
Returns
Leave
Leave a conversation. The conversation will be deleted when all participants delete or leave the conversation. If any participant replies, participants who have left will not be reactivated in the conversation but can be reactivated manually by other participants.
Velocity
#set($additionalInfoResponse = $core_v2_conversation.Leave($id))
JavaScript
var additionalInfoResponse = core_v2_conversation.Leave(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to leave | Required |
Returns
List
List Overload 1
List conversations
Velocity
#set($pagedListResponse = $core_v2_conversation.List())
JavaScript
var pagedListResponse = core_v2_conversation.List();
List Overload 2
List conversations
Velocity
#set($pagedListResponse = $core_v2_conversation.List("%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg, ReadStatus = $readStatusArg }"))JavaScript
var pagedListResponse = core_v2_conversation.List({ PageIndex: pageIndexArg, PageSize: pageSizeArg, ReadStatus: readStatusArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | Options | Set of optional parameters including: | Required | ||
| PageIndex | Number | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
| PageSize | Number | Specify the number of results to return per page. | Optional | 20 | |
| ReadStatus | String | Read Status | Optional | NotSet | NotSet, Read, Unread |
Returns
MarkAsRead
Mark a conversation as read
Velocity
$core_v2_conversation.MarkAsRead($id)
JavaScript
core_v2_conversation.MarkAsRead(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to mark as read | Required |
Returns
NothingMarkAsUnread
Mark a conversation as unread
Velocity
$core_v2_conversation.MarkAsUnread($id)
JavaScript
core_v2_conversation.MarkAsUnread(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to mark as unread | Required |
Returns
NothingReadCount
Number of read conversations.
Velocity
#set($numberResponse = $core_v2_conversation.ReadCount())
JavaScript
var numberResponse = core_v2_conversation.ReadCount();
Returns
Restore
Restore a participant who has left the conversation. If the requestor can start a conversation with the requested user and the user had previously left the conversation, the requested user will be restored in the conversation.
Velocity
#set($additionalInfoResponse = $core_v2_conversation.Restore($id, $userId))
JavaScript
var additionalInfoResponse = core_v2_conversation.Restore(id, userId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id of the conversation | Required | ||
| userId | Number | The user ID of the partipiant who left that should be restored. | Required |
Returns
ToString
Velocity
#set($stringResponse = $core_v2_conversation.ToString())
JavaScript
var stringResponse = core_v2_conversation.ToString();
Returns
UnreadCount
Number of unread conversations.
Velocity
#set($numberResponse = $core_v2_conversation.UnreadCount())
JavaScript
var numberResponse = core_v2_conversation.UnreadCount();