Triggers & Events

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 the trigger called extension-install so that the user receives your welcome mail when they install your extension. These events are broadly categorized into: extension life cycle events, service specific events, and user created custom events. You can view the list of default events from Trigger Events.

Extension life cycle events

These events are directly associated with the extension. You can create a trigger for an extension installed event or based on any other extension event.

extension_on_run 

This event is triggered when you click Run to test your extension. 

extension_on_stop

This event is triggered when you disable development mode to run your extension.

extension_installed

This event is triggered when you install an extension. 
For instance, You can trigger a function to execute a webhook that connects the third party app (Zendesk). Write a function to configure a webhook and use this event to execute that trigger automatically whenever a user installs your extension.

extension_uninstalled

This event is triggered whenever your extension is uninstalled. Use this trigger to remove the configuration or pre-setup activities done during set up in target applications.

extension_disabled

This event is triggered whenever your extension is disabled.

extension_enabled

This event is triggered whenever your extension is enabled.

extension_updated

This event is triggered whenever your extension is updated. For example, consider you want to install a set of security packs whenever your extension is enabled. Build a function for security updates and name it as DoSecurityUpdate. Create a trigger for extension_updated event and associate the function with this trigger event.

extension_upgraded

This event is triggered when a user upgrades to a paid version of your extension.

Service events

These events are specific to the service that you make use of. For example, if you are creating extensions for Zoho Projects then following are some service specific events: create_bug, delete_bug, update_task etc. You can write functions for specific events as per your business needs and trigger the events when required. Service specific events are fixed and it varies based on the service which you make use of to create extensions.

Custom Events 

Users can add new events to be associated with triggers in Sigma. Once a user creates a new custom event, it will be submitted to Sigma for validation. Only after successful validation, the event can be invoked using triggers. 

Add trigger to your function 

  1. Navigate to Extension module and hover over your extension and click 
  2. Navigate to Triggers and click  Add Trigger
  3. Enter a name for your trigger select the event at which you want the trigger to be fired.  
  4. Associate a function to your trigger. 
  5. Choose the corresponding version.  
  6. Click Create

Add custom events 

Say you don’t want to use the predefined events, then use custom events to trigger your function. 
  1. Navigate to Extension module and hover over your extension and click 
  2. Navigate to Triggers and click Add Trigger
  3. Enter a name for your trigger. 
  4. Click Add custom event and enter a name for your trigger. 
  5. Associate a function to your trigger. 
  6. Select the corresponding version to be associated. 
  7. Click Create.  


    • Related Articles

    • Events Overview

      You can create events for all your commitments, be it a team meeting or a personal appointment. Events are available at the network level, the group level, and at the user level. Creating events at the network level and the group level depends on the ...
    • Schedule events

      Scheduling an event with your team will help you track the status of the project. Say for instance, if you are approaching a milestone and you would like to know the status of the milestone, how many tasks are completed, how many are in overdue etc. ...
    • Creating Events

      Events are carried out at the given place and given time for your customers. You can repeat the event that you have created and also set up a reminder.    There are two ways of creating an Event. From the activities module. From the record details ...
    • Edit or delete events

      You can edit or delete the created project events if required. The calendar, by default, displays the current month with its scheduled tasks, issue, events and so on. Select the required project and click Calendar. Select Events, click the selected ...
    • Engaging leads through events

      Zoho MarketingHub serves as a unique platform to promote products and provide marketing insights to the customers. Integrating Zoho Backstage with Zoho MarketingHub provides detailed information about an event which can be utilized by your team to ...