- Print
- PDF
User variable
- Print
- PDF
Available in Classic and VPC
A chatbot can get meaningful information through conversations with users. Among these pieces of information, some should only be temporarily retained to respond to an answer, while others may be stored and used repeatedly throughout the duration of a conversation session. The information obtained through the conversation with the user during a conversation session is managed as variables.
Create user variable
You have to create a user variable before setting the user variable.
The following shows how to create a user variable.
- From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
- Click the [Run builder] button of the domain you want to run the chatbot builder.
- From the chatbot builder, click User variable.
- Enter the user variable information.
Item | Description |
---|---|
Type | Select the user variable type. - String: User variable type where strings can be stored - Number: User variable type where integers can be stored - JSON: User variable type where the json can be stored. The list is not supported. |
User variable name | Enter the name of the user variable. |
Default value | Set default value of the user variable |
- Click the [Add] button when you've entered all user variable information.
- Click the Settings icon and set the sensitive information status for the information to be contained in the user variable.
- The status is set to General information by default if it doesn't pertain to a special case where sensitive information is included.
Set user variable
Once you have created a user variable, you can apply the user variable when registering an answer of a conversation. The user variable applied to the answer is updated when the corresponding answer is returned.
The following shows how to apply a user variable to an answer.
- Complete the preliminary preparation.
- Register a question, referring to Enter question.
- Create a user variable, referring to Create user variable.
- Select the type in the user variable area in the answer registration area.
- You can choose from string, number, and JSON.
- Select the name of the user variable to apply.
- Select a method for updating the user variable value in the action area.
- Calculations such as additions and subtractions are only supported for number type user variables.
- Enter the value to update the user variable with in Value.
- String: You can save a string in the selected user variable.
- Number: You can save a number in the selected user variable.
- Entity: You can save an analyzed entity value in the selected user variable. However, if there is no value analyzed as an entity or if it doesn't match the user variable type, then it will not be updated.
- Slot: You can save a filled slot value in the selected user variable. However, if there is no value filled in the slot or it doesn't match the user variable type, then it will not be updated.
- User variable: You can save a value filled in other user variables in the selected user variable.
- Click the [Add] button.