Imply/Derive one Slot from another

Hey guys,

After hours of search and trial and error I decided to post my first question in this forum.

My use case is:

I am developing a chat bot for customer support. The user should be able to ask various information about single or about every of his orders. Therefore the bot has to know whether I want to know details about all orders or about a specific order (entity: “query_type”). If the user wants to know details about a specific order he has to provide the order id as well (entity: “order_id”). The quantity also has to be provided. Therefore I have created a Form which requires these two entities.

The first thing the order wants to know is the entity “query_type”.

Possible Scenario (with other objects):

User: “When will the next 10 smartphones be delivered ?” {“quantity”: 10}

Bot “Do you mean any specific order or should I search among all existing orders?” (Ask for {“query_type”})

Buttons appear to select the entity {“query_type”}:

  1. \inform{“query_type”: “specific”}
  2. \inform{“query_type”: “all_orders”}

User writes the order id instead of the “query_type” ‘492492’

This is the design problem I’m trying to solve. I want that the slot “query_type” will be set implicit when an “order_id” is provided. I tried everything from modifying the validation functions and returning the slot there, to modifying the requested_slots method. Each attempt I have tried has yet a flaw.

Can you recommend me how to imply and set one slot from one entity i receive or a slot that has already been set. I would be glad to solve this problem after hours of nu result


Hello @ilya21,

When the user enters the order id ‘492492’ instead, can the bot recognize the order_id entity and save it to a slot ?

If yes, then maybe in the requested_slots method, you can check if the slot order_id is not None then return a list that do not include the “query_type” slot (it means that the bot won’t ask for the query_type anymore). Can you tell me why modifying the requested_slots didn’t work for you ?