# Rasa dynamic button values from API issue

**URL:** <https://forum.rasa.com/t/rasa-dynamic-button-values-from-api-issue/61945>\
**Category:** Rasa Open Source\
**Created:** [May 13, 2024, 6:23pm UTC](https://forum.rasa.com/t/rasa-dynamic-button-values-from-api-issue/61945 "2024-05-13T18:23:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hindavi](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@hindavi](https://forum.rasa.com/u/hindavi)\
**Post date:** [May 13, 2024, 6:23pm UTC](https://forum.rasa.com/t/rasa-dynamic-button-values-from-api-issue/61945/1 "2024-05-13T18:23:58Z")

</div>

Hello all!

I have rasa buttons that have title and payload values filled from API, making it dynamic. The custom action(action\_ask\_menu\_list) is a form where I have these buttons that look like this,

{“title”: f"{menuName}“, “payload”: '/all\_menu\_button{“menu\_id”: " '+f"Menu id is {menuid}”+’ "}'}

PS: {menuName} and {menuid} fetched from api.

I am trying to set slot, ie menu\_list = {menuid}, in the validation action for this custom action and then jump onto the next custom action form(action\_ask\_categpry\_list) where this {menuid} will be used for showing categories within the selected menu by the user(again same dynamic buttons thing).

It’s working perfectly fine on the command prompt. However, I am not able to execute this idea while trying on Postman.

My rules look like this,

- rule: submit menu name for category condition:
  - active\_loop: menu\_list\_form steps:
  - action: menu\_list\_form
  - active\_loop: null
  - slot\_was\_set:
    - requested\_slot: null
    - menu\_list: null

  - action: categories\_list\_form
  - active\_loop: categories\_list\_form
  - slot\_was\_set:
    - categories\_list: null
    - requested\_slot: null

**nlu.yml:**

- intent: all\_menu\_button examples: |
  - Menu id is 201(menu\_id)
  - Menu id is 201
  - Menu 201(menu\_id) - BREAKFAST AND BRUNCH
  - Menu 201 - BREAKFAST AND BRUNCH
  - Menu [201] - BREAKFAST AND BRUNCH(menu\_id)
  - Menu id is 273

**Domain.yml:**

slots: menu\_list: type: any influence\_conversation: false mappings: - type: from\_entity entity: menu\_id conditions: - active\_loop: menu\_list\_form requested\_slot: menu\_list

forms: menu\_list\_form: required\_slots: - menu\_list

entities:

- menu\_id

intents:

- all\_menu\_button

Can someone help me with this?
