Requisites

Requisites are the main way to collect information from the user through Q&A.

They can be added to any Text or Event Trigger and your Virtual Assistant can ask for a single or multiple pieces of information from the user with a single Trigger!

You can be explicit when asking for information with Required Requisites, while Optional ones will possibly be filled from the user's initial message.

Fields

Requisites consist of the following fields:

Check for:

  1. Checks if an Entity or Context Variable is present.
  2. If the Check for is present, the user's answer must match the specific requested value. (Eg. requested values can be emails, payment methods, dates etc)
  • Entity variables start with @ and Context Variables start with $.
  • You can check for nested context variables by doing things like $user.email
  • Entity values are used for the specific Dialog.
  • Context variables are saved for the whole session.

Save as:

  • Used to save User's answer inside a context variable. If the save as field is not present, then the user's answer will not be saved in the Context.
  • You can save variables into nested object. For example you could save a variable as $users.email to update the user's email.

If not present, ask:

  • In case of an Entity in the Check for
    • If the value was not present in the Dialog turn, we can set up a question to be asked to the user to get the answer needed.
  • In case of an Context Variable in the Check for
    • If the value was not present in the Session, we can set up a question to be asked to the user to get the answer needed.
    • If the If not present, ask field is not set up, the question will be skipped.
    • if not present, ask is optional, the requisite may have already be filled by the text trigger.

Type:

  • Checks that the user's answer is:
    • Any: any answer is accepted
    • Number: only numbers are accepted
    • Text: only text is accepted
    • Email: only an email is accepted
    • Phone: only a phone number is accepted
    • URL: only URL is accepted
    • Integer: only integer numbers are accepted

If no requisites, then:

  • if no requisites, then will activate if all the Requisites are optional AND they are not filled.

It is important to note that the Requisites of a Trigger always take place before any of the Responses. This can also be seen in the Low Complexity Example below.

Add a new Requisite

  1. Create a Text or Event Trigger
  2. Click on it
  3. Select the Requisites tab on the right-hand side
  4. Click Add Requisite

Low Complexity Example

In the example below, a simple user input extraction is illustarted. More specifically, the first and last name of the user are extracted thourgh the use of Requisites. When the user writes a greeting message, then the Virtual Assistant will begin the process of asking his/her first and last name. For both Requisites, the check for field is empty, because the user's answer doesn't have to contain any Entities or Context Variables. The Virtual Assistant saves the user's answer in Context Variables called $firstname and $lastname respectively, by asking the corresponding question given by the if not present, ask field. As we can see in the Chat image below, the Requisites are asked before any of the Responses.

Medium Complexity Example

In this example, the use of a mandatory requisite with a check for field is illustarted. More specifically, the Virtual Assistant is able to extract an answer from the user, which must be constrained with regards to a predefined Entity. As we can see from the example, when the Trigger for Booking a Flight is activated, the Virtual Assistant asks the user to fill an airline requisite. In this case the airline is an Entity and can only take two values: Delta and American Airlines. Thus, any answer from the user must belong in the airline entity. If not, then the requisite question (given by the if not present, ask field) will be asked again. This can also be seen from the Chat image below. It is worth noting that the type field is set to text in this case, as the expected answer is an airline.

Last updated on