--- title: Slots excerpt: '' deprecated: false hidden: false metadata: title: '' description: '' robots: index next: pages: - slug: data-types title: Data Types type: basic - slug: moveworks-dsl-reference title: DSL Reference type: basic - slug: slot-resolvers title: Slot Resolvers type: basic - slug: resolver-strategies title: Resolver Strategies type: basic --- # What are slots? Slots are **input values** required to execute a conversation process that requires user input. These values can be collected directly from the user or retrieved from the AI assistant's memory. Slots are critical for enabling plugins to perform actions, such as closing a Jira ticket or submitting a Workday PTO request. ### Example Use Cases * **Jira Ticket Closure**: Requires a `ticket` slot to identify the ticket. * **Slack Channel Rename**: Needs a `channel` slot (the target channel) and a `new_name` slot (the desired name). * **Workday PTO Request**: Uses a `num_days` slot to specify the duration of the leave. # Key Components of Slots ## Slot Naming and Descriptions Slot names and descriptions guide the Assistant in reasoning about and processing slots. Clear, descriptive naming and detailed descriptions improve accuracy and usability. #### Best Practices * **Be Descriptive**: Use clear, specific names and descriptions to avoid ambiguity. * **Use Semantically Unique Names**: Ensure slot names are distinct to prevent confusion during inference.
Good Examples Bad Examples
name: `ticket_comment` description: Collect user's comment for their salesforce ticket. Do NOT summarize the comment. Pass the user input verbatim. name: `slot1` description: -
name: `comment_for_approval` description: Collect user's comment for approving their request. name: `comment_for_rejection` description: Collect user's comment for rejecting their request. name: `slot1` description:- name: "slot2" description:
#### Tip: Controlling the Assistant's Behavior with Descriptions Use slot descriptions to define specific behaviors for the AI assistant, such as: * **Formatting**: "Timestamp should ALWAYS follow the format: YYYY-MM-DDT23:59:59." * **Default Values**: "If the user doesn't specify `start_date`, set it to the current date and time." * **Disclaimers**: "Present a disclaimer that `start_date` should NOT be in the past." * **Inference Rules**: "Do NOT infer `country_code` from the user's profile. Always ask explicitly." ## Slot Data Types Slots are categorized into two types, determining the format of the input value passed to the plugin. #### Built-in Data Types * `string`: Text input (e.g., a comment or name). * `integer`: Whole numbers (e.g., number of items). * `number`: Floating-point numbers (e.g., currency or measurements). * `boolean`: True/false values (e.g., approval status). * `User`: Represents an employee in your organization, uses a built-in resolver strategy. * `File`: Represents a file attachment. [_See more about file slots_](/docs/file-slots) #### Custom Data Types Custom data types allow for specialized inputs tailored to your use case. For details, see the [Custom Data Types documentation.](/docs/data-types) ### Collecting Multiple Values for a Slot You can configure a slot to collect multiple values of the same data type. When creating or editing a slot, simply check the option **“Data type is expected to be a list.”** This enables your AI assistant to gather and store lists instead of single values. For example: * If the slot type is `User`, the agent can collect multiple user names (e.g., when the user lists several people to notify). * If the slot type is `String`, the agent can capture multiple text entries (e.g., a list of project names or keywords). This feature makes it easier to handle scenarios where users provide more than one response for the same slot type. ![](https://files.readme.io/7c7f89f2d7ab8108766e3d7385e7938d82d2b4059c6d82099b0be924a11ad19f-Screenshot_2025-11-21_at_10.17.35AM.png)
## Slot Validation Policy Slots can include validation rules to ensure the collected value meets specific criteria. Validation is defined using the [Moveworks DSL language](/docs/moveworks-dsl-reference). #### Example: To refer to the slot, use the identifier `value` in your DSL rules. For a `due_date` slot, ensure the date is today or later: ```text DSL $PARSE_TIME(value) >= $TIME() ``` ![](https://files.readme.io/3e216d901769e3091fa930659c28d7255d538e9308adfc21891c2fdccc135c39-CleanShot_2025-04-09_at_03.57.34.png) ## Slot Inference Policy The inference policy controls how the AI assistant collects slot values: * **Infer slot value if available**: The Assistant attempts to derive the value from the conversation context. * **Always explicitly ask for slot**: The Assistant always prompts the user for the value, ignoring context. #### Example For a `country_code` slot, you might configure: ![](https://files.readme.io/6aece47658e57267f1d017733ac01311b4de9e99fc39bbe8cfb76a38ff70793b-CleanShot_2025-04-09_at_04.00.49.png) ## Slot Cardinality Slots can represent either a single value (`[type]`) or a list of values (`List[type]`). Users can provide lists in various formats, such as: * "1 and 2 and 3" * "1, 2, 3" * "[1, 2, 3]" * "all the numbers 1-3" ## Resolver Strategies Resolver strategies define how the AI assistant converts user input (e.g., “my blog task”) into the expected data type (e.g., an Asana task object). You can: * Inherit the resolver strategy from the slot’s data type. * Define an inline resolver strategy within the plugin. For more details, see the [Slot Resolver documentation](/docs/slot-resolvers)[ and Resolver Strategies](/docs/resolver-strategies) documentation. # Configuring Slots Slots are defined in the **Conversation Proces Low-code Editor** within Agent Studio. The editor allows you to specify slot names, descriptions, data types, validation policies, inference policies, and resolver strategies. ![](https://files.readme.io/c2a6ce599a0c29c35cfd29e14b93056f08ef6fe2b263b69bcb5725cb4775951c-CleanShot_2025-10-22_at_13.58.142x.png) # How the AI Assistant Handles Slots The AI assistant uses the slot configuration to determine how to prompt users for input. It evaluates the slot’s name, description, data type, and policies to formulate appropriate questions or infer values from context. # Troubleshooting Common Issues * **Ambiguous Slot Names**: If slots like `slot1` or `slot2` are used, the Assistant may misinterpret user input. Always use descriptive, unique names (e.g., `ticket_comment`). * **Validation Failures**: If users report validation errors, check the DSL expression in the validation policy for correctness. * **Inference Issues**: If the Assistant incorrectly infers a value, set the inference policy to "Always explicitly ask for slot" or clarify the description.