ChatMaxima Frequently Asked Questions

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.

Sequence Section Code Block FAQs

Written by Soniya | Updated on Sep 19
Sequence

Basics & Overview

 

 

1. What is the Sequence Section Code block used for?

 

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.

 

2. How does the Sequence Section Code block help to improve a chatbot's functionality?

 

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.

 

3. What is the purpose of the "Generate JavaScript Code with MaxIA" button within the Code block?

 

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.

 

4. How can I use variables inside the Code block?

 

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.


 

Configuration & Use

 

 

5. How do I write my own code in the Code block?

 

You write your code directly into the main text area of the code block.

 

6. What is the "Store the code result in variable" field for in 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.

 

7. Can I use the Code block to perform mathematical calculations?

 

Yes. You can write JavaScript to perform any kind of mathematical calculation and then save the final result in a variable.

 

8. What are some examples of what I can do with the Code block?

 

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.


 

Finalizing & Best Practices

 

 

9. What is the final step to save the Sequence Section Code block?

 

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.

 

10. Do I need to know a lot about coding to use the Code block effectively?

 

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.

 

11. Why is the Code block located in the "sequence section" of the chatbot builder?

 

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.


 

Location & Tutorials

 

 

12. Where can I find the Sequence Section Code block in the chatbot builder?

 

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.

 

13. Where can I find a video tutorial for the Sequence Section Code block?

 

You can find the video tutorial at:   https://chatmaxima.com/video-tutorials/configuring-the-code-block-in-chatmaxima/


 

Advanced Questions

 

 

14. What kind of data can I process with the Code block?

 

You can process any kind of data that is stored in a variable, including text, numbers, and JSON.

 

15. How is the Code block different from the Variable block?

 

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.

Advanced Logic
Variable