New Docs

We just released a new version of the CSML documentation, accessible on https://docs.csml.dev.

The new version of the docs is more readable, with more detailed examples and a better search. You can also download a PDF version for offline reading!

Capture d'écran 2020-03-05 09.28.26.png

Also, as per our commitment to the open source community, the docs are automatically built from this Github repository, which is open to issues and pull requests!

Event Preprocessors

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.

Capture d'écran 2020-03-04 12.26.16.png

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!

Introducing the CSML StdLib

All languages have a set of useful helper methods, adding convenient ways to do simple things. With this latest release, we are introducing the CSML StdLib: a series of functions that you can use to routinely perform everyday actions in your flows.

You will find mathematical operations, string manipulation, regex tooling, object and array helpers…

Head over to the documentation to learn more about the CSML StdLib!

New: CLI client

You can now discuss with your CSML chatbots right from the terminal, thanks to this neat little CLI tool we published just last week!

To install it on your machine, simply run npm install -g csml-client-cli, then run csml-client -h for further help.

The fun touch: all static Image() components are converted to colorful ascii art!

example.png

Happy testing!

New Channel: Google Assistant

We just added a full integration with Actions on Google, allowing you to now use your CSML bots with Google Assistant compatible devices!

l_10186041_012.jpg

CSML integrates with voice-only or voice+screen devices, which makes it possible to very easily create rich voice interfaces. This is the first voice channel we are adding on the CSML studio. More are coming soon so stay tuned!

Save invalid flows

One of the most common feedbacks we received was that it was impossible to save flows that were not valid. The reason we did that was to prevent your bots to be in an impossible state where the CSML engine was unable to parse the flows during the run phase.

We just added a build phase to prepare your bot for running (think of it as a "compilation" step, required before running your bot), which means that you can save temporarily invalid flows without impacting running bots. This is overall great for platform stability as it prevents you from harming your bot while allowing you to save your work often, and a first step towards an upcoming full bot versioning capability.

Take advantage of this new feature now!

New keyword: break

You can now use the break keyword to get out of loops early.

remember lightsabers = [
  {"color": "red", "owner": "Kylo Ren"},
  {"color": "red", "owner": "Darth Maul"},
  {"color": "purple", "owner": "Mace Windu"},
  {"color": "green", "owner": "Yoda"},
  {"color": "red", "owner": "Darth Vader"},
  {"color": "green", "owner": "Luke Skywalker"},
  {"color": "yellow", "owner": "Rey Skywalker"},
 ]

foreach ls in lightsabers {
  say "{{ls.owner}} had a {{ls.color}} lightsaber"
  // we want to stop after we find the first green lightsaber
  if (ls.color == "green") break
}

[Workplace chat] Broadcasts, welcome flow, persistent menu

We have just added a few settings in the Workplace Chat configuration page. You can now configure the behavior of your bot upon receiving a Get Started event as well as an option to setup a persistent menu according to the documentation.

Capture d'écran 2020-01-13 11.31.12.png

Additionally, the _metadata property will be automatically populated with all the fields defined in the Workplace member object.

Finally, you are now able to send broadcasts, which are notifications sent from the bot to the user at times chosen by you.

Import and export full CSML bots

🎉 This one is huge!

You can now export and import full bots as a simple zip archive.

To export a bot is as simple as visiting your list of bots and clicking on the "export" icon next to the bot you want to download:

Capture d’écran 2020-01-04 à 12.46.59.png

One caveat: for security reasons, your functions configuration will not be exported into the zip archive, to prevent secrets to be leaked in public repositories. This means that after importing the bot, you will need to reconfigure the functions with new environment variables.

You can import a bot simply using the "Import" button at the bottom of the same page:

Capture d’écran 2020-01-04 à 12.36.38.png

To import a bot, you can either:

  • upload a zip archive of a bot that was previously exported the same way,
  • provide the URL to a (public) Github repository where your bot is stored.

You can find an example of such a bot here: https://github.com/CSML-by-Clevy/FunBot (or direct link to zip archive).

This makes sharing bots so much easier! We will be sharing many bots over the coming weeks on our public Github account. Stay tuned!

Invite team to collaborate on your bots

You can now add your whole team to contribute on your bots:

Capture d'écran 2019-12-19 13.04.03.png

Members of your team can try, update, collaborate on all of the bots from your organization. Of course, you can revoke a user at any time from your team!