What's New in CSML v1.5.0

frsechet

Francois Falala-Sechet

Posted on March 20, 2021

What's New in CSML v1.5.0

We just released CSML v1.5.0! šŸŽ‰ Let's have a quick look together at some of the highlights of this release...

Crypto Utils

Most systems nowadays require some sort of specific authentication or encoding to communicate securely. In this release, we introduced support for Base64 and Hex encoding/decoding, creating and validating JWTs, as well as hashing and HMAC functions.

Here are some examples of what you can do with the new Crypto utils:

say Crypto("Hello World šŸ˜†").create_hash("sha256").digest("hex")

do JWT(jwt).verify(claims, "HS256", "SECRET_KEY")

do auth = Base64("user:password").encode()
do HTTP("https://example.com")
  .set({ "Authorization": "Basic {{auth}}" })
  .send()
Enter fullscreen mode Exit fullscreen mode

šŸ‘‰ Link to the documentation

Dynamic Steps and Flows

Dynamically navigating to other steps and flows was quite hard and cumbersome to achieve until today. It usually required a long list of if (x) goto y in your code, similar to this example.

Now, you can use the new $ syntax used for referencing variables in flow and step names instead: goto $stepname@$flowname. This helps make code much more concise and reusable!

Using dynamic steps and flows, the example from above can easily be refactored like so:

// redirect to a random flow in a list of possible targets
do flows = ["flowA", "flowB", "flowC"]
do targetFlow = OneOf(flows)

goto flow $targetFlow
Enter fullscreen mode Exit fullscreen mode

šŸ‘‰ Link to the documentation

Bot Environment Variables

Efficiently and securely storing and accessing bot-wide variables (such as API keys, default configuration values, etc.) was quite difficult to do until now in CSML, since it usually required either writing these variables in clear text in many places in your bot, or replicating them in each user's memory.

With the new _env global read-only variable, you can access bot-wide environment variables everywhere in your bot, without ever needing to remember them or replicating the value written in clear text anywhere in the bot.

For instance, if the bot communicates with a 3rd-party API, you can store this value under MY_API_KEY and use it anywhere in the bot with _env.MY_API_KEY.

šŸ‘‰ Link to the documentation

CSML Studio Updates

CSML Studio also received some love with the latest update. Here are some of our favorite new features!

Introducing: Bot Snapshots

It is a good practice to never work directly on your production code, in order to avoid impacting your end users when updating your code. This is why we just introduced Bot Snapshots: you can think of snapshots as git tags or github releases for your chatbot.

Using Snapshots, you can easily create tagged versions of your bot, pin them to your production channels as to not risk any disruption during development, or revert your code to a previous version at any time!

image

New Bot Sharing Experience

In the latest release of CSML Studio, we changed the way you can share bots with other users. You can now share any individual bot with any user, rather than all of your bots with a group of users who will also share their bots with you in return.

This is especially useful if you are working on bots that you need to share with different sets of users. For instance, if one team is working on a bot and another team is working on a different bot, you can now work on both bots without creating 2 separate accounts or giving access to both bots to both teams.

To invite a user or revoke someone's access to a bot, visit your bot's Settings > Team > Manage team.

image

In an upcoming release, we will also introduce roles, with differentiated access rights to each bot. Stay tuned!

Other Improvements!

In this latest update, we also released:

  • a brand new IDE with better support for CSML language, autocompletion and syntax highlighting šŸ‘©ā€šŸ’»
  • a new "Sign-in with facebook" button to make it easier for facebook users to create a free CSML Studio account šŸ”‘
  • a standardized experience for NLU-enabled chatbots ā€” check the details here šŸ’¬
  • ... and also a lot of little tweaks and bugfixes šŸ¤“

All these new features are already live on CSML Studio. Try them out today and let us know what you think!

šŸ’– šŸ’Ŗ šŸ™… šŸš©
frsechet
Francois Falala-Sechet

Posted on March 20, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What's New in CSML v1.5.0
programming What's New in CSML v1.5.0

March 20, 2021