Payload error in Buttons - RASA PRO CALM - Rasa CALM - Rasa Community Forum
Payload error in Buttons - RASA PRO CALM
post by sk1382 on Jul 10, 2024
Flow in the flow.yml:
yes:
description: This flow activates if user presses YES button
steps:
- collect: user_place
- collect: user_pincode
- action: utter_appointment_booked
no:
description: This flow activates if user presses NO button
steps:
- action: utter_appointment_cancelled
```
**Utterance with payload format 1 in domain.yml**
```yaml
utter_ask_final_confirmation:
- text : "Enter your choise"
buttons:
- title: "YES"
payload: "/yes"
- title: "NO"
payload: "/no"
```
**Utterance with payload format 2 in domain.yml**
```yaml
utter_ask_final_confirmation:
- text : "Enter your choise"
buttons:
- title: "YES"
payload: "yes"
- title: "NO"
payload: "no"
```
**Error with payload format 1:**
```auto
2024-07-10 12:19:37 ERROR rasa.validator - [error ] The button 'YES' in response 'utter_ask_final_confirmation' does not follow valid payload
formats for triggering a specific intent and entities or for triggering a SetSlot command. calm_docs_link=https://rasa.com/docs/rasa-pro/concepts/r
esponses#payload-syntax event_key=validator.validate_button_payloads.invalid_payload_format nlu_docs_link=https://rasa.com/docs/rasa-pro/concepts/responses#triggering-intents-or-passing-entities
C:\Users\chich\PycharmProjects\New_Rasa\lib\site-packages\rasa\shared\utils\io.py:86: UserWarning: Failed to parse arguments in line '/non'. Expecte
d the intent to be one of [['back', 'nlu_fallback', 'out_of_scope', 'restart', 'session_start']] but found non.Continuing with given line as user text.
More info at https://rasa.com/docs/rasa-pro/nlu-based-assistants/stories
2024-07-10 12:19:37 ERROR rasa.validator - [error ] The button 'NO' in response 'utter_ask_final_confirmation' does not follow valid payload
formats for triggering a specific intent and entities or for triggering a SetSlot command. calm_docs_link=https://rasa.com/docs/rasa-pro/concepts/re
sponses#payload-syntax event_key=validator.validate_button_payloads.invalid_payload_format nlu_docs_link=https://rasa.com/docs/rasa-pro/concepts/responses#triggering-intents-or-passing-entities
```
**Error with payload format 2:**
image link: [image from rasa inspect](https://imgur.com/a/V3XYXQY)
Its either error with “/” in the payload or cannot select the button in `rasa inspect` without “/” in the payload.
Is there any other way to use the payload or any format to be used in the payload?
### post by Balowen on Jul 26, 2024
Hi!
In rasa-pro 3.9 you can use the following format for button payloads: [issuing-set-slot-commands](/content/docs/rasa-pro/concepts/responses#issuing-set-slot-commands/index.html). Please also check the tutorial [here](/content/docs/rasa-pro/tutorial/#branching-logic/index.html) to learn how to build branching logic based on slots.
### post by sk1382 on Aug 1, 2024
Thank you [@Balowen](https://forum.rasa.com/u/balowen) . It got trained good and working fine.
### post by tandon69 on Aug 6, 2024
Encountering a Payload error in Buttons in RASA PRO CALM typically suggests an issue with the payload format or content of buttons in a chatbot. It could be due to an incorrect payload structure, data type mismatch, or unsupported content. Ensure that the payload is correctly defined and conforms to the expected structure for RASA’s button interactions.