web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : jVh9YTALMhQdhvtsE+xhZH
Copilot Studio - General
Answered

How trigger event if we did not select ask a Question topic options and send new message in Fallback flow?

Like (0) ShareShare
ReportReport
Posted on 22 Jan 2024 15:46:48 by 37

Hi @citron-truc and everyone, Hope you all doing well.
I have created a Fallback flow that show follow up question by using ask a Question  topic but the problem is:
         - When i send message at first it give me Answer and follow up question.

         - But if i select the followup question it still working.

 

The Problem:

- When i donot select the ask a Question options and try to send new textas question it did not trigger the flow  from start and it again show me the followup question from previous resonse .
- so how i can activate trigger even if i did not select the followup question option that is given by ask a Question topic.

here is my flow:


Maxmellien_0-1705937893191.pngMaxmellien_1-1705938033789.png

Maxmellien_2-1705938080200.png

 

- So if we look at the first question it give us reponse and follow up questions.

- But if we did not select the followup question and try to ask new question it will automatically give the follow up question options  from previous response.

I want to send new question to the trigger without selecting the followup question option.

here is the code:

 

kind: AdaptiveDialog
beginDialog:
 kind: OnUnknownIntent
 id: main
 actions:
 - kind: ConditionGroup
 id: conditionGroup_LktzXw
 conditions:
 - id: conditionItem_tlGIVo
 condition: =System.FallbackCount < 0
 actions:
 - kind: SendActivity
 id: sendMessage_QZreqo
 activity: I'm sorry, I'm not sure how to help with that. Can you try rephrasing?

 elseActions:
 - kind: SetVariable
 id: setVariable_UZzHTG
 variable: Topic.userquery
 value: =System.Activity.Text

 - kind: SetVariable
 id: setVariable_JxvOBh
 variable: Topic.channel_id
 value: =System.Conversation.Id

 - kind: InvokeFlowAction
 id: invokeFlowAction_E7w02P
 input:
 binding:
 text: =Topic.userquery
 text_1: =Topic.channel_id

 output:
 binding:
 answer: Topic.answer
 followup: Topic.followup
 source: Topic.source

 flowId: e2261edf-1fb5-ee11-a569-6045bd006ade

 - kind: SendActivity
 id: sendActivity_EdTV40
 activity: "{Topic.answer}"

 - kind: SendActivity
 id: sendActivity_J4qAAN
 activity: "{Topic.source}"

 - kind: ConditionGroup
 id: conditionGroup_l0lbpH
 conditions:
 - id: conditionItem_vKSxmN
 condition: =Topic.followup <> "No"
 actions:
 - kind: ParseValue
 id: 65LtLM
 variable: Topic.OptionsTable
 valueType:
 kind: Record
 properties:
 json:
 type:
 kind: Table
 properties:
 DisplayName: String
 question: String

 value: =Topic.followup

 - kind: Question
 id: question_FWI3kc
 interruptionPolicy:
 allowInterruption: true

 variable: init:Topic.SelectedQuestion
 prompt: "You may like Follow Up questions:"
 entity:
 kind: DynamicClosedListEntity
 items: =Topic.OptionsTable.json

 - kind: ConditionGroup
 id: conditionGroup_grIIgb
 conditions:
 - id: conditionItem_2iWCpo
 condition: =!IsBlank(Topic.SelectedQuestion)
 actions:
 - kind: SetVariable
 id: setVariable_Is0FtG
 variable: Topic.FollowUpQuestion
 value: =Topic.SelectedQuestion.question

 - kind: InvokeFlowAction
 id: invokeFlowAction_1lIq5m
 input:
 binding:
 text: =Topic.FollowUpQuestion
 text_1: =System.Conversation.Id

 output:
 binding:
 answer: Topic.answer
 followup: Topic.followup
 source: Topic.source

 flowId: e2261edf-1fb5-ee11-a569-6045bd006ade

 - kind: GotoAction
 id: QNFBoo
 actionId: sendActivity_EdTV40

 

 

Input data coming from action in three variable:

 

{'sources': '',
 'answer': "```this is the query```.",
 'followup': {'json': [{'question': 'question one text',
 'DisplayName': 'question one text'},
 {'question': 'question two text',
 'DisplayName': 'question two text'}]}
}

 


how to get ride of this loop??
thanks 

Categories:
I have the same question (0)
  • HenryJammes Profile Picture
    on 22 Jan 2024 at 23:16:53
    Re: How trigger event if we did not select ask a Question topic options and send new message in Fallback flow?

    Not sure I follow @Maxmellien , but why use a question for this, and not a message?

    That way, any new user message will be interpreted as a new utterance that will either trigger a topic or go to fallback. 

    In your example, it looks like the selected option chose by your user isn't recognized as a valid answer to the question, hence why I assume it asks it again.

  • Maxmellien Profile Picture
    37 on 23 Jan 2024 at 08:04:03
    Re: How trigger event if we did not select ask a Question topic options and send new message in Fallback flow?

    Hi @HenryJammes , Thanks for your answer. 
    I am using message but after message i show followup question in Question Topic.

    What i have observed that without selecting the Question topic options i never trigger the start of flow.
    I used the Question Topic for dynamic click, so we can ask a question if there any other way which alway trigger start of the flow then please help me if there any alternative to this. The below is my existing scenario.

     

    - As i am not directly using Question topic in flow, the existing flow work like this:
    - When event trigger we got input text in PVA , so we save in variable and also conversation id.
    - Then we send these two variable in action and got resposne in three varable, answer , sources, followup.

    - Then we first display answer and sources and check if followup is not No then we put this data into Question to show followup quetsions.
    - If we select any question then we save this selectedquestion in varable and again send via action but this time input text change to selectedquestion and conversation_id remain same and when reponse came we use Go to Step which is the previous message topic  that exist after first action in flow and this is loop for follow up question and answer.

     

    - The issue arises when I don't select any follow-up question and write a new question. It doesn't initiate the fallback flow from the beginning. Instead, it retains the previous response's follow-up question. As a solution, I plan to send this input text to the start and send to first action in flow to obtain a response.

    - kindly use the above given code after that you can see my whole flow.
     
    Here is a snapshot of bot:

    Maxmellien_0-1705996911429.png


    The Questions which i have asked of if we see the picture, is not in followup question it should trigger the Flow from start.

    Full flow images:

    Maxmellien_1-1705998243903.png

     

    Maxmellien_2-1705998295081.png

     

    Maxmellien_3-1705998324107.png

     

    Maxmellien_4-1705998383742.png

     

     

  • Verified answer
    Maxmellien Profile Picture
    37 on 23 Jan 2024 at 12:45:02
    Re: How trigger event if we did not select ask a Question topic options and send new message in Fallback flow?

    Thank you @HenryJammes 
    I think i found the way to getout of Question loop.
    - Just go to Question properties and make it donot repeat, and if did not find entity set to empty as shown in image.
    - then use condition so whenever we ask question if not in Question options then it will be empty or Blank so we can start from begining.

    Maxmellien_0-1706013882369.png

     

  • AlexRoss Profile Picture
    6 on 20 Feb 2024 at 17:38:40
    Re: How trigger event if we did not select ask a Question topic options and send new message in Fallback flow?

    Tks!!! helped me a lot

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 471 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 421 Super User 2025 Season 2

#3
Giraldoj Profile Picture

Giraldoj 55 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete