Functions


Imagine functions in viaSocket as mini superheroes – each with its unique power to perform a specific task. A function is like a superhero with a name (function name) and a superpower (code inside the function). When you call this superhero into action (invoke the function), it tackles a particular job for you.

                      

Let's say you have a function named "cookPasta()". This function, your culinary superhero, takes raw ingredients (parameters) and follows a set of instructions (code inside the function) to magically produce a delicious pasta dish. Now, whenever you're hungry for pasta, you don't need to rewrite the entire recipe – just call your superhero "cookPasta()" to handle the cooking for you! In viaSocket you can write functions without knowing any coding language. Let’s see How?

Simply select the function block give it a name and generate your desired code by using our inbuilt AI chatbot.

          

Follow this step-by-step process to add a Function into your flow.

1. Choose function option by adding new step, a new block will appear.

            

 

2. Now, Give your function a name and take the help of our Ask Ai feature to generate your desired code. 

                   

 

3. Here we have generated a function that concatenate two strings.

                                


4. Now call the function with your data and run it.

                     

Step by step Guide on how to use custom JS Function in viaSocket