Input Variables And Slots
What are Input Variables and where do I set them up?
Input Variables
Input variables are defined for actions and compound actions as critical input data needed for that resource to execute.
Setup
Actions
You can set up input variables for the action in the Action Editor by going to the Input Variables tab.
Compound Actions
In the Compound Action Editor, you set up Input Variables for the Compound Action by going to the Input Fields tab.
Slots
Slots are pieces of data that are collected by the conversation and are passed into a Compound Action to start it’s execution.
Setup
In the Plugin Workspace, slots are implicitly created from a Compound Action's Input Variables when it is promoted to a Plugin. Slots will be collected and passed to the Compound Action based on the data type defined in the Input Variable.
- For example, we may collect
num_days
as a slot for a Submit PTO plugin. The user will say something like, “I want to submit PTO for 5 days,” we will pass 5 as an integer to the Compound Action to start its execution.
Available Data Types
str
— Collects the slot as a stringint
— Collects the slot as a whole numberfloat
— Collects the slot as a decimal numberbool
— Collects the slot as a boolean True or FalseUser
— Collects the slot as the User Object for a specific User.List[str]
— Collects the slot as an array of stringsList[int]
— Collects the slot as an array of whole numbersList[float]
— Collects the slot as an array of decimal numbersList[bool]
— Collects the slot as an array of booleansList[User]
— Collects the slot as an array of User Objects
You pass in lists as slots with the following utterances
1 and 2 and 3 1, 2, 3 [1, 2, 3] all numbers 1-3
Updated 26 days ago