Define custom action for buttons

How do I define custom action for button defined in templates of domain.yml? I want to define it instead of domain.yml.


  • text: “Would you like to continue?”


    • title: “Yes”

      payload: ‘/mark_done{“choice”: “yes”}’

    • title: “No”

      payload: ‘/mark_done{“choice”: “no”}’

your payload in buttons is typically your intents for predicting the next action

-- Story 1
* mark_done{"choice":"yes"}
- custom_action1

-- Story 2
* mark_done{"choice":"no"}
- custom_action2