Hi,
I’m stuck with an interesting problem and I’ve tried a few different approaches, all hitting dead ends. So I’m trying to activate a form anytime the user goes through a menu (it’s a carousel on the frontend) and clicks on a button. The button has a payload, for example, /set_user_type{'user_type':'business'}
that sets the entity and slot using autofill.
However, this happens perfectly only when a form is active ie. i activate the form the first at the beginning of the conversation and deactivate it once both slots are filled. There’s no problems running that.
But I have to activate the form later when a user wants to update a slot ie. when a button is clicked again. How can this be done? I’ve tried the following and failed. Any help is appreciated
rules:
- rule: welcome user
conversation_start: true # this rule only applies at the beginning of a conversation
steps:
- action: action_session_start
- active_loop: tasc_form
- rule: set user type
steps:
- intent: set_user_type #/set_user_type{'user_type':'business'} fails to set the user type slot, but entity is set
- active_loop: tasc_form
- action: utter_ask_user_type
- rule: set topic
steps:
- intent: set_topic #/set_topic{'topic':'reset password'} fails to set the topic slot, but entity is set
- active_loop: tasc_form
- action: action_topic_response
- rule: Submit form
condition:
- active_loop: tasc_form
steps:
- action: tasc_form
- active_loop: null
- slot_was_set:
- requested_slot: user_type
- action: utter_user_topic_selected
- action: action_topic_response
Note: activating the form whenever I present a menu is possible, but occasionally users scroll up through the chat conversation and click other options.