Extension Installation Handler

Extension Installation Handler

This handler is triggered after the installation of the extension. The main purpose of this handler is to let you (extension creator) handle certain processes, like configuring webhooks after a user installs the extension. Click Edit Code under Installation Handler to write the script. If this handler is not configured, the extension will be activated by default. You will get the following attributes when the installation handler is executed:


The installation handler can also be used to give a response message to the user upon successful activation of the extension or when the extension activation fails. The message can have the following attributes


Activation Success

The installed extension will be activated, only when the installation handler returns 200 as the status response. A sample  extension activation success message and how it will be displayed to the user is shown below.

Activation Failure:

The installed extension will not be activated when the installation handler does not return 200. In this case, the extension status will be displayed as Installed. In cases where the extension is not activated, the user can click the Activate option when hovered over the extension name under installed extensions. A sample extension activation failed message is shown below:



Sample Code Snippet

  1. response = Map();
  2. success = true;
  3. if(success)
  4. {
  5. response.put("status","200");
  6. }
  7. else
  8. {
  9. response.put("status","500");
  10. response.put("title","Uh-oh!");
  11. response.put("message","We're sorry! The extension installation failed.");
  12. note = list();
  13. note.add("Installation failure might be due to the following reasons:");
  14. note.add("1. Your account is not in the premium plan.");
  15. note.add("2. You have not configured the webhook properly.");
  16. response.put("note",note);
  17. response.put("footer","Contact support@yourdomain.com for any related help / support.");
  18. }
  19. return response;


Note:
The above code snippet will return a success response by default.

User Scenario

Let us consider an extension integrating GitLab and Cliq.
  1. First, the installation validator is triggered to confirm if the user is a GitLab admin.
  2. Once the installation validator gives a success response, the installation handler is triggered to activate the extension successfully. 
  1. //Extension's Incoming Webhook Endpoint
  2. https://cliq.zoho.com/api/v2/applications/"APP-ID"/incoming?appkey="APP-KEY"&zapikey=" +zapikey (generated for each user)


Note:
The extension token or the ZAPI can be created by each user through a token generation dialogue prompt. Refer this help guide on how to generate an extension token?

  1. response = Map();
  2. success = true;
  3. if(success)
  4. {
  5.         response.put("status","200");
  6.         response.put("title","Success!");
  7.         response.put("message","We're glad you chose this extension!");
  8.         note = list();
  9.         note.add("1. Use the Gitlab bot to resolve issues quicker!");
  10.         note.add("2. Use the slash commands and message actions to keep track for activities");
  11. }
  12. else
  13. {
  14.         response.put("status","500");
  15.         response.put("title","Uh-oh!");
  16.         response.put("message","We're sorry! The extension installation failed.");
  17.         note = list();
  18.         note.add("Installation failure might be due to the following reasons:");
  19.         note.add("1. Your account is not in the premium plan.");
  20.         note.add("2. You have not configured the webhook properly.");
  21.         response.put("note",note);
  22.         response.put("footer","Contact support@yourdomain.com for any related help / support.");
  23. }
  24. return response;



    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

                                                                                                      • Extension Incoming Webhook Handler

                                                                                                        Integration with external applications can be done with the help of incoming webhook APIs. An extension token or ZAPI key generated by each user interacting with the extension, should be used for handling incoming webhooks and messaging apis. You ...
                                                                                                      • Extension Installation Validator

                                                                                                        The installation validator is triggered to validate the user before installing the extension. The validator is not configured by default. If the installation validator is not configured, users will be allowed to install the extension without ...
                                                                                                      • Extension Properties

                                                                                                        What are extension properties?  Extension properties are values associated with the extension. They are quite similar to regular data properties, wherein you map a key of type string with a value string.  The main purpose is to store data ...
                                                                                                      • Extension APIs

                                                                                                        These APIs fetch or set information related to the extension. Get extension config variable: Fetch the installation parameters of the extension. In production mode, only those parameters that have the value of the secure key set to false are ...
                                                                                                      • Updating the Extension

                                                                                                        Updating the Extension to the Marketplace If you come up with new features, enhancements to existing features, or bug fixes, you can update your extension to improve its functionality and performance. Each update increments the version of the ...
                                                                                                        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