Used to expose component's triggers. The properties of this object are used as unique trigger names.

Property Name Type Required Description
title string Yes Human readable title of the trigger.
main string Yes Relative path to a Node.js module or a fully qualified name or a Java class.
metadata object Yes Contains a single out property whose value is a JSON Schema describing the metadata of the message's body produced by the trigger.
type string   It can have only 2 values polling or webhook. If the type is omitted then it is considered to be a WebHook trigger and it will wait for the messages to arrive. Otherwise, it needs to be specifically written as a polling for it to be scheduled for an execution.
fields object   Trigger specific input fields used to provide configuration for the trigger. More options available here.

Any object implementation is directly connected with one or several View Class definitions, therefore it is advisable to check them as well.

Here is an example of a trigger definition in component.json where the type is included and specified as polling:

"queryTrigger": {
  "title": "SOQL Query",
  "main": "./lib/triggers/query.js",
  "type":"polling",
  "metadata": {
      "out": {}
    },
   "fields": {
        "query": {
             "label": "SOQL Query",
              "required": true,
              "viewClass": "TextAreaView"
          }
      }
 },