Chatbot Building Platform Logo of Itheta Labs

Chatbots vs Plugins: Revolutionizing Online Interactions?

Action Step – Variable Operation

Our chatbot platform provides a variety of built-in operations for modifying variables. There are six types of variables: text, number, Boolean, date, datetime, and JSON.

Variable Operations

TextTrim textRemoves spaces before or after the text.
TextSubstringExtracts a portion of the text.
TextReplace stringReplaces a portion of the text with another string.
TextTo lower/upper caseConverts the text to lowercase or uppercase.
TextGenerate random textGenerates a random string of text.
TextURL encode/decodeEncodes or decodes the text for use in a URL.
TextBase64 encode/decodeEncodes or decodes the text using Base64 encoding.
TextTo URL friendly slugConverts the text to a URL-friendly slug by replacing spaces with hyphens and removing other special characters.
TextGet text before/after …Extracts a portion of the text before or after another string.
NumberGet text lengthReturns the length of the text string.
NumberGenerate random numberGenerates a random number.
NumberAdd/subtract/multiply/divide/modulus/power/natural logarithm/square rootPerforms the specified arithmetic operation on the number.
NumberRoundRounds the number to the specified number of decimal places.
NumberFloor/ceilReturns the nearest integer less than or greater than or equal to the number, respectively.
DatetimeFrom formatted textParses a formatted date or time string and returns a datetime object.
DatetimeAdd minutes/hours/days/weeks/monthsAdds the specified amount of time to the datetime object.
JSONLoad/get/update/remove/count/sum/average/sort/shuffle/reversePerforms the specified operation on the JSON variable.

Action Step - Variable Operation

Example Use Cases

  • Text: Use the trim text operation to remove any leading or trailing spaces from a user input.
  • Number: Use the generate random number operation to generate a one-time verification code.
  • Datetime: Use the add days operation to calculate the due date for a task.
  • JSON: Use the load operation to load a JSON object from a file.


The variable operations provide a powerful way to manipulate data in your chatbots. By understanding how to use these operations, you can create more complex and sophisticated chatbots that can meet the needs of a wider range of users.

Additional Notes

  • Be sure to validate user input before using it in variable operations.
  • Use the appropriate variable type for each operation.
  • Be aware of the potential for errors when using variable operations, such as division by zero.
  • Test your chatbots thoroughly before deploying them to production.

Get in TOUCH with us!

Have questions or feedback? Fill out the form below, and we’ll connect with you shortly. We’re here to help!

Leave a Reply

Your email address will not be published. Required fields are marked *