Microbots

These are small state machines in Bot compiler which perform a small task in the dialog tree. Every microbot must have a start state, and each state can have transitions. The events associated with the transitions are the intents to which the user intents is mapped. Each state must specify it's action when it is entered in the start state.

Example

Consider pizza bot - when the user says "yeah" or "yes" or "yup" it is mapped to _yes _intent and to handle it in the current state define a transition with key as yes. More about what can be done in the transition here.

States

Each state has an action and transitions associated with it. Action is what needs to be done when that state is entered and transitions are what actions needs to be taken on that intent when the bot is in this state of this microbot. In the example below, the state is specifying actions to three intents 'yes, no, string' . Any intent other than these will be handled as specified in th the Conversation Tree.

Example

{
  "name": "start",
  "response": {
    "type": "text",
    "value": "We have pizzas, toppings available are onion, mushroom, tomato. Would you like to see what breverages we have?"
  },
  "transitions": [
    {
      "name": "yes",
      "nextState": "showDrinks"
    },
    {
      "name": "no",
      "reply": "Okay"
    },
    {
      "name": "string",
      "reply": "I did not quite get that, do you want extra breverage?"
    }
  ]
}

results matching ""

    No results matching ""