Generic templets in Facebook messenger api

Hi,

I am trying to send a Carousel of Generic Templates but no luck. Here is my implementation.

>   response = [{
>                        "title": store_name,
>                        "subtitle": "this is a test address",
>                        "image_url": "http://s3.amazonaws.c/15351164test.jpg",
>                        "buttons": [{
>                            "type": "postback",
>                            "title": "Select Store",
>                            "payload": store_id + " " + store_name,
>                        }]
>                    }, {
>                        "title": store_name,
>                        "subtitle": "this is a test address",
>                        "image_url": "http://s3.amazonaws.com/TestCapitalhypermarket.jpg",
>                        "buttons": [{
>                            "type": "postback",
>                            "title": "Select Store",
>                            "payload": store_id + " " + store_name,
>                        }]
>                    }]
    # import flask
    # my_test_jaon = flask.jsonify(response)
    #
    my_test_jaon = json.dumps(response)
    dispatcher.utter_custom_message(my_test_jaon)

Guys, please let me know, what I am doing wrong. I using rasa core 0.12.1 Thanks

Hi issue solved. I used

    #my_test_jaon = json.dumps(response)
    dispatcher.utter_custom_message(*my_test_jaon)

This is sending my elements in send a Carousel of Generic Templates with horizontal scrolling.

courtesy -

How to send custom carousel with facebook MessengerBot ?

I don’t know if the message should be sent as json or as utter_response_products. I have 5 products that I want to show in messenger.