CSML updates
CSML updates

Resources Center





You can now find on https://studio.csml.dev/resources a brand new Resources Center that contains links to all the CSML support resources.

On this page, you can find links to the documentations (Studio, Language), the Slack Community, the CSML Blog and Newsletter, and the CSML Engine source code on Github!


CSML v1.6.1 Release





We just released CSML v1.6.1! This update brings a few bugfixes and improvements, but also two interesting new features.

New keyword: forget

This new keyword lets CSML remove data from its memory and, well, obviously, forget things. You can see an example here: https://play.csml.dev/bot/e5804690-d98f-49e2-89be-7530ac9de212

The documentation is here: https://docs.csml.dev/language/standard-library/keywords#forget

Prevent infinite loops

If you have ever been in a situation where a CSML code was running in an infinite loop by mistake, with no way to kill the loop, this feature is for you.

For example, consider this:

  do something()
  goto start

This will now stop after 100 loop executions in a single run (without any "hold" or "goto end"). It should be more than enough as to not be blocking any normal use cases, but it will also prevent you from being stuck there forever.

As usual, the release notes are on Github: https://github.com/CSML-by-Clevy/csml-engine/releases/tag/v1.6.1

New Stripe App





Using our new Stripe integration, you can now securely accept payments directly in your chatbots and start monetising your content!

This integration comes with a new Stripe() component to display a payment form to the user when they should enter their credit card information. The process is easy to setup, fully secure and happens directly on Stripe's servers, to ensure compliance with PCI-DSS rules.


You can read more about this integration on its page: https://www.csml.dev/studio/integrations/stripe/

Discover all our powerful integrations here: https://www.csml.dev/studio/integrations

New Multiselect and Input Components





With the release of CSML v1.6, we have just added 2 new custom Webapp components in CSML Studio, especially useful for form-types of chatbots: Input and Multiselect. Let's see what they have to offer!


With the Input component, you can let your users type specific information directly in the chat bubble, like so:


You can use several types of inputs: text, textarea, email, url, number. They all come with their own validator to ensure that only valid content is set in the input: that's why it's so useful! For instance, this is a number input:


It's possible to set rules on the content of the input (like in regular HTML inputs), for instance minlength/maxlength for text/textarea types of inputs, or min/max/step for number types. They can also be set as required if an empty field must not be accepted.

You can also set a placeholder and/or a default value:


Input components are interpreted as simple text components on other channels, with no further validation of the content made by the component itself.


The Multiselect component lets the user pick several options at once. You can add as many options as you want, and set rules for the minimum or maximum number of options the user can or should select.


Multiselect components are only available on the Webapp channel, as most channels don't support selecting multiple options per input.

CSML v1.6 Release





We just released CSML v1.6! Once again a great update from the team, that comes with many improvements and bugfixes, but also 3 important features that we are going to highlight now. You can as usual check all the release notes here on Github (and don't forget to star our repo!).

Data Management API

We added several endpoints to the CSML Engine API that let you access or manage your user data programmatically. This makes it much easier to return all conversations a user had with a chatbot, update their memory if a certain event happens outside of the context of the conversation, or delete everything related to a user in case they made a data deletion request (looking at you, GDPR! 🥸).

For reference, here are all the endpoints available in the CSML Engine.

Fully Printable Memory

Speaking of user data, with the introduction of the new _memory global variable, you can now print all the memory of a user at any given time:

// print all the keys and first-level values in a readable format:
debug _memory

// or for a full but unformatted output:
say "{{_memory}}"

Read the docs


With the new Time() utility function, you can now easily manipulate time objects. This was one of the main requests we've had for a long time, and here it is!

With this function, you can generate Time objects for any given date, past or future, format it into a nice string or unix timestamp, and even parse ISO-formatted strings into Time objects!

do time = Time()
do time = Time().at(2021, 03, 28, 12, 53, 20, 123)

do time.unix()

do time.format()
do time.format("%h%d")

do time = Time().parse("2021-03-28T12:53:20.123Z")

Read the docs

Debugging Apps in Studio





Sometimes, code doesn't work the way we intend to. In those cases, it's always helpful to print the value of a parameter or variable, using a simple console.log in javascript (or the equivalent in all other supported languages).


In the app testing interface, you can now access your app execution logs right after executing it. Simply click on the Logs tab after running the app:


IP Allow List





If you know what IP your Webapp channel is going to be requested from and need to prevent other IPs to be able to access it, you should definitely use our new feature: IP Allow List.

You can find this new setting under your Webapp's advanced configuration panel. Leave it empty for no restriction, or add individual IPs to prevent any other IP to access the chatbot.


Webapp UI Customization





You can now customize the UI of the webapp channel! With this update, CSML chatbots can now completely match your branding by changing the colors and images.


This is probably one of the most requested features of all time. Not much more to say about it: check out the documentation!

Bot-Wide Environment Variables





You can now easily configure bot-wide environment variables!

When you need to access some static values across all your users and all your flows, you should use Bot Environment Variables.

Bot Environment Variables are injected in all your conversations under the _env global variable and are accessible everywhere, without ever being injected in the current user's memory so you can always keep them up to date for all of your users. They are also encrypted for enhanced security.

This is a perfect use case for API keys or secrets, as well as global configuration options!


New release: v1.5.0 🎉





CSML v1.5.0 was released today! Check the release notes for all the details about this new version.

There are many important features in this version, but I would like to highlight just a few of them that seem the most important.

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 data, creating and validating JWTs, as well as hashing and HMAC functions.

👉 Link to the documentation

Variable Step and Flow Names

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

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!

👉 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, 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 in the bot with _env.MY_API_KEY.