0
votes

I have added few items in the list response so that user can select an item from the list

scenario

bot: hello what you want to update (list will open with options as{title, objective, place})
user: title {selects either by clicking or typing}
bot: Enter your title (webhook response)
user: xyz
bot: record updated
but the issue is when user clicks on any item it gives me an error

"Sorry, Test Apps isn't responding right now. Please try again soon."

and the reason for this error is

MalformedResponse Failed to parse Dialogflow response into AppResponse: Index: 0.

this is my code

app.intent(CREATE_INTENT, (conv) => {
conv.ask("Here's the list");
  conv.ask(new List({
    title: "Select an option to update",
    items: {     
      'SELECTION_KEY_TITLE': {
        synonyms: [
          'Title',
          'title',
        ],
        title: 'title',
        description: 'Click here to update title',
        image: new Image({
          url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',          alt: 'Image alternate text',
        }),
      },

      'SELECTION_KEY_PLACE': {
        synonyms: [
          'place',
          'Place',
      ],
        title: 'place',
        description: 'This is for updating your city name',
        image: new Image({
          url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',          alt: 'Google Home',
        }),
      },

      'SELECTION_KEY_OBJECTIVE': {
        synonyms: [
          'objective',
          'Objective',
        ],
        title: 'objective',
        description: 'select to update objective',
        image: new Image({
          url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',          alt: 'Google Pixel',
        }),
      },
    },
  }));

app.intent(TITLE_INTENT, (conv, option) => {  
       if (option === SELECTION_KEY_TITLE) {
     conv.ask("Please enter your resume title");
     } else if (option === SELECTION_KEY_PLACE) {
     conv.ask("What's your current city?");
     } else if (option === SELECTION_KEY_OBJECTIVE) {
     conv.ask("Please enter your objective");
     } else {
         conv.ask('Sorry! please select one option to update.');
         conv.ask(new Suggestions(['Title', 'Place', 'Objective']));
     }
});
2
It seems like there is an issue with your JSON response, which I'm guessing comes from code executed in a webhook. I believe you should look at the List response documentation and make sure you're implementing it correctly.Nick Felker
@NickFelker thanks for your reply but I am not using webhook. all the intents, entities and responses are written in dialogflow.Vikas Patidar
Can you update your question to show screen shots of all the Intents you have configured? Seeing screen shots of your test configuration may also help, along with the text from the "request", "response" and "debug" tabs in the simulator. In short - anything that could help us understand what might be happening so we can help you.Prisoner
It was context issue now it's resolved but I am getting new issue that when I select an item from the list then it triggers my fallback intent instead of follow-up intent.Vikas Patidar
@Prisoner I have added the screenshotsVikas Patidar

2 Answers

1
votes

Your screenshots indicate you have a list that you're interacting with by touching it - but you said you don't have any webhooks. Handling a list interaction can only be processed via webhook.

You don't show all of the Intents, but it seems likely that the Fallback Intent is called (as you mention in the comments) because you don't have an Intent that handles the action_intent_OPTION Event.

It sounds like you probably want to use suggestion chips rather than a List. Suggestion Chips are good for helping guide the user about how they can continue the conversation, while Lists are good for presenting results and having the user select one of these results. Suggestion chips are also treated exactly as if the user had said or typed them and do not require special handling to process.

0
votes

I figured out this issue we have to remove all the training phrases from the TITLE_INTENT and make sure in the event section you have to add actions_intent_OPTION