CSML is especially great to handle logical conversation steps, but sometimes the event received from the user is not enough to decide where to go next. This is why we added the new Event Preprocessors, now available inside the bot's Settings panel.
With Event Preprocessors, you can now run every single incoming event through any number of your existing functions. For example, you can decide to detect the language of the user's input, then run it through a NLP library of your choice, and then if it matches a given intent, change the type of the event to a
flow_trigger to trigger a specific flow.
Another interesting use case for the Event Preprocessor is to be able to copy uploaded data from a temporary upload to a more permanent storage solution. This is especially useful when using channels such as Messenger or Slack, where files are uploaded to their servers and the URL that they provide expires after a while! In the screenshot above, we event hooked an image analysis library to learn a bit more about what's in the uploaded image!