Inbox scripting

This page documents how the relation is between the inbox of the studio and the script of the bot. When certain buttons in the inbox user interface are pushed, events are sent to the running conversation, so that the bot can do the right thing and present the correct user interface to the user.

These events are the following:

  • $operator_join - when the operator joins the chat and is about to start chatting
  • $operator_leave - when the operator leaves the chat, or goes offline
  • $operator_action - when the operator says something
  • $inbox_assign - when an operator assigns themselves to the chat.
  • $inbox_unassign - when an operator unassigns themselves.
  • $inbox_close - when the conversation is marked Closed in the inbox UI
  • $inbox_set_role_tag - when a conversation is handed over to another team (role tag). The role tag is given in the event's payload.