Provide metadata to custom actions

Hello,

I have a scenario where I need to leverage metadata into rasa:

  • the application calls the rasa bot for an authenticated user and must provide some metadata regarding this user in the HTTP webhook call
  • the rasa bot needs to access these metadata in custom actions to execute processing specific to the user

Is it possible and how to implement such processing?

Thanks very much for your help! Thierry

Store it in unfeaturized slots. Unfeaturized slots don’t interfere with prediction.

Say you want to store it in an unfeaturized slot called metadata, you can set the slot via calls to the tracker API, or sending a message like this to the Rasa API: /greeting{"metadata":"save the data you need later here"} (Where greeting is an intent)

To retrieve the data in your custom action, use tracker.getslot('metadata')

Let me know if you need more info.

Thanks very much for your answer!

I saw there is a custom property in the domain. Would it be possible to fill it each time a request is sent to the chat bot?

Thierry