Turns and intents
Turns settings
Settings include a turn name, whether the turn exhibits starting and/or open behavior, and interpreter selection.
Clicking "Add new condition" opens the New Condition area.
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FyVeaAKWk6cJHY822FwzC%252F2023-05-18_15-25-33.png%3Falt%3Dmedia%26token%3D4c4fc420-d548-421d-808b-3c4ee02732c2&width=768&dpr=4&quality=100&sign=4e197654&sv=1)
Conditions allow you to check values of attributes within contexts. The turn will be considered if the conditions are met.
Example: imagine that a number of questions are asked in sequence. Imagine that in question/turn 3 the user's age is asked. If the user is within a certain age bracket, an additional question is required. If they are not, that question can be skipped. In turn 3, an attribute is set with the age information. In the next turn, the condition checks that attribute value and decides to enter the turn or not.
Intents in turns
Turns contain a set of Response and Request intents. You can decide which participant (the user or the application) should initiate a turn based on the overall flow of the interaction that must follow the app - user - app - ... or user - app - user... order.
If the intent has a request intent followed by a response intent: when the request intent is evaluated, the engine will look if there is a response intent in the same turn, and execute that.
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FIOsXBCTH5CMzMiIfgy5m%252F2023-05-18_15-29-56.png%3Falt%3Dmedia%26token%3D7a962914-3f90-44e5-a3e1-d619ac3ee9f4&width=768&dpr=4&quality=100&sign=6c92d5a4&sv=1)
As shown above, it is acceptable to only have a single intent (whether app or user intent) in a turn. In this case, there is not accompanying intent in the same turn for the conversation engine to execute. Instead one of two situations happens:
You define a transition for the intent in the turn. The engine will follow the transition and attempt to find an appropriate intent on the end of that transition. An appropriate intent would be the opposite participant. So if in Turn A the request intent is from the APP we will be looking for intents from the USER in Turn B and vice-versa. This allows you to do cadence switch on transitions to have natural conversation flows.
You don't define a transition, in which case the engine will go back to the scene level and look for open turns that it could follow that have the opposite participant. So if you had Turn A with an APP intent and no response intents that engine would look for other open turns with a USER request intent to enter. This again allows you to switch cadence, deal with out of context questions such as FAQ, etc or localized no matching.
It is acceptable to have multiple intents in the list of request or response intents. The intents get executed in order (from top to bottom). This is important when intents have conditions as you want to make sure that the most generic condition is listed last (otherwise it would match and the more specific conditions would not be evaluated).
Intent settings
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FTPMVfE7cbVgFF8SFw27X%252F2023-05-18_15-38-33.png%3Falt%3Dmedia%26token%3D5ad0647d-a19a-44e4-abd0-ffb9839058f2&width=768&dpr=4&quality=100&sign=c0e0d8c7&sv=1)
The Intent Name is the more formal name for the intent that we use to refer to it through interpreters (for incoming intents) or in the message repository (for outgoing intents). A good naming format to use for this is intent.user.<name of intent>
for user intents and intent.app.<name of intent>
for app intents. However, feel free to use whatever makes sense for your better understanding of the flow.
Interpreter and Confidence Level
The Interpreter indicates which interpreter we will be using for the intent in question, while the confidence level determines the minimum confidence level acceptable for the intent.
Intent Behaviours
Yes, Intents have behaviours as well! Intents currently just have the COMPLETING behaviour, which means that if the intent is matched it will also mark the conversation as completed. A completed conversation will take us back at the top of the scenario and look for another way in through STARTING conversations, scenes, turns, etc.
Transitions
Intents can also cause transitions. What this means is that if the intent is matched it will cause a transition to another Conversation or Scene, and the Conversational State will pick up from there.
Advanced Settings
Within each intent you can add the following advanced settings to an intent:
Conditions: You can add conditions to intents to only show specific intent based on certain criteria. If a condition that has been added is met, then it will show the intent e.g. if we only want to show this intent to new users then we would set a condition such as
seconds_since_last_seen
with the operation set toLess Than
and the value set to0
- Meaning only user that have never interacted with the application will see this intent. More information will soon be available on Conditions.Actions: We can also add actions that will have been define in the 'Action' section. As so, if this intent is selected, the named action will be run. More information will soon be available on Actions.
Any action type (whether it's a Webhook, Action or LLM Action) can be added to an intent using this method.
Reserved Intent Names
Some intents have special meanings in OpenDialog so it's worth highlighting those here:
intent.core.welcome
This intent is mapped to an event from webchat - it is called whenever webchat loads for a new user and provides a way to kickstart the conversation. It is automatically set as a Request Intent of the Welcome Scene's Welcome Turn.
intent.core.restart
This intent is fired when users click on the "Restart" button in webchat. It is automatically set as a Request Intent of the Welcome Scene's Welcome Turn.
intent.core.endChat
This intent is fired when users click on the "End Chat" button in webchat.
intent.core.TurnNoMatch
If no interpreter is able to provide a positive interpretation of a user utterance the Conversation Engine will generate a TurnNoMatch intent and attempt to find a Turn within the scene that can handle it.
intent.core.SceneNoMatch
If no turn within the current scene handles the intent.core.TurnNoMatch
the Conversation Engine will generate a Scene No Match and escalate a level above to try and find a match for that.
intent.core.ConversationNoMatch
If no scene within the current conversation handles the intent.core.SceneNoMatch
the Conversation Engine will generate a Conversation No Match and escalate a level above to try and find a match for that.
intent.core.NoMatch
This intent is fired by the Conversation Engine whenever all interpreters return a no match and no lower-level No Matches (described above) were caught.
Currently, this is automatically set as the Request Intent of the No Match Turn in the No Match Conversation.
Last updated