Functions | Online help | Zoho Sigma

Functions

Functions are the building blocks for developing an extension. They come handy for all server side customization. Sigma executes functions without additional infrastructure cost. External function calls can be done using rest APIs. You have to generate an API token to call functions outside Sigma. 

Sigma uses Deluge for building functions. Deluge script builder provides a drag-and-drop user interface which helps in creating functions quickly. Build anything from simple methods like sending an email notification to complex recursive functions using the editor. Click here to know more about writing functions in Deluge. 

Create a function

Let’s build a function to send an email notification

  1. Navigate to  Functions module and click  New Function  at the top right corner. 
  2. Enter a function name and give a description. 
  3. Click Create .
  4. Select a Return Type in the dropdown. Sigma supports Void and String return types.
    1. For email function we can select Void. 
  5. Drag and drop the send mail function under the  Notifications section in the left panel. 
  6. Specify the from and to addresses, email subject, and the message.  
  7. Click Save


Associate a function to an extension

Write a function and reuse it across your extensions wherever you require. You can associate a function to multiple extensions.    
  1. Navigate to Extensions , hover over your extension and click .
  2. Go to the Functions tab and click Associate Function .
  3. Select a Function Name from the drop-down.
  4. Select the Function Version you want to associate.
  5. Click Associate .
Your function will be associated with the extension. 



Execute associated functions

Associated functions can be executed with sample argument values.
  1. Navigate to Extensions , hover over your extension and click  .
  2. Go to the Functions tab and click on the function you would like to execute.
  3. Select the Portal in which you want to execute the function.
  4. Click on the Add Arguments button to configure sample arguments.
  5. Select argument IDs from the left dropdown and associate values to it.
    1. Click + to add more arguments.
  6. Select the Return Type as Void or String.
  7. Once all arguments are configured, click Save &  Execute.
This way, you can test your functions in extensions. 

 
Note
  1. The argument AppConfig will only be available for extension life cycle events.
  2. Function drafts can be edited and executed.
  3. Published functions can only be executed and cannot be edited. 

Update function versions associated to extensions

Every time a change is performed and saved in a function, it gets saved as a new version. These versions can be updated in extensions that are already associated with functions. To update the version,
  1. Navigate to Extensions , hover over your extension and click  .
  2. Go to the Functions tab and select the Version dropdown corresponding to the function you want to update.
  3. Select the required version from the dropdown.
 
Note
  1. If a function is associated with triggers, its version cannot be updated in the extension.
  2. A draft function associated with an extension can be updated to other function versions. However, once a function version is associated to an extension, it cannot be updated with a function draft.  

Disassociate function from an extension

In case you do not want the function to be associated with an extension, you can disassociate the same using this option.
  1. Navigate to Extension, hover over your extension and click  .
  2. Go to the Functions tab.
  3. Click  (...)  beside the corresponding function.
  4. Click  Disassociate.


Publish a function  

When you create a new function in Sigma and save, it gets saved as a Draft. To publish the function that you have created,
  1. Navigate to  Functions , hover over the function that you would like to publish.
  2. Click  (...)  beside the respective function.
  3. Select  Publish.             


Create Draft

Create Draft option lets you create a draft of a new version of a published function. In case you would like to add new enhancements to your extension, updating the function is important. With the  Create Draft  option, you can make changes to the function and save it as a draft.
  1. Navigate to  Functions , hover over the function for which you would like to create draft.
  2. Click  (...)  beside the respective function.
  3. Select  Create Draft


Create Draft option gets displayed only when the existing draft is published. 

Version 

Within this option, you can find all the versions of the functions created, along with the created time and status.
  1. Navigate to  Functions , hover over the extension for which you would like to view the version details.
  2. Click  (...)  beside the respective function.
  3. Select  Version


Delete a function    

  1. Navigate to Functions , hover over the function you would like to delete.
  2. Click (...)  beside the respective function.
  3. Click Delete .

Deleting the function will not be allowed if the function is associated with a trigger. Disassociate the function from the trigger to delete the function. 

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • Executing Functions using API URLs

                                                                                                        Executing a function via a REST API URL is now supported in Sigma. All you have to do is configure the Function Execution API URL with your function parameters. This helps to listen to third-party application events through webhooks and perform ...
                                                                                                      • Access Privileges

                                                                                                        Once a person signs up to Sigma and creates a workspace, they become the workspace owner. Other users can be added to Sigma as Developers, who can further be classified as an Admin or a Member. Privileges for different user roles are listed below. ...
                                                                                                      • Create extensions using Zoho Sigma cloud editor

                                                                                                        Sigma has introduced a cloud editor where users can build extensions for Zoho services . Upon selecting a Zoho service, the corresponding service’s plug-in manifest file will be pre-populated into Sigma’s editor as a new project, eliminating the need ...
                                                                                                      • Manage your extensions

                                                                                                        Once the extension is published, it is available for all Zoho users to install and use. However, managing your apps after publishing them plays a vital role in maintaining the sanity of the apps. Managing your app includes making new updates to the ...
                                                                                                      • Triggers & Events

                                                                                                        Triggers are configured to invoke function blocks when specific events occur in the application or Zoho service. For example, you can trigger a welcome email to a user when your extension is installed. The mail notification function is configured in ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources