Input Variables And Slots

What are Input Variables and where do I set them up?

What are Input Variables

Input variables are defined for actions and compound actions as critical input data needed for that resource to execute.

How to set them up

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.

What are Slots

Slots are pieces of data that are collected by the conversation and are passed into a Compound Action to start it’s execution.

How to set them up

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.

What Data Types are available?

  1. str — Collects the slot as a string
  2. int — Collects the slot as a whole number
  3. float — Collects the slot as a decimal number
  4. bool — Collects the slot as a boolean True or False
  5. User — Collects the slot as the User Object for a specific User.
  6. List[str] — Collects the slot as an array of strings
  7. List[int] — Collects the slot as an array of whole numbers
  8. List[float] — Collects the slot as an array of decimal numbers
  9. List[bool]— Collects the slot as an array of booleans
  10. List[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