From Wisevoice Wiki
Jump to: navigation, search

Entities are variables that can be extracted from the user input.

The entity component is used to configure how the entity is going to be extracted and validated.


The entity name is important because it will be used as a key when saving the extracted entity in the user's session.

The entity type defines the format and rules a valid entity must match. There are some system types supported out of the box, such as Date, Number and Free text and you can define your own custom types. Read more about creating new Entity Types.

When the flow reaches an Entity node it will first check the user's session to see if he doesn't already have the entity in the session. If the session already contains the entity key or if the entity is not configured as "Required" the flow continues, otherwise the agent will send the prompt message.

The prompt message can be configured in a similar manner as a regular Message.

After sending the prompt message the agent waits for user input. It will used the expression examples and the constraints of the entity type to attempt extracting the entity from the user input. If no entity is extracted the flow will continue with the error prompt and stay in a loop until receiving a valid entity. If an entity was extracted the flow will with the validation faze if it was enabled or otherwise continue with the next node.

If user validation was enabled the agent will send the validation prompt asking the user to validate or update the extracted entity. This behavior is particularly useful for callcenter conversations. User validation will trigger even if the entity was already present in the user session from previous steps.

Interactions with other components

Entities, as all other context variables can be used in messages and services using the syntax {{<entity name>}} . E.g. "Salut, Template:Nume!" They can also be used in scripts and connection conditions.

After creating an entity you can also mark its occurrences in training expressions from Intents. Just select the word of group of words and a popup showing available entities will appear. This allows extracting entities together with the intent from a single user input. If this happens the entity node will be skipped.