Simplified workflows with the Code Activity feature

Zervicepoint 1.14 introduces a new powerful activity, say hi to the Code activity! The Code activity let you transform variables in the workflow using JavaScript. Now you no longer have to walk the extra mile with a call to a custom activity in order to do things like data transformation, string manipulation and validation of data.

How do you use it?

Locate the new Code activity in the workflow editor and add it to your workflow. The setup consist of two parts. Creating parameters and then the JavaScript code block.

In order for variables to be available in the code block you first have to create parameters and bind them to a variable. The function definition will automatically be updated in the code block to reflect your changes to parameters, showing which parameters will be available in the code block. Variables that you have created by yourself can be both read and assigned to in the code block. System variables can only be read and not manipulated.

In the code block you write custom JavaScript code that operates on the input parameters. By default, all input parameters are also returned but if you only want to return a subset of parmeters you can use a return statement with a custom JS object containing the parameters you want to return (shown in the title image for this post).

Share this post

You may also enjoy these articles

Features

Zervicepoint Update! | Redesign Admin Landing Page

Zerviepoint Update! is back! We are happy to announce that our admin web landing page has gotten a face lift. This improvement comes with multiple new features, like Most Time Efficient, Most Popular Services and Number Of Orders. For you who’s worried that the good ol’ audit feed is gone, we can tell you this;…

Zervicepoint

Features

Zervicepoint Update! | Grouped Activity

In this episode of Zervicepoint Update! we show a function that has been in the product since version 1.20. It is so useful and valuable that we need to highlight it once again! 🤘🏽 The function we are talking about is of course Grouped Activity. In short, this feature allows you to put together a…

Zervicepoint