Trigger Configuration
Trigger Types
Database
Collection: Select the cloud database collection to listen to. Changes to documents in this collection will trigger events. Event Type: write represents write operations, including update, delete, and insert. Condition: Unconditional trigger, All conditions must be met, Any condition must be met
Condition | Description |
---|---|
insert | Matches the inserted document against the filter conditions |
update | Matches the updated document against the filter conditions. Pre-update documents are not currently supported. |
delete | Matches the filter conditions against the pre-deletion document's values |
The operators supported by the trigger and the field types they match are as follows.
Operator | Field Type |
---|---|
=,!= | String,Number,Null,Bool |
>,>=,<,<= | String,Number |
Action
Cloud Function
The Cloud Function can retrieve data from the trigger via the event
object. The event.data
contains detailed data from this trigger.
Note: Cloud invocation is only supported in environments associated with WeChat Mini Programs.