Custom Code

Custom Code

The ‘Custom code’ function enables you to create your own block by writing a JavaScript code. In this JavaScript code, you can use both IF and FOR-LOOP statements. Any input to or output from the 'Custom code’ function can be defined using the input and output buttons below the Custom code.

Things to keep in mind: 

  • Input variable's value can be used with "[]": var example = "[the name of your input variable]'

  • We support multiple returns: return a; return b;

  • The object path of a variable is the name with semicolon. Hence, return a; becomes a

After having written your code, you can add a ‘Custom code’-block to your flow and copy paste the written code in the designated field.

We have set a timeout if your code is to complex, creates an error or runs too long. This will result in an error.

We currently support Node.js v6 - v12

Beta
This function is currently in Beta. Please report any bugs via the help button.

    • Related Articles

    • Custom Widgets

      The custom widgets provide a space to display custom created widgets that can be created by using the user statistics blocks.
    • Custom widget

      Intro The Custom Widgets provide a space to display custom created widgets that can be created by using the 'User Statistics-blocks' in flows. Each of these blocks store statistics that can be used as input for simple formulas to create a Custom ...
    • Chat bubble via Code

      Import latest version of JS bundle Blits chat is designed to integrate with your existing website using JavaScript. You can add the blits chat to your website using a script tag: <script ...
    • Chat bubble settings

      You can set various settings for your web chat bubble. Chat Bubble screen size Here, you can pick whether the size of the chat screen should be big or small. Chat Bubble position Here, you can pick the location where your Chat Bubble should emerge. ...
    • v2.0.9

      The list below shows the features that were introduced, changed or removed with the release of v2.0.9. Features Improved Pre-built entities Amazon added as NLU engines Platform API extended for Voice & Attachments Added RegEx entities Webwidget ...