Trigger or activate a storie after another one

Hello, i am using this version of rasa : Rasa Version : 2.6.0 Minimum Compatible Version: 2.6.0 Rasa SDK Version : 2.6.0 Rasa X Version : 0.39.3 Python Version : 3.7.0

and i want to do the following with the helpdesk assistant bot :

After answering users query i want to display “Do you want me to create ticket for you ?”

If user says “Yes” then i want to call intent for ticket creration or activate the ticket creation’s form.And if users says “no” then i want to end the conversation.

Is it possible? Could you please provide me with an example?

Thanks.

Hi @M_R_LY ,

You could use slots to implement the branching logic.

You will store the answer to “Do you want me to create ticket for you?” as a boolean slot. Then, write stories where if the slot is true, then activate the ticket creation form using a rule.

1 Like

Ok thank you i will explore that possibility

The main idea was to have something like that :

User : Hi Bot : hello how can I help you User : I want to reset my password Bot : <give some tips about reseting password and if it didn’t work ask if he create a ticket User : yes Then the Bot activate the form for ticket creation ask for a more specific problem description etc

hi maybe @niveK am still trying to figure it out, it will be great if i can have some help

@M_R_LY your query is solved ? As I understand your query you want:

Bot: Did that help you or should I create the query ticket for you?

Yes| No

User: user select Yes

Bot: Bot will asked user details * it will trigger the form and at the end show the user details?

Or

User: user select No

Bot: Have a great day, nice talking to you!

Right?

As @nik202 mentioned, you want to store that information in a slot. You can build the pattern whereby:

User: I need help with <topic>

Bot: <topic response from db or from story>

Bot: Did that help? Yes/No

User: No

Bot: Would you like to create a ticket? Yes (/create_ticket) / No (/deny)

User: Yes (/create_ticket)

Here I’d recommend creating a rule for the form and adding some stories for the negative case (the user doesn’t want to create a ticket). I wouldn’t resort to using a slot for this unless you’d prefer to do so, but you’re welcome to create the branching logic in that way as well. You can make any button payload the trigger for the form itself.

The rule would look something like (this is just to give you an idea):

- rule: Create a ticket
  steps:
  - intent: create_ticket
  - action: create_ticket_form # this is a form you'd define in your domain
  - active_loop: create_ticket_form

@M_R_LY Even you can create the custom action for action_create_ticket_form. If there is any further help you require do reach out to use.