Enables scripted content fragments to use Conversations
- Properties
- CanStartConversationWith
- Create
- Delete
- Get
- HasLeft
- Leave
- List
- MarkAsRead
- MarkAsUnread
- ReadCount
- Restore
- UnreadCount
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
Boolean
Create
Create Overload 1
Creates a new conversation. Obsolete in v.10.0: Subject is no longer used. 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 | Subject of the conversation's first message. Obsolete in v.10.0: Subject is no longer saved. | 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 | Int32 | The user ID of the participant to review. | Required |
Returns
Boolean
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 | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | 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($int32Response = $core_v2_conversation.ReadCount())
JavaScript
var int32Response = core_v2_conversation.ReadCount();
Returns
Int32
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 | Int32 | The user ID of the partipiant who left that should be restored. | Required |
Returns
UnreadCount
Number of unread conversations.
Velocity
#set($int32Response = $core_v2_conversation.UnreadCount())
JavaScript
var int32Response = core_v2_conversation.UnreadCount();
Returns
Int32