Aaron Schachter edited this page May 8, 2018 · 19 revisions

The Gambit Conversations Mongo database contains a conversations collection to store users' chatbot conversation states, and a messages collection for the corresponding inbound and outbound conversation messages. This data is exposed via GET /v1/conversations and GET /v1/messages resources, consumed by Gambit Admin.

Conversations and their messages are created via the Gambit Conversations POST /v2/messages endpoint:

Note: Our Front custom channels also make requests to POST /v2/messages?origin=support to send support messages to Users from agents in Front. See Support

Member messages

Replies to inbound messages are sourced from Rivescript defined in the /brain directory. Each /messages?origin=twilio request calls the Rivescript getReplyAsync function to find the reply defined in Rivescript. The member middleware parses the Rivescript reply, determining whether to return the Rivescript reply or call a macro.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.