[][src]Function csml_engine::start_conversation

pub fn start_conversation(
    request: CsmlRequest,
    bot: CsmlBot
) -> Result<Map<String, Value>, EngineError>

Initiate a CSML chat request. Takes 2 arguments: the request being made and the CSML bot. This method assumes that the bot is already validated in advance. A best practice is to pre-validate the bot and store it in a valid state.

The request must be made by a given client. Its unicity (used as a key for identifying who made each new request and if they relate to an already-open conversation) is based on a combination of 3 parameters that are assumed to be unique in their own context:

  • bot_id: differentiate bots handled by the same CSML engine instance
  • channel_id: a given bot may be used on different channels (messenger, slack...)
  • user_id: differentiate users on the same communication channel