Browse our comprehensive FAQ section to quickly find solutions, learn how to use ChatMaxima features, and get step-by-step guidance for setup, integrations, and support.
The Code block allows you to add custom JavaScript code to your chatbot's workflow. This is for advanced users who need to process, transform, or filter data in ways that are not possible with the standard blocks.
It gives you complete control over your bot's logic. You can use it to build complex functions, handle intricate conditions, and add advanced logic that makes your bot more powerful and flexible.
This is a magic button that helps you write code. You can use it to get help from the MaxIA assistant, which can generate code snippets for you based on your needs.
You can reference any system or user-defined variables by using double curly braces, like this: {{variable_name}}. The bot will automatically replace this with the variable's value when the code runs.
You write your code directly into the main text area of the code block.
This field is where you name the variable that will store the result of your JavaScript code. The value returned by your code will be saved in this variable, so you can use it later in the conversation.
Yes. You can write JavaScript to perform any kind of mathematical calculation and then save the final result in a variable.
You can use the Code block to:
Format dates and times.
Manipulate strings, such as converting text to uppercase or lowercase.
Perform complex calculations based on user input.
Filter data from an API response.
After you have written your code and named the result variable, you must click submit to save the block and add it to your chatbot's workflow.
Yes, this block is designed for users with some knowledge of JavaScript. While the MaxIA button can assist, you'll need to understand basic programming concepts to use it effectively.
The Code block is in the sequence section because it processes and transforms data in the middle of a conversation flow, after a user has provided input or after a previous action has been performed.
You can find the Code block by navigating to Dashboard → Quick Access. Then, under ChatMaxima Studio, click on Create Chatbot. The Code block will be available in the sequence section of the builder.
You can find the video tutorial at: https://chatmaxima.com/video-tutorials/configuring-the-code-block-in-chatmaxima/
You can process any kind of data that is stored in a variable, including text, numbers, and JSON.
The Variable block is used for simple data management tasks like storing a value or processing JSON. The Code block is for more advanced logic and transformations that can't be done with the Variable block's predefined options.