Guide FloatChat

Floatchat- User Guid

Advanced script node

Introduction #

With Floatchat’s Advanced Script Node, you can enhance the capabilities of your chatbot by incorporating Python scripts into your flow. This allows you to perform complex operations and manipulate data beyond what the JSON API offers. Python’s built-in libraries for data compression can also help overcome response size limitations.

Usage Notes #

  1. The Advanced Script Node empowers you to leverage the full potential of Python in your Floatchat bot. You can interact with external systems, handle webhooks, process data from various sources, and implement custom business logic. This node enables you to efficiently and effectively accomplish these tasks, thanks to Python’s versatility.
  2. By harnessing the flexibility and extensive libraries of Python, you can create sophisticated workflows that integrate with external services, process complex data structures, and implement advanced algorithms. This flexibility allows for endless customization and automation possibilities, enabling you to tailor your SaaS solution to your business and users’ unique needs.
  3. The Advanced Script Node acts as a bridge between your Floatchat bot and the external world, facilitating seamless communication and data transformation. With Python’s power at your disposal, you have a versatile toolkit to tackle intricate integration challenges, perform advanced data manipulation, and ensure smooth interoperability with other systems.
  4. By utilizing the capabilities of the Advanced Script Node and Python language, you can unlock the full potential of your Floatchat bot. This integration allows you to expand its functionality, deliver an exceptional user experience, and meet the evolving demands of your customers.

Setup #

  1. To access the Advanced Script Node, enable the entitlement for it using your Master Admin (MA) account.
  2. As an MA, navigate to your Floatchat account and go to the bot builder section. Click on the ‘Add Node’ button under the ‘Process and Flow’ node category.
  3. Once you select the ‘Advanced Script’ node, you’ll see three options:
  4. Code: Insert your Python code in this section.
  5. Default Error Message: Enter a prompt message to display if the script fails.
  6. Initialize Variables: Click the ‘Initialize Variables’ button to automatically display any variables declared within your script. To validate the script’s correctness, input an attribute value and click the ‘Validate’ button. Any errors will be displayed under the code section. If you need additional variables, click the ‘Add’ button to initialize them.

Sample Use Case #

Use case: Sending a WhatsApp template message #

Script :

Output :

To learn more about Prompts, check out the documentation here. 2

What are your feelings
Scroll to Top