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

**URL:** <https://community.cumulocity.com/t/introducing-the-smart-function-block-for-analytics-builder-where-no-code-meets-pro-code/14344>\
**Category:** Product news\
**Tags:** smart-functions, analytics, analytics-builder, streaming-analytics\
**Created:** [March 13, 2026, 12:50pm UTC](https://community.cumulocity.com/t/introducing-the-smart-function-block-for-analytics-builder-where-no-code-meets-pro-code/14344 "2026-03-13T12:50:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Van\_Damme](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/nick_van_damme/32/31952_2.png) [@Nick\_Van\_Damme](https://community.cumulocity.com/u/Nick_Van_Damme)\
**Post date:** [March 13, 2026, 12:50pm UTC](https://community.cumulocity.com/t/introducing-the-smart-function-block-for-analytics-builder-where-no-code-meets-pro-code/14344/1 "2026-03-13T12:50:24Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/8/d/8d2d8ee3c391960789600b9a0e54c718c67c790e.jpeg)

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](https://community.cumulocity.com/t/mastering-the-smart-function-block-in-analytics-builder-3-real-world-recipes/14346) 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.

**👉 Try the Smart Function block preview today in Analytics Builder!**

> [@February 5, 2026 - Added Smart Function block in Public Preview](https://community.cumulocity.com/t/february-5-2026-added-smart-function-block-in-public-preview/14256):
>
> Context Change Type: Preview Product area: Analytics Component: Streaming Analytics Deployed at: play_button Technical details Description A new Smart Function block has been added to Analytics Builder. This block executes a JS Smart Function on the inputs and produces an output. Preview This feature is in Public Preview, that is, it is not enabled by default and may be subject to change in the future. The Smart Function must export a function onInput(inputs, context) that returns a list of outp…

> **[Smart Function - Analytics Builder block reference - Cumulocity documentation](https://cumulocity.com/docs/streaming-analytics/block-reference/#smart-function)**
>
> This category contains the following blocks: | This documentation offers comprehensive information on the Cumulocity platform both from a user and from a developer perspective. It reflects the latest state of the Cumulocity platform and is...
