CSML updates
CSML updates
www.csml.dev

CSML v1.8.0 is out!

 

New

  

We have just released CSML v1.8.0! This new version is PACKED with super useful features that we are extremely happy to finally share with you today. Let's do a quick roundup of all the new stuff!

while loops

This one is certainly one of the most requested features of all times, and for good reasons. You can now use standard while loops to iterate over any type of data (and not just arrays as was previously possible using foreach):

do i = 0
while (i < 3) {
  say "i = {{i}}"
  do i = i + 1
}

string.replace() helpers

Another very useful feature that makes it trivial to replace part of a string with something else, which was previously quite hard to achieve in pure CSML, the .replace() family of string methods (which include replace, replace_all and replace_regex) are also part of this release.

// .replace() will only replace the first occurrence
// of the first term with the second term
say "My dog Bark is nice, but my other dog Groot is mean".replace("dog", "cat") 
// => "My cat Bark is nice, but my other dog Groot is mean"

// .replace_all() will replace all occurrences
say "My dog Bark is nice, but my other dog Groot is mean".replace_all("dog", "cat") 
// => "My cat Bark is nice, but my other cat Groot is mean"

// .replace_regex() uses regular expressions 
say "My dog Bark is nice, but my other dog Groot is mean".replace_regex("[a-gA-G]", "%")
// => "My %o% %%rk is ni%%, %ut my oth%r %o% %root is m%%n"

Compound assignment operators

Yes, that's the name of the operator that lets you perform an operation at the same time that it assigns the result. For example:

do i = 1
do i += 5
say "i = {{i}}" // i = 6

Concatenate strings with the + sign

One of the feedbacks we sometimes had was that it is not always easy to concatenate strings together. It has always been possible using string interpolation, but the syntax is not too easy:

do firstname = "John"
do food = "cheese"
say "{{firstname}} likes {{food}}"

You can now use the + sign to do the same thing:

say firstname + " likes " + food

Add and subtract time from a Time() value

Obviously, one of the most common needs when manipulating times is to add or subtract time, for example when comparing two dates. The .add() and .sub() methods do exactly that:

do t1 = Time() // now
do t2 = t1.add(3600) // in 1 hour
do t3 = t1.sub(86400) // 1 day ago

Get local flow context in conversation

The _metadata global variable now has a new read-only inner property _context, which contains information about the user's current whereabouts in the flow. This object contains 2 new properties current_flow and current_step, and 2 optional properties previous_flow and previous_step that are only set when the user comes from a different step or flow (i.e after a goto).

start:
  say "{{_metadata._context}}" // will only print `current_*` properties
  goto step1

step1:
  say "{{_metadata._context}}" // will print all 4 properties
  goto end

Check if a variable has been set with Exists("var")

Last one for today: we have introduced a new built-in function to check if a variable currently exists in the bot's memory. This is useful for checking not only if the value is a null/false/empty value, but if it exists at all!

remember myVar = "somevalue"
do Exists("myVar") // true
remember myVar = null
do Exists("myVar") // true
forget myVar
do Exists("myVar") // false

The team has been busy making a lot of other improvements and features that may also interest you, so make sure to check the release notes, and please visit our Slack if you have any questions!

Instagram Channel is Available to All Instagram Businesses

 

Improvement

 

 

The limitations for installing a Chatbot on Instagram have been lifted by Facebook. Now, any Instagram Business Account can setup a CSML Chatbot to automate their Direct Messages, regardless of subscriber count!

Head over to the Instagram Channel documentation and setup your Instagram Chatbot with CSML Studio!

New database integrations: MySQL, PostgreSQL and MongoDB

 

New

 

 

One of the most common requests we got recently was: how can I save or access data in my own database? Until now, this problem involved building a custom API in front of the database, which is a complex and expensive workaround, requiring a lot of boilerplate code, and hosting as well security considerations.

mysql.png

To solve this issue, we are releasing connectors with some of the most used open-source databases: MySQL, PostgreSQL and MongoDB.

postgresql.png

You can install the corresponding apps for free in CSML Studio, which let you save data from your bot into your database, or retrieve your own data for use in the bot, without any added complexity.

mongodb.png

Find out more on how to integrate with your database of choice:

New Telegram Channel and Integration

 

New

 

 

You can now easily build chatbots for Telegram with the new Telegram channel on CSML Studio!

Telegram is one of the most popular messaging apps, mostly known and respected for its security. Chatbots are a very powerful part of the Telegram experience, with very wide integration capabilities! As well as a new Channel, we are also launching a new Telegram CSML App that lets you integrate with all Telegram APIs directly from your CSML code.

New Instagram Channel

 

New

 

 

We are very proud to announce that CSML Studio is one of the very first chatbot platforms to let you deploy chatbots for Instagram! 🎉

post csml insta.png

CSML Studio offers full compatibility for Instagram accounts with at least 1,000, up to 100,000 followers, as part of Facebook's rollout of the Instagram APIs. You can now use CSML Studio to automate responses to customer chat requests and stories!

The Instagram channel is available today on CSML Studio for chatbots on the Pro plan and above. New chatbots get a 1-month free, unlimited Trial of the Pro plan, including access to the Instagram channel!

New Twilio SMS Channel

 

New

 

 

You can now use CSML Studio to automatically respond to SMS messages with the new Twilio SMS integration! This channel will process incoming messages and forward them to your bot, letting you easily automate any type of SMS conversation.

571-05bc55efcd240344651a1067812591ce5c3c9bea.png

Get started with a SMS chatbot using this installation guide.

CSML Chatbot Templates Library

 

New

 

 

The new CSML Templates Library has arrived!

image.png

Now, when creating a new chatbot, you will have the option to start from an existing chatbot template that will boost your development efforts, by covering many of the most popular chatbot use cases around lead generation, quizzes and surveys, customer satisfaction, e-commerce…

New templates are added regularly, and CSML Partners can also submit their own templates to the library in order to gain visibility among CSML users.

Announcing CSML Partner Program

 

New

 

 

The CSML Partner Program is a new initiative from the CSML team, aimed at partners who leverage the broad range of CSML solutions to build products and services for their customers. We help Partners grow with dedicated training sessions, professional CSML certifications, direct support and specialized resources. All CSML Partners and Resellers also benefit from 6 month of free Pro plan on every chatbot created in CSML Studio.

Companies willing to get professional chatbot development services and support will be able to hire local Partners to fit their project requirement, experts in all types of chatbots: customer support, e-commerce, lead generation, HR, IT support, marketing, reservation, AI-based chatbots, multilingual chatbots, etc.

If you are looking for an experienced CSML Partner for your next chatbot project, contact us and we'll connect you with the partner we think is the best fit for you!

Applying for the CSML Partner Program is a great way to grow your chatbot development business!

Read more on the Partner Program page: https://www.csml.dev/studio/partners/

Resources Center

 

New

 

 

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!

image.png

CSML v1.6.1 Release

 

New

 

 

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:

start:
  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