This site is no longer updated.Go to new Conversational Cloud docs

e


Description

e — is used for a single example, a reference a user request is to be compared to. One tag is one reply.

A local tag. It is only triggered in a certain context upon a switch from a parent state.


Value type

  • multiline string

Parameters

  • fromState (string) — defines a state from which the transition is possible.
  • toState (string) — defines a state to which the transition is possible.
  • onlyThisState (boolean) — if true, the transition to a state can only be made from the state specified in the fromState flag, not from the child states. The default is false.

Learn more about context managing


Nested data

  • multiline data

How to use

  • Simple example of use:
e: When will my order arrive?

Or you can use multiple tags to add multiple examples to the state:

e: Where is the courier?
e: Where is my order?
e: The order is taking too long to arrive.

  • Example of using fromState, onlyThisState flags:
state: Main
    q!: $regex</start>
    a: Hello. Please write your name and surname

    state: Name
        intent: /name
        a: Thanks! Please send your photo to receive the form.

    state: SendFile || modal=true
     event: sendFile
     a: Sending form

state: CantSend
    e: Can't attach the file || fromState=/Main/SendFile , onlyThisState=true
    a: Please check the size of attached file and try again

In this script bot will switch states from SendFile to CantSend as soon as he receives a message from client Can't attach the file. The transition to CantSend is only possible from state /Main/SendFile as onlyThisState = true flag was set.