Facebook Quick Replies Not working - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

Facebook Quick Replies Not working

post by IsraaMohamedHamid on Jan 12, 2021

I am trying to add quick replies to my domain and it says that quick_replies is not defined. This is the error:

israa@israa-VirtualBox:~/Desktop/Rasa/Restaurant/English Code Using Zomato$ rasa train
YamlValidationException: Failed to validate ‘/home/israa/Desktop/Rasa/Restaurant/English Code Using Zomato/domain.yml’. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation:
in /home/israa/Desktop/Rasa/Restaurant/English Code Using Zomato/domain.yml:117:
Key ‘fb_quick_replies’ was not defined. Path: ‘/responses/utter_ask_cuisine_en/0’

and this is the domain:

utter_ask_cuisine_en:
  - channel: facebook
    fb_quick_replies:
      - payload: Chinese
        title: Chinese
        content_type: text
      - payload: Italian
        title: Italian
        content_type: text
      - payload: South Indian
        title: South Indian
        content_type: text
      - payload: North Indian
        title: North Indian
        content_type: text
    text: what kind of cuisine would you like?

from my understanding that quick replies is already predefined in rasa, I’ve check the facebook.py in the rasa file and it is there. So why isn’t it working?

P.S. I’ve tried to make it work in the actions file by using carousels and I didn’t know what the code I should write is, I’ve tried several and they’re all not working.


post by IsraaMohamedHamid on Jan 12, 2021

It stopped giving me that error when I fixed the space, new code:

utter_ask_cuisine_en:
  - channel: facebook
    custom:
      quick_replies:
        - content_type: text
          payload: Chinese
          title: Chinese
        - payload: Italian
          title: Italian
          content_type: text
        - payload: South Indian
          title: South Indian
          content_type: text
        - payload: North Indian
          title: North Indian
          content_type: text
    text: what kind of cuisine would you like?

Now however when I run the code and open facebook I don’t get anything. What is the error?


post by IsraaMohamedHamid on Feb 18, 2021

Solution to the problem:

  utter_ask_cuisine_en:
  - channel: facebook
    custom:
      quick_replies:
      - content_type: text
        title: Fast Food
        payload: Fast Food
      - content_type: text
        title: Traditional Food
        payload: Traditional Food
      - content_type: text
        title: Syrian Food
        payload: Syrian Food
      - content_type: text
        title: Yemeni Food
        payload: Yemeni Food
      - content_type: text
        title: Dessert
        payload: Dessert

Make sure the indentation at the beginning of the lines are equal to this code.

This is for the elements as well:

  utter_ask_search_restaurant_based_on_en:
  - channel: facebook
    elements:
    - title: One Option
      buttons:
      - title: Location
        payload: /Location_en
      - title: Cuisine
        payload: /Cuisine2_en
      - title: Cuisine Type
        payload: /Cuisine__Type_en
    - title: Two Options
      image_url: https://www.flickr.com/photos/mayaw/4479098442/
      buttons:
      - title: Location & Cuisine
        payload: /Location_and_Cuisine_en
      - title: Cuisine & Cuisine Type
        payload: /Cuisine_and_Cuisine__Type_en
      - title: Location & Cuisine Type
        payload:  /Location_and_Cuisine__Type_en

Related topics

Topic Replies Views Activity
Facebook Quick Replies Error 3 502 Dec 2020
Facebook quick_replies not showing on rasa 2.x 1 541 Jul 2021
How to give Quick replies in domain.file using “custom” for Facebook quick replies 1 1.2k Aug 2019
Facebook Quick_reply doesn’t work 8 1.1k Jan 2020
Facebook quick replies are not working 3 645 Oct 2019