Interface ConversationsService
public interface ConversationsService
Service for working with the conversation log
- Since:
- 1.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(CreateConversationRequest request) Creates a new empty conversation.void
Deletes a conversation together with all the messages sent as part of the conversation.Retrieves a conversation by id.injectEvent
(String conversationId, InjectEventRequest request) This operation injects a conversation event into a specific conversation.void
injectMessage
(String conversationId, InjectMessageRequest request) This operation injects a conversation message in to a specific conversation.list
(ConversationsListRequest request) This operation lists all conversations that are associated with an app and/or a contact.listRecent
(ConversationsListRecentRequest request) This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation.void
stopActive
(String conversationId) This operation stops the referenced conversation, if the conversation is still active.update
(String conversationId, MetadataUpdateStrategy updateStrategy, Conversation request) This operation updates a conversation which can, for instance, be used to update the metadata associated with a conversation.
-
Method Details
-
create
Creates a new empty conversation.It is generally not needed to create a conversation explicitly since sending or receiving a message automatically creates a new conversation if it does not already exist between the given app and contact.
Creating empty conversation is useful if the metadata of the conversation should be populated when the first message in the conversation is a contact message or the first message in the conversation comes out-of-band and needs to be injected with InjectMessage.
- Parameters:
request
- Conversation request for creation- Returns:
- Created conversation
- Since:
- 1.3
-
get
Retrieves a conversation by id. A conversation has two participating entities, an app and a contact.- Parameters:
conversationId
- The unique ID of the conversation.- Returns:
- Conversation details
- Since:
- 1.3
-
list
This operation lists all conversations that are associated with an app and/or a contact.- Parameters:
request
- Request parameters- Since:
- 1.3
-
listRecent
This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation.- Parameters:
request
- Request parameters- Since:
- 1.3
-
stopActive
This operation stops the referenced conversation, if the conversation is still active.A new conversation will be created if a new message is exchanged between the app or contact that was part of the stopped conversation.
- Parameters:
conversationId
- The unique ID of the conversation.- Since:
- 1.3
-
delete
Deletes a conversation together with all the messages sent as part of the conversation.- Parameters:
conversationId
- The unique ID of the conversation.- Since:
- 1.3
-
update
Conversation update(String conversationId, MetadataUpdateStrategy updateStrategy, Conversation request) This operation updates a conversation which can, for instance, be used to update the metadata associated with a conversation.- Parameters:
request
- Conversation instance with fields to be updated- Returns:
- Update conversation
- Since:
- 1.3
-
injectMessage
This operation injects a conversation message in to a specific conversation.- Parameters:
conversationId
- The ID of the conversation.request
- Request parameters to inject message- Since:
- 1.3
-
injectEvent
This operation injects a conversation event into a specific conversation.- Parameters:
conversationId
- The ID of the conversation.request
- Request parameters to inject event- Since:
- 1.3
-