# Rich response-buttons passing entities does not work

**URL:** <https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799>\
**Category:** Rasa Open Source\
**Created:** [October 27, 2021, 11:06am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799 "2021-10-27T11:06:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![atptour](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atptour](https://forum.rasa.com/u/atptour)\
**Post date:** [October 27, 2021, 11:06am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/1 "2021-10-27T11:06:21Z")

</div>

Hello ![enopsbot.zip|attachment](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/1/4/14c64967378c39566b87849fb3216a7d877ac7bc.zip) (4.8 KB)

I generate a new project which want to use buttons passing entities. But after training the bot did not act according to the story I defined.

According to the rasa docs, the button payload should be writen in this format: payload: '/inform{{“insurance”:“motor”}}'

 ![rasa_debug](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/a/5/a5d0c27f034e99392efa4e41c69ba2de367efe91.png)

We must use ‘/’ after ‘payload:’ and before intent name. Right? The strange thing is that the dialogue will not follow the story in this writing. And when I delete the ‘/’ it works well. I dubuged the rasa source code under these two domain configurations. I debuged rasa/core/policies/memoization.py predict\_action\_probabilities function. In with ‘/’ condition, the last state in the figure attached has an addtional entities, this due to predicted\_action\_name = self.recall(states, tracker, domain) to be None. So the dialogue was stopped after processing this intent. No utter\_ action was trigged. The self.recall return None. In without ‘/’ condition, the self.recall return correct action name. I attached the project files. You may run this project to find out the problem. Maybe a bug. The rasa version: Rasa Version : 2.8.1 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.1 Rasa X Version : 0.39.3 Python Version : 3.8.12 Operating System : Linux-3.10.0-1160.42.2.el7.x86\_64-x86\_64-with-glibc2.17 Python Path : /root/anaconda3/envs/rasa3/bin/python

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [October 27, 2021, 11:50am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/2 "2021-10-27T11:50:51Z")

</div>

@atptour can you please format the code? or shared some related file with us.

---

<div class="post-metadata">

**Author:** ![atptour](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atptour](https://forum.rasa.com/u/atptour)\
**Post date:** [October 28, 2021, 7:49am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/3 "2021-10-28T07:49:43Z")

</div>

Please: git clone [https://github.com/atptour2017/opsbot.git](https://github.com/atptour2017/opsbot.git)

I attached the zip file in the origin topic, but it seems that we can not download file from this forum. Thanks!

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [October 28, 2021, 8:10am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/4 "2021-10-28T08:10:52Z")

</div>

@atptour you need to upload every files respectively to the forum, give me some time and I will dry run the code.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [October 28, 2021, 12:38pm UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/5 "2021-10-28T12:38:51Z")

</div>

@atptour I have seen your syntax of domain.yml please change this

```auto
 utter_mt_no_media:
  - text: "you select mt no media, please select media type"
    buttons:
    - payload: /get_media_type{"media_type":"video"}
      title: video
    - payload: /get_media_type{"media_type":"audio"}
      title: audio

```

I hope this will help you?

---

<div class="post-metadata">

**Author:** ![atptour](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atptour](https://forum.rasa.com/u/atptour)\
**Post date:** [November 1, 2021, 6:25am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/6 "2021-11-01T06:25:23Z")

</div>

I attach four figures in this text with Figure 1 2 3 4 order. (I am not familiar with this forum, maybe the forum will change the order to show, please pay attention.)

It seems that the main change is changing {{}} to {}. I changed domain according to your suggestion, but it doesn’t work and triggered some errors. See Figure 1.

 ![figure1](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/2/4/24ee804f81299dc513861d7ce8a96e6007e99150.png)

See the Figure2. In rasa official doc, the format of passing entities is to use {{}}. ![figure2](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/1/2/12ce0c10bd5549a81ba99caba5fcc568419afb7c.png)

With my origin domain.yaml the running result is show in Figure 3. After selecting media type there is no utter message triggered. I make an addtional input then the utter is triggered. It does not work according to my story.

 ![figure3](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/5/1/51fbd43f4b94cafd71980dc485667a1734e4bf92.png)

When I delete ‘/’ in domain basing on my original domain.yml, the running result is show in Figure 4. The utter is trigged immediately after I select a media type. That’s what I want.

 ![figure4](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/a/d/ad4c6185efb92eac43f12c75d7242e457ae7be01.png)

So how can we realize the result in Figure 4 but with the format described in rasa doc? It seems to be a conflict. Is the rasa doc wrong or just a bug of rasa source code? That’s my question.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [November 1, 2021, 11:34am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/7 "2021-11-01T11:34:16Z")

</div>

please share the stories.yml file please.

---

<div class="post-metadata">

**Author:** ![atptour](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atptour](https://forum.rasa.com/u/atptour)\
**Post date:** [November 2, 2021, 12:53am UTC](https://forum.rasa.com/t/rich-response-buttons-passing-entities-does-not-work/48799/8 "2021-11-02T00:53:44Z")

</div>

The story.yml was in the zip file of github repository: [https://github.com/atptour2017/opsbot.git](https://github.com/atptour2017/opsbot.git). I have shown this url in the message above.

I also attach the file content here:

version: “2.0”

stories:

- story: no media path steps:

- story: no vmp path steps:
