What are Functions?
Functions are the user-defined actions that contain a block of organized code used to perform a specific task. Based on your requirement, you can associate functions to workflows to achieve a specified functionality. Functions provide better modularity for your topping and can be reused for any other requirements.
The Functions defined in Bigin Developer Console are standalone and module independent. You can write code for function using Deluge Scripts.
Types of Functions
The functions you create in Bigin Developer Console are classified into two types:
- Normal Functions: These functions invoke when triggered from within a custom workflow, custom button, related lists or schedules.
- REST API Functions: These functions invoke when triggered from within a function in a topping or from a third-party application.
To create standalone functions using Deluge programming language, on the developer console, go to Automate > Functions.
The Functions section contains the following:
- The New Function button lets you create a new function.
- The table displays a list of functions created so far.
- The settings icon allows you to edit or delete a function.
- The green traffic signal icon represents the given function is Rest Api function type.
Manage Functions Section
From the Functions section, you can edit or delete the custom functions.
To edit a function, from the list of functions, hover over the function you want to edit, and next to the name of the function name, click the Settings icon, and then click Edit. When the Edit Function window appears, you can modify the details as needed.
To delete a function, from the list of functions, hover over the function you want to remove, and next to the function name, click the Settings icon, and then click Delete.
For the REST API functions, to copy the Sandbox and Production URLs, do the following:
- On the Functions section, from the list of functions, hover over the Rest API function, and next to the function name, click the Settings icon, and then click Invoke as REST API.
- From the Invoke Function window, for testing purposes, copy the Sandbox URL. Also, for third-party integrations, copy the Production URL.