Requirements are either intents or entities your skill needs to retrieve before executing actions. They are pieces of information that are important in the conversation and that your bot can use, like the name of the user or a location.
Once a requirement is completed, the associated value is stored in the memory of the bot for the entire conversation.
A requirement is made of:
Those actions are executed when the requirement is completed. The skill's execution then continues as far as it can. It can chain with other requirements, or with actions
Those actions are executed when the requirement is not yet completed. It's the perfect place to define messages to ask the information you need to the user. For example, with the username as a requirement, the action would be a message asking the user for his name.
You can define validators in a requirement to validate that the user input matches your needs. These validators are made of conditions that will define validation, and of actions to execute if the validation fails.
If the validation fails, the retrieved data will not be stored in memory, and thus the requirement will not be completed.
For example, if we want to get an address from the user, we can create a requirement that retrieves a location entity, and add a validator to check that this location is really an address and does not refer to a city or a country, and tell the user about this limitation.
Like conditions, requirements can be grouped together with