|
A conversation exists of questions with predefined answers and one or more statements and always follows the structure of a decision tree. A conversation always starts with a question and ends with one or more statements.
After creating a new conversation, an optional display name and description can be given to the conversation. Next, the question and predefined answers can be modeled in the input field respectively near the blue and orange box. For example:
Now we have to choose a thread of the conversation (branch of the decision tree) which we want to continue modeling. This can be done by selecting one of the responses (near the -icon). By choosing this response, a new block will appear in which a next question or statement can be modeled.
In the example below, the response "There is no wifi connection" is chosen and instead of a question, a statement is modeled using the menu on the right ().
To have full focus on the current thread of the conversation:
It is at any time possible to navigate back to a previous point in the conversation by selecting the inactive block. In the example, it will look like this:
Blueriq Encore notifies you that there is now 1 loose end left because the tread of the slow wifi connection doesn't end with a statement yet. After ending this thread with a statement, the conversation will become valid and runnable. The conversation in this example is very simplified, but the explained concepts can be used to model larger conversations.
Refactoring a branch in a conversation is done using the concept of snippets. A thread can be cut from a conversation using the blue "Unlink" button between two blocks. This will remove the thread and its parent response from the conversation and put it in the snippet list. Snippets can be pasted into other threads in any conversation in the project using the -icon while having an empty block active.
As mentioned before, Blueriq Encore lets you focus on modeling the conversation. While doing that, some elements are created automatically in the background. These elements, which may be renamed or deleted at any time, are described in the table below:
What | When | Description |
---|---|---|
Entity | After creating the first question | A singleton entity with the same name of the conversation is created. Attributes that represent questions are created in this entity. |
Attribute | After creating a question | An attribute is created using the question in the conversation as question text of the attribute. The name of the attribute is based on the question. |
Value list | Model responses | A value list is created representing the possible responses of the corresponding question on which the name of this value list is based. |
Asset | Model statements | An asset is created after modeling a statement. |
Conversation snippet | After creating a snippet by unlinking | A conversation with the prefix snippet_ is created to represent a snippet. |
A conversation has to be explicitly called on a page to show it to a user, as opposed to a business rule that is evaluated when necessary. A dynamic container is used for this. The dynamic container executes the conversation and asks the user the questions that are defined in the conversation. When the user answers, the dynamic container determines the next node to execute.
The dynamic container to execute a conversation is Container type: AQ_DecisionTreeEvaluator.
A conversation can be exposed as a webservice to use the conversation through a JSON interface. This has to be specified with the "Expose as a webservice" checkbox in the properties panel of the conversation. Read more about the API here: Conversation API V2.