ConversationPart

A reply of a conversation (user’s reply, operator’s reply, assignment reply, conversation note, adding a tag etc.)

Standard object fields

  • id: ID
    Unique reply identifier.

  • created: timestamp
    Reply creation time.

  • edited: Optional[timestamp]
    Last time the reply has been edited. If it hasn't - null.

  • removed: Optional[timestamp]
    Time the reply has been removed (as a result of GDPR removal for instance). null if not removed.

  • conversation: ID
    If not included manually, this fields will contain conversation identifier this reply is attached to.

  • part_group: ID
    Question ID (ConversationPartGroup), this reply is attached to.

  • body: str
    Reply text if it expects some content. If not - empty string.

  • body_json: Dict
    Some reply types require complex structure of body. For instance, pop-ups created with builder. There content is passed as a complex dictionary in this field.

  • direction: str
    Deprecated. It is better to use reply type instead (type field). Reply direction: whether it was sent from operator to user (a2u) or back (u2a).

  • type: string
    Reply type. Options are:

    • reply_user - chat user reply from chat or messenger
    • reply_admin - operator reply (or administrator)
    • auto_reply - automatic reply sent by our system
    • note - operator's note not seen to user
    • tag_added, tag_deleted - system reply of adding/deleting a tag
    • assigned - system reply about operator assigned/remove from conversation
    • closed - system reply about closing the conversation
    • final_closed - deprecated. System reply, marking a question has been answered
    • delayed - system reply, indicating that conversation has been delayed
    • channel_changed - system reply, indicating that channel of the conversation has changed
    • vote - system reply which give user ability to leave vote about support quality
    • article - operator reply with knowledge base article
    • chat_bot_admin - chat-bot reply which does not expect any action from the user
    • chat_bot_user - chat-bot reply expecting some action from the user (buttons, type field, link etc.)
    • service - system reply with service actions (from integration, for instance)
  • from
    Depending on reply type it can be:

  • sent_via: str
    Reply source. Options are:

    • web_user - sent via our chat by user
    • email_user - sent via email by user
    • web_panel - sent via web admin panel by operator
    • email_admin - sent via email by operator (as a response to user's message)
    • app_android, app_ios, app_chrome, app_desktop - sent via Android/iOS/Chrome/Windows application by operator
    • message_auto, message_manual, message_chat_bot - sent as auto or manual message or chat bot
    • api - sent via API
    • integrations - sent via integrations
    • system - sent by system (usually, conversation type=service)
    • auto_reply - sent by system as auto reply to user reply
    • Other values can be present, for example, concrete integration names
  • meta_data: Dict
    Additional data, different for different reply types. Can contain information about vote left, user action in chat bots etc.

  • reply_type: str
    Reply type expected as answer for this reply.
    Options: text, email, phone, no.

  • actions: Optional[Array[Action]]
    Array of objects, describing actions which can be performed by user in this reply. Used by chat bots for buttons, type fields etc.

  • external_id: Optional[str]
    Reply Id in external integration, if it has been sent via such service.

Опциональные поля объекта

  • conversation: Conversation
    If field is enabled explicitly, Conversation object is returned.

  • assignee: Admin
    This field is present only for reply with type="assigned". Admin object describing operator to whom this conversation has been assigned.

  • tag: str
    This field is present only for reply with type="tag_added" or type="tag_deleted". Tag name the operation is performed with.

  • channel: ID / 0
    This field is present only for reply with type="channel_changed". Channel ID, to which conversation is put. 0 means channel removal.

  • inbound_email: ID
    ID of InboundEmail object, describing original e-mail if it has been sent through email.

  • read: boolean
    Whether reply has been read or not. This is not sent for operator or system replies.

  • first: boolean
    If reply is first in Conversation or not. Is present only for first replies.

  • attachments: Array[Attachment] Attachment objects array. Attachments to reply. It is returned only if there is at least one attachment.

  • random_id: str
    This fields is used in order to match reply received from Realtime services and reply creation request result. This field is returned only for Web API requests which create replies which send random_id parameter.

Example

{
  "id": 2030901,
  "created": 1436620221,
  "first": true,
  "conversation": 1882298,
  "body": "Hello",
  "from": {
    ...
  },
  "read": false,
  "type": "reply_django_user",
  "sent_via": "web_panel",
  "inbound_email": 123,
  "attachments": [{
    ...
  }]
}