Manipulate conversation
This allows you to manipulate the conversation in the same way you would when responding to a webhook request. You can send a reply, add a topic, and/or hand off the conversation. Each property in the body is optional. If you only want to send a message, you can send {"sendMessage": {"text": "Hi!"}}. If you want to apply a topic and complete, but not send a message, you can, for example, send {"applyTopics":["Spam"], "complete": "RESOLVED"}.
Note that only topics that match a topic in the platform exactly (case insensitive) will be applied to the conversation. Non-existing topics are ignored. Currently, no fuzzy matching will occur and typographical errors will result in a non-existing topic.
The same applies to tags. Only tags that match a tag in the platform exactly (case insensitive) will be applied to a specific message. Non-existing tags are ignored. You must specify the messageId when using the REST API. The messageId is part of every INBOUND_MESSAGE_RECEIVED event.
If you want to send an attachment, you must first upload the attachment in a separate call (PUT /inbox/v1/virtual-agent/conversations/{conversationId}/attachments/{filename}), and then use the file name when sending the message ({"sendMessage": {"attachment": ""}}).
If the contact already has a value saved for the attribute definition with a particular alias, the update will be ignored. If any of the attribute definitions are configured as CRM lookup values, a CRM lookup is performed after the attributes are set. For the best performance, we recommend setting contact attributes along with the response to indicate that the conversation is completed. Note that the virtual agent will not receive the new attributes from the CRM response until the next CONVERSATION_STARTED or CONVERSATION_DELEGATED event is received for a conversation with a contact.
Request
- Base URLhttps://platform.hootsuite.com
- URLhttps://platform.hootsuite.com/inbox/v1/virtual-agent/conversations/{conversationId}
- AuthOAuth 2Authorization code: https://platform.hootsuite.com/oauth2/authToken URL: https://platform.hootsuite.com/oauth2/token
Path parameters
Id of the conversation to manipulate. This can be retrieved from the webhook payload.
Request body
Example request
{
"sendMessages": [
{
"text": "Hi! How can I help you?",
"attachment": "funny_cat.gif"
}
],
"sendMessage": {
"text": "Hi! How can I help you?",
"attachment": "funny_cat.gif"
},
"applyTopics": [
"Hotel Reservation"
],
"applyTags": [
"Happy"
],
"applyConversationNotes": [
{
"text": "Some note to add"
}
],
"setContactAttributes": {
"account_number": "19758293529351"
}
}Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.