How to send more data along with message to Rasa bot

Hello everyone,

I am new to rasa and I want to send more data to the rasa bot along with the message to use those values in retrieving other data.

For example I hit this URL to interact with rasa from my website “http://localhost:5005/webhooks/rest/webhook” as a Post request with the payload { message: “hello there”, sender: “test” }

is this possible to add other variables(some more info of user which I want to retrieve in actions) here if so what would be the key-value pair and how can I retrieve that data in the rasa server to save/use in

Thanks in advance!

1 Like

Hello @rajathms, welcome to the Forum!

A good way to send information to your assistant that is not necessarily a user text is via the intent trigger endpoint. With this, you can inject a special event that you define for just this purpose and send all your special information via an entity.

1 Like

Yes, it’s possible to send additional data along with your message to Rasa. You can include extra key-value pairs in your payload, and Rasa will receive them as part of the message. Here’s an example of how you can structure your payload: { “message”: “hello there”, “sender”: “test”, “custom_data”: { “user_info”: “some_info”, “other_variable”: “some_value” } }

In this example, the custom_data field contains additional key-value pairs that you want to send to Rasa.

To retrieve this crm data enrichment in your custom actions in, you can access it from the tracker object. The tracker object contains information about the conversation, including the slots and any entities extracted from the user’s messages.

1 Like