> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/other-topics/triggers.md).

# Triggers

A **trigger** connects an event to an action: *when* something happens in your project, Norbix *then* runs an action for you — no polling, no extra code. For example: when a user registers, send a welcome email; when a record is inserted, call a webhook; when an order is paid, run a function.

Every trigger has three parts:

1. **When** — the event that fires it (e.g. `OnRegistered`, `OnInserted`, `OnOrderPaid`).
2. **Action** — what to run (send an email, push, SMS, call a webhook, run a function, ...).
3. **Delivery settings** — who receives it and how (all users, specific users, raw addresses, records from a collection, ...).

## Where triggers live — the four families

Triggers are defined per module. Each family has its own events and its own save/get/enable/disable/delete endpoints:

| Family                | Fires on                | Events                                                                                                             |
| --------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Membership**        | user lifecycle          | `OnRegistered`, `OnInvited`, `OnVerified`, `OnUpdated`, `OnDeleted`, `OnBlocked`, `OnReactivated`, `OnUserCreated` |
| **Schema (Database)** | records in a collection | `OnInserted`, `OnUpdated`, `OnDeleted`                                                                             |
| **Payments**          | orders                  | `OnOrderCreated`, `OnOrderPaid`, `OnWebhookCallReceived`                                                           |
| **Files**             | file storage            | `OnFileUploaded`, `OnFileDeleted`                                                                                  |

Each family is documented on all three surfaces — pick where you work:

| Family            | Dashboard (UI)                                             | SDKs                                            | API reference                                                                 |
| ----------------- | ---------------------------------------------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------- |
| Membership        | [Triggers](/norbix-cloud/membership/triggers.md)           | [Methods](/sdks-and-cli/membership/triggers.md) | [Endpoints](/api-reference/membership/triggers.md)                            |
| Schema (Database) | [Triggers](/norbix-cloud/database/collections/triggers.md) | [Methods](/sdks-and-cli/database/triggers.md)   | [Save Schema Trigger](/api-reference/database/schemas/save-schema-trigger.md) |
| Payments          | [Triggers](/norbix-cloud/payments/triggers.md)             | [Methods](/sdks-and-cli/payments/triggers.md)   | [Endpoints](/api-reference/payments/triggers.md)                              |
| Files             | [Triggers](/norbix-cloud/files-service/triggers.md)        | [Methods](/sdks-and-cli/files/triggers.md)      | [Endpoints](/api-reference/files/triggers.md)                                 |

## What a trigger can do — the seven actions

The action is chosen by its `type` field. Any family can use any action:

| Action                     | `type`        | What happens                                                                                            |
| -------------------------- | ------------- | ------------------------------------------------------------------------------------------------------- |
| Send an email              | `email`       | Sends an email built from one of your [email templates](/norbix-cloud/notifications/email/templates.md) |
| Send a push notification   | `push`        | Sends a mobile push from one of your push templates                                                     |
| Send an SMS                | `sms`         | Sends a text message from one of your SMS templates                                                     |
| Call a webhook             | `webhookcall` | Publishes the event to your configured webhook destinations                                             |
| Run a function             | `code`        | Executes one of your functions from the **Code** module                                                 |
| Send a realtime event      | `ssecall`     | Pushes a server-sent event to connected clients                                                         |
| Run a marketplace function | `marketplace` | Fires an installed marketplace function                                                                 |

For the messaging actions (email, push, SMS), the action's **delivery settings** choose the audience: all users, account users, specific users, raw addresses/phone numbers/devices, or records from a database collection. Templates support **token binding**, so the event's data (for example `Model.Trigger.New`) can be inserted into the message:

{% content-ref url="/pages/-LwUEOAn4E1vurlaicoH" %}
[Tokens Binding](/other-topics/tokens-binding.md)
{% endcontent-ref %}

## In the dashboard

Create and manage triggers visually in Norbix Cloud:

{% content-ref url="/pages/EAgwwuqW6jCD4PfAC02E" %}
[Triggers](/norbix-cloud/membership/triggers.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M-4og\_PovF4krcgOhSO" %}
[Triggers](/norbix-cloud/database/collections/triggers.md)
{% endcontent-ref %}

## Use it from code

Every trigger endpoint is a method in the Norbix SDKs — for example [Save Membership Trigger](/sdks-and-cli/membership/triggers/save-membership-trigger.md) in the SDK reference, with examples in JavaScript/TypeScript, .NET, Python, Go, Dart, Swift, and Kotlin.

## API reference

The full request shape — the polymorphic request, the action object, and the per-channel delivery settings — is documented endpoint by endpoint. The most complete walkthrough is [Save Membership Trigger](/api-reference/membership/triggers/save-membership-trigger.md); the same structure applies to the Schema, Payments, and Files families.
