Introducing the Smart Function Block for Analytics Builder: Where No-Code meets Pro-Code

We are excited to announce the public preview of the Smart Function block, a new capability in Analytics Builder, part of Cumulocity Streaming Analytics, that bridges the gap between “No-Code” ease and “Pro-Code” power.

For years, Analytics Builder has empowered OT engineers to interpret and act on device data by visually orchestrating flows. However, sometimes visual blocks aren’t enough. You often need to perform a specific mathematical calculation, parse a complex string, or execute a unique business rule that would otherwise require a messy web of 10+ standard blocks.

The Smart Function block changes that. It allows you to write standard JavaScript directly within your analytics model, giving you the precision of code with the simplicity of visual drag-and-drop. Instead of building separate applications for advanced algorithms, we are bringing the power of code directly to your fingertips, right inside the visual canvas.

3 Ways to Use the Smart Function Block

We’ve designed this feature to guide users from basic utility to advanced architecture:

  • Improved Expression Block: Users no longer need to learn proprietary syntax for basic operations. You can immediately leverage standard JavaScript math, string, and array methods for quick calculations and data formatting.

  • The Complexity Collapser: Turn 10 blocks into 1. This drastically reduces “spaghetti models” by allowing users to consolidate messy data parsing, filtering, and conditional routing into a single, clean Smart Function.

  • The Logic Capsule: Code the Brain, Wire the Body. This enables a seamless hybrid no-code and pro-code experience. Encapsulate 100% of your complex business algorithms in code, while Analytics Builder acts as the Integration Layer for your input devices and output alarms.

From Concept to Code: Real-World Use Cases

While the Smart Function block is easy to explain, its real power is best seen in practice. We’ve published a deep-dive tutorial demonstrating exactly how to replace cluttered “spaghetti models” with clean, single-block JavaScript solutions. Check out Mastering the Smart Function Block: 3 Real-World Recipes to explore practical examples for string manipulation, intelligent routing, and AI data normalization.

Looking Ahead: The AI-First Smart Function

While the block currently empowers developers with a flexible JavaScript editor, our roadmap envisions an evolution into an AI-First Smart Function. In a future phase, we will integrate a Generative AI assistant allowing customers to describe transformation logic in natural language rather than writing syntax from scratch.

A Strategic Step Forward

The Smart Function block represents our commitment to Open Standards. By moving to standard JavaScript, we are expanding the “Pro-Code” toolkit in Analytics Builder, allowing you to use the world’s most popular programming language to solve your IoT challenges.

Whether you are an OT engineer looking for a quick fix or a developer building a complex algorithm, the Smart Function is ready to help you build faster, cleaner, and smarter.

:backhand_index_pointing_right: Try the Smart Function block preview today in Analytics Builder!

3 Likes