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

intentGroup!


The intentGroup! trigger tag declares nested intents by which the dialog can enter a state. The parent intent, specified after the tag, does not activate the state.

If you want the dialog to enter a state by the parent intent, use a separate intent! tag for it:

state:
    intentGroup!: /Example
    intent!: /Example

intentGroup! is a global tag: transitions by this tag can be made from anywhere in the script.

Value

A path to the intent is specified after the tag. Within the path, / is a separator between nesting levels:

  • /hi — the path consists of the / character and the intent name.
  • /hi/politely — a nested intent. There is no upper limit to the nesting depth.

How to use

Connecting the bot knowledge base to the script:

state: KnowledgeBase
    intentGroup!: /KnowledgeBase
    script: $faq.pushReplies();

By default, the state activated by the intent with the highest weight is triggered. But if you use intentGroup or intentGroup! together with intent or intent!, the state triggering priority can change.

Let’s look at the script example below, assuming the /KnowledgeBase/FAQ.Courses/Price intent is recognized:

  • The PriceInt state will be activated because it has the intent! tag. It will have the highest priority.
  • The priority of the FAQ.Courses state will be lower because it can only be activated by the intentGroup! tag.
  • The AllFaqs state will have the lowest priority because it is activated by the most general group.
  • The Price state will not activated at all: KnowledgeBase/FAQ.Courses/Price is the parent intent.
state: AllFaqs
    intentGroup!: /KnowledgeBase
    a: I found the answer in my knowledge base.
    script: $faq.pushReplies();

state: FAQ.Courses
    intentGroup!: /KnowledgeBase/FAQ.Courses
    a: Are you interested in our courses? I found the answer for you.
    script: $faq.pushReplies();

state: Price
    intentGroup!: /KnowledgeBase/FAQ.Courses/Price
    script: $faq.pushReplies();

state: PriceInt
    intent!: /KnowledgeBase/FAQ.Courses/Price
    script: $faq.pushReplies();