Use Chatter in Apex to get, send, search, and reply to messages. You can also get and search conversations, mark conversations as read, and get a count of unread messages.
The following are methods for ChatterMessages. All methods are static.
29.0
Yes
public static ConnectApi.ChatterConversation getConversation(String conversationId)
29.0
Yes
public static ConnectApi.ChatterConversation getConversation(String conversationId, String pageParam, Integer pageSize)
30.0
Yes
public static ConnectApi.ChatterConversation getConversation(String communityId, String conversationId)
Type: ConnectApi.ChatterConversation
A Chatter conversation and the related metadata.
30.0
Yes
public static ConnectApi.ChatterConversation getConversation(String communityId, String conversationId, String pageParam, String pageSize)
29.0
Yes
public static ConnectApi.ChatterConversationPage getConversations()
29.0
Yes
public static ConnectApi.ChatterConversationPage getConversations(String pageParam, Integer pageSize)
30.0
Yes
public static ConnectApi.ChatterConversationPage getConversations(String communityId)
Type: ConnectApi.ChatterConversationPage
A list of Chatter conversations on a specific page.
30.0
Yes
public static ConnectApi.ChatterConversationPage getConversations(String communityId, String pageParam, Integer pageSize)
29.0
Yes
public static ConnectApi.ChatterMessage getMessage(String messageId)
30.0
Yes
public static ConnectApi.ChatterMessage getMessage(String communityId, String messageId)
29.0
Yes
public static ConnectApi.ChatterMessagePage getMessages()
29.0
Yes
public static ConnectApi.ChatterMessagePage getMessages(String pageParam, Integer pageSize)
30.0
Yes
public static ConnectApi.ChatterMessagePage getMessages(String communityId)
30.0
Yes
public static ConnectApi.ChatterMessagePage getMessages(String communityId, String pageParam, Integer pageSize)
29.0
Yes
public static ConnectApi.UnreadConversationCount getUnreadCount()
30.0
Yes
public static ConnectApi.UnreadConversationCount getUnreadCount(String communityId)
29.0
Yes
public static ConnectApi.ChatterConversationSummary markConversationRead(String conversationId, Boolean read)
30.0
Yes
public static ConnectApi.ChatterConversationSummary markConversationRead(String communityId, String conversationID, Boolean read)
Type: ConnectApi.ChatterConversationSummary
The summary of a Chatter conversation, including the members of the conversation, Chatter REST API URL, and contents of the latest message.
29.0
Yes
public static ConnectApi.ChatterMessage replyToMessage(String text, String inReplyTo)
29.0
Yes
public static ConnectApi.ChatterConversation searchConversation(String conversationId, String q)
29.0
Yes
public static ConnectApi.ChatterConversation searchConversation(String conversationId, String pageParam, Integer pageSize, String q)
30.0
Yes
public static ConnectApi.ChatterConversation searchConversation(String communityId, String conversationId, String q)
Type: ConnectApi.ChatterConversation
A Chatter conversation and the related metadata.
30.0
Yes
public static ConnectApi.ChatterConversation searchConversation(String communityId, String conversationId, String pageParam, Integer pageSize, String q)
Type: ConnectApi.ChatterConversation
A Chatter conversation and the related metadata.
29.0
Yes
public static ConnectApi.ChatterConversationPage searchConversations(String q)
29.0
Yes
public static ConnectApi.ChatterConversationPage searchConversations(String pageParam, Integer pageSize, String q)
30.0
Yes
public static ConnectApi.ChatterConversationPage searchConversations(String communityId, String q)
Type: ConnectApi.ChatterConversationPage
A list of Chatter conversations on a specific page.
30.0
Yes
public static ConnectApi.ChatterConversationPage searchConversations(String communityId, String pageParam, Integer pageSize, String q)
Type: ConnectApi.ChatterConversationPage
A list of Chatter conversations on a specific page.
29.0
Yes
public static ConnectApi.ChatterMessagePage searchMessages(String q)
29.0
Yes
public static ConnectApi.ChatterMessagePage searchMessages(String pageParam, Integer pageSize, String q)
30.0
Yes
public static ConnectApi.ChatterMessagePage searchMessages(String communityId, String pageParam, Integer pageSize, String q)
29.0
Yes
public static ConnectApi.ChatterMessage sendMessage(String text, String recipients)