Ankit
Ankit

Reputation: 669

conv.followup not wrking in dialogflow

I have an intent Survey_check and from that intent it can go to three different intents depending upon the answer given by the user. But whatever the user enters it is not going to the intent I want.

Here is my code:

app.intent('Survey_check', (conv, {answer_yes_no}) => {
  const ans = answer_yes_no;
  const log_flag = conv.parameters.logout_survey;
  const help = conv.parameters.Help_survey; 
  if(ans === 'yes' || ans === 'yeah'){
      conv.ask('Alright!! Lets begin');
      conv.ask('Ok, please tell me your ID');
  }
  else if(log_flag === 'logout'){
      conv.ask('Did you say logout?');
      conv.followup('Confirm_logout');
  }
  else if(help === 'can you help me' || help === 'help' || help === 'help me'){
      //conv.ask('Would you like some help?');
      conv.followup('help_intent');
  }
  else if(ans === 'no' || ans === 'nope'){
    conv.close('Please go to your Assistant app and link this skill.');
  }
});

The parameters in the conv.followup are the event names of the intent I want to trigger but it is not working. Whenever I enter help the dialogflow does not understand it and if I comment the part conv.followup then dialogflow is able to understand the help phrase, but then it does not go to the required intent.

Upvotes: 0

Views: 135

Answers (1)

mandychannyc
mandychannyc

Reputation: 115

Did you expect the response from the follow up event intent to be sent back to the user, but found that it wasn't? According to the documentation, the final response from your follow up event will never be sent back to the Google Assistant.

Upvotes: 1

Related Questions