Add nodeless NLU entities as input variables to a topic
- UpdatedAug 3, 2023
- 4 minutes to read
- Vancouver
- Virtual Agent
You can add nodeless NLU entities as input variables to a topic if NLU is enabled for Virtual Agent. These variables can be slot-filled from NLU service provider predictions or provided outside of the scope of the topic.
Before you begin
Role required: virtual_agent_admin or admin
About this task
If a custom control prompts a user for a date and the user mentioned a date in their initial utterance, you can capture that without prompting the user again. To prompt the user when not slot-filled, use input controls.
For more information about NLU entities, see Entities. For more information about system entities, see NLU system entities.
Procedure
- Navigate to All > Conversational Interfaces > Virtual Agent > Designer.
- Open a topic and view the Flow tab.
- In the Variables sidebar, click the Input plus icon.
-
On the form, fill in the fields.
Table 1. Add Input Variable dialog box Field Description Input Types Data type of the input. The fields on the dialog box change according to your choice. - String: Alphanumeric text. Shows the Input format field. Choose plain text or a conforming rule, depending on the type of data.
- True/False: Boolean value, either yes or no.
- Date Time: Date, time, or both. Shows the Input format field.
- Static Choice: Defined user choices. Shows Display name and Value to store field pairs.
- Dynamic Choice: Choice of table records. Shows Populate choices by, Table, and Filter choices fields. The value can be either conditional or scripted.
For details, see Input data types in Virtual Agent topics.
Name Name of the variable for the entity. Variable names must be unique within the scope of a topic. The name appears as a variable when used in dot walking.
NLU Entity The NLU entity associated with the node. This could be a pre-built Virtual Agent entity that you import into the model, a system entity (such as DURATION, TIME, or MONEY), or a custom entity that you created.
String data type properties Input format Text format that is validated when a user enters certain text items. If the user doesn't enter the expected format, an error message indicates that the format is not valid and asks the user to reenter the text.
Choose the format of the text item to be validated:- Text: Any text string (no validation)
- Email: Format that consists of an email prefix (user name), @ symbol, and domain.
- IP address (IPV4, IPV6): Data communication delivery format for Internet Protocol version 4 or version 6.
- Phone number (E.164): Internationally recognized standard phone number format.
- URL: Web address format
- Custom: Script that provides a text validation rule for a custom text format and the related error messages displayed when the expected format is not entered.
Date Time data type properties Input format Type of Date Time control to be displayed. Select one of the following formats: - Date: Shows only the monthly calendar for the user to select the date.
- DateTime: Shows both a monthly calendar and time picker.
- Time: Shows only the time picker for the user to select the time (hours and minutes).
Static Choice data type properties Choices [For Static Choice data type]
Enter two or more choices as follows: - Display name: Short phrase or text that appears to the user for that choice.
- Value to store: The string that is stored in the variable when the corresponding choice is selected.
Dynamic Choice data type properties Populate choices by Type of dynamic variable to be used. Select one of the following options: - Record: Returns records from the table selected. The values for these options are GlideRecord objects.
- Script: Expression that returns an array of options.
Table [Record values only]
If you selected Record as the method to populate choices, select the table to be searched. Filter choices [Record values only]
Select one of the following: - Condition Builder: Creates a filter used to select a subset of records from the table.
- Script: Defines the enumeration list for the options (choice list) to be displayed. The name value pair is stored as a string object.
-
Click Save.
NLU entities appear alongside topic input variables in the Variables sidebar.
Note:You can remove a slot-filled value to prompt the user again (unbind it from the initial input value). For more information, read about the vaInputs.myvar.unbindEntity(); method in Virtual Agent scripts.