Q1 2021 - CSML Features Roundup

News May 9, 2021

We've been busy releasing quite a lot of new features and improvements in CSML Studio lately. Let's do a quick roundup of some of the most interesting features that you might have missed!

To keep up to date with all the latest news and features, you should definitely pay us a visit on Slack or check out our Updates page (which is also available as a widget in the top right corner of the Studio)!

Studio Features

CSML Playground ▶️

The most recent launch was the brand new CSML Playground, an open playground to make it even easier to learn, test, debug and share CSML code. It is simply the best way to try CSML, as it requires no login, no installation, and is fully plug and play. We see it as a Codepen for Chabots!

👊 Try it now on https://play.csml.dev. It's completely free!

We use it all the time ourselves to help our users with debugging and showing some cool CSML patterns! 😎

Bot Snapshots 📸

Snapshots are a very simple way to create different versions of your bot and come back to any of those versions easily. Different snapshots can also be deployed on different channels: a very good use case is to have a development/staging channel, and a production channel, where the production channel is pinned to a stable version of the bot while you keep working on your bot and testing it on a separate channel.

👉 Learn more about Bot Snapshots

On-Premise Chatbot Hosting

If you are especially concerned about data security for whatever reason, and prefer to host the CSML Engine on your own servers, you can now do so very easily, by simply pointing to your self-hosted engine in your Bot Settings:

For reference, we wrote an article in this blog a few weeks ago about hosting your own CSML Engine. When hosting the CSML Engine on your own servers, you keep access to all your Apps (which are still hosted on the cloud).

As an aside, if you do need access to private resources (behind a firewall for instance) but don't want to go through the added complexity of hosting the CSML Engine yourself, consider using a proxy server where you can run your own custom code, like so:

Simple Hybrid Cloud/On-Premise CSML Studio architecture

IP Allow List

Making sure that only the right people can connect to your chatbot is often of utmost importance. One way to do that is to restrict where people can access the chatbot from, which can be done using the new IP Allow List feature in CSML Studio.

Under your webapp's configuration page, simply enter all the IP addresses that you intend to connect to the chatbot from, save, and voilà! 🤗

If you want to secure the connexion of your users to your chatbot, you can also use NoPass.me, an open-source one-time password solution that we recently launched and is already used by many of our users.

Webapp UI Customization


Finally, we also added more customization options for the UI of the webapp channel! With this update, CSML chatbots can now completely match your branding by changing the colors and images.

Additionally, you can now choose to entirely disable the Speech To Text feature for your webapp users if necessary.

Language Features

With CSML v1.6.0 just around the corner, now is as good a time as ever to come back to some of the main highlights from the great v1.5.0 milestone!

Variable Steps and Flows

Being able to set a dynamic value for the goto operations has been on our TODO list for a long time. It's now a reality, which can easily be achieved using the new dynamic $var syntax, making any string variable that is also a valid step/flow name accessible in goto statements.

The following is valid CSML (try it here on CSML Playground):

start:
  do buttons = [
    Button("Green", next="greenStep"),
    Button("Blue", next="blueStep"),
  ]
  say QuickReply(
      "Click on a button:",
      buttons=buttons
    )
  hold
  do matched = event.match_array(buttons)
  if (matched) {
    do next = matched.next
    goto $next
  }
  else goto start
  
greenStep:
  say "I'm green!"
  goto start

blueStep:
  say "I'm blue!"
  goto start

Bot Environment Variables 🤫

You can now easily inject global, read-only variables in your CSML bots, available under the new _env property. This allows you to inject easily accessible secrets or configuration options, instead of having to save them in the current user's memory or writing them in plaintext in your chatbot's code. It is by far the most secure option for storing secrets and you should all start using it!

By the way, in CSML Studio, environment variables can easily be configured under Bot Settings > Environment Variables.

Cryptography Modules

You can now do crypto in CSML! I'm not talking about Bitcoins though... 😅
We have introduced new methods to encrypt, decrypt and hash data using the most commonly found methods, including JSON Web Tokens (JWT), Base64, MD5, the SHA family of hashing algorithms, etc.

You can find the full documentation and examples here in the CSML Docs!

Tags