Trigger intent from custom action

Hi @ChrisRahme . Thanks for the prompt response, as usual! My ultimate goal is to be able to seemlessly redirect the user to another part of the conversation.

something like this:

# flow 1 going on
intent: ...
action: action_flow_1_end

# must take the user to flow 2 now after action_flow_1_end

Original approach

Currently, I make the user click on a button (basically get an intent out of them) and that helps take the user to another part of the conversation.

# flow 1 going on
intent: ...
action: action_flow_1_end

# must take the user to flow 2 now after action_flow_1_end
intent: trigger_flow_2
action: action_flow_2_start
intent:
...

What i’m currently trying

But I’m now looking at ways to avoid asking the user for this, and redirect them directly. something like this:

# flow 1 going on
intent: ...
action: action_flow_1_end

# must take the user to flow 2 now after action_flow_1_end

# add intent trigger_flow_2 to the tracker
# bot then predicts action_flow_2_start
action: action_flow_2_start

My original question was regarding how to accomplish this. When I said I was resorting to FollowupAction, it was because the bot wasn’t using the injected intent to make the next action prediction, and was pretty much always predicting action_listen.

Regarding your suggestion

My only worry with your suggestion (directly use FollowupAction) like this:

# flow 1 going on
intent: ...
action: action_flow_1_end

# must take the user to flow 2 now after action_flow_1_end

# trigger action_flow_2_start directly
action: action_flow_2_start

is that it may hurt policy performance, since all my stories require that there be the intent trigger_flow_2 before action_flow_2_start.

TLDR

  1. Would directly triggering the next action (not bothering with the intent in the middle at all) affect performance?
  2. If I’m still looking for a way to manually inject an intent so that the bot considers it for the next prediction, is there a way to do it?
1 Like