Filling same slot using recursively asking for multiple buttons

Hello,

I got stuck in one problem while implementing one scenario. I want to ask the user to fill by giving buttons until the last level of my custom dictionary.

First it should prompt the user with the buttons using first level keys. After the user selects the appropriate button then i want to prompt with 2nd level of that key, until i reach the last level of my dictionary. Now, i dont want to create multiple slots, I want a single slot to be re-filled again and again until the user reaches to last level of dictionary and then the slot should get filled.

I know how to fill slots using buttons but how to recursively fill the same slot?

@aniket can you give an example of this? I’m not sure what exactly you’re trying to do.

Here is my custom dictionary example.

{‘Admin’: {‘Gov Admin’: ‘Y’, ‘Import Comments’: ‘Y’, ‘Rule Designer’: ‘Y’, ‘SDS Alert Configuration’: ‘Y’, ‘User Management’: ‘Y’, ‘Virtual Message’: ‘Y’, ‘Workflow Restriction’: ‘Y’}, ‘CDT Order Tray’: {‘Assign User’: ‘Y’, ‘Audit Trail’: ‘Y’, ‘Order Info’: ‘Y’}, ‘Carrier Weblink History’: {‘Carrier Weblink History’: ‘Y’}, ‘Dashboard’: {‘Dashboard’: ‘Y’}, ‘DellEMC Search’: {‘Assign to Me’: ‘Y’, ‘Contact’: ‘Y’, ‘DellEMC Search’: ‘Y’, ‘Edit Master Data’: ‘Y’, ‘Edit Workflow’: ‘Y’, ‘Production Order’: ‘Y’, ‘Purchase Order’: ‘Y’, ‘SO Line Items’: ‘Y’, ‘Shipment’: ‘Y’, ‘Workflow’: ‘Y’}, ‘Documentation Management’: {‘CDT Data Upload’: ‘Y’, ‘CDT Order View’: ‘Y’, ‘CDT Settings’: ‘Y’}, ‘EMC Order Tray’: {‘Contact’: ‘Y’, ‘Delivery’: ‘Y’, ‘Glo. Mat. Alloc.’: ‘Y’, ‘Mat. Constraint’: ‘Y’, ‘Quality Notif.’: ‘Y’, ‘Shipment’: ‘Y’}, ‘Order Tray’: {‘Audit Trail’: ‘Y’, ‘Billing & Shipping’: ‘Y’, ‘Digital Fulfillment’: ‘Y’, ‘GOV Order Cycle’: ‘Y’, ‘Hold’: ‘Y’, ‘Ofs Details’: ‘Y’, ‘Ofs Log History’: ‘Y’, ‘Order Details’: ‘Y’, ‘Order Life Cycle’: ‘Y’, ‘Order Timeline’: ‘Y’, ‘Packing Slip’: ‘Y’, ‘Part Shortage’: ‘Y’, ‘Segment Information’: ‘Y’, ‘Service Tag’: ‘Y’, ‘Task/Hold Code’: ‘Y’, ‘Vendor Details’: ‘Y’, ‘Web Carrier’: ‘Y’, ‘Yoda Link’: ‘Y’}, ‘Reports’: {‘CDT Report’: ‘Y’, ‘ODM Report’: ‘Y’, ‘OEM Report’: ‘Y’, ‘Virtual Message Report’: ‘Y’}, ‘Search’: {‘Email Notification’: ‘Y’, ‘Search’: ‘Y’}, ‘Watch List’: {‘Watch List’: ‘Y’}}

Now first i want to display buttons with first level keys.In this case it is (‘Admin’, ‘CDT Order Tray’, ‘Carrier Weblink History’, ‘Dashboard’, ‘DellEMC Search’, ‘Documentation Management’, ‘EMC Order Tray’, ‘Order Tray’, ‘Reports’, ‘Search’, ‘Watch List’)

Next after that if user click on any of the above mentioned key button then i want to display 2nd level keys in form of buttons.In this case if the user selects “Admin” then the buttons will be like (‘Gov Admin’, ‘Import Comments’, ‘Rule Designer’, ‘SDS Alert Configuration’, ‘User Management’, ‘Virtual Message’, ‘Workflow Restriction’).

I want to keep on doing that until the user reaches the last level of dictionary and ultimately fill the one slot again and again.

in my case i have made one slot in required_slots function.

I hope its clear. I dont want to use multiple slots.

@aniket if you want to handle this in a form, you will definitely have to have multiple slots. You can still append to the same slot, but to request more information from the user you will have to have as many slots as questions you want to ask.

In terms of extracting keys from that dictionary, it might be best to do that in the request_next_slot method

1 Like