---
sidebar:
  hidden: true
title: roboto.domain.triggers.record
---
## Module Contents

### ManagedBy

```python
class roboto.domain.triggers.record.ManagedBy(/, **data: Any)
```

`from roboto.domain.triggers import ManagedBy`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/record.py#L28-L44)

Bases: `pydantic.BaseModel`

The owner of a trigger whose definition is managed by something other than the org's members.

No managed trigger can be deleted, or have its definition changed, through the triggers API. Org members may enable or disable a system-managed trigger. A trigger owned by an ingestion rule may not be enabled, disabled, edited or deleted directly: change the rule instead, e.g. turn its auto-ingest off. An org has at most one trigger per owner.

**Parameters**

- **data** (`Any`)

**Attributes**

- **ManagedBy.id** (`str`): Which one: for [`ManagedByKind.System`](/reference/python-sdk/roboto/domain/triggers/record#roboto.domain.triggers.record.ManagedByKind.System), the platform feature's key (e.g. `"session_metrics"`); for [`ManagedByKind.IngestionRule`](/reference/python-sdk/roboto/domain/triggers/record#roboto.domain.triggers.record.ManagedByKind.IngestionRule), the rule's id.
- **ManagedBy.kind** (`ManagedByKind`): What kind of thing manages the trigger.
- **ManagedBy.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### ManagedByKind

```python
class roboto.domain.triggers.record.ManagedByKind
```

`from roboto.domain.triggers import ManagedByKind`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/record.py#L18-L25)

Bases: `roboto.compat.StrEnum`

What kind of thing in Roboto manages a trigger.

**Attributes**

- **ManagedByKind.IngestionRule** = `'ingestion_rule'`: An ingestion rule owns the trigger and is its only edit surface.
- **ManagedByKind.System** = `'system'`: Roboto installed the trigger to run a platform feature.

### TriggerRecord

```python
class roboto.domain.triggers.record.TriggerRecord(/, **data: Any)
```

`from roboto.domain.triggers import TriggerRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/record.py#L47-L107)

Bases: `pydantic.BaseModel`

Wire-transmissible representation of a trigger.

A firing source (a platform event subscription or a schedule), an optional condition over the firing's namespace, and the targets to dispatch on a match. Cross-field rules — exposed roots, `once_per` legality, template placeholders — are enforced when the trigger is saved, by [`TriggerValidator`](/reference/python-sdk/roboto/domain/triggers/validation#roboto.domain.triggers.validation.TriggerValidator).

Triggered work runs as the organization's actions service user; a trigger cannot run its targets as anyone else.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TriggerRecord.condition** (`roboto.query.ConditionType | None`) = `None`: Optional predicate over the firing's namespace; the trigger fires only when it holds. Same [`Condition`](/reference/python-sdk/roboto/query/conditions#roboto.query.conditions.Condition) wire format the query system uses.
- **TriggerRecord.created** (`datetime.datetime`): Timestamp when the trigger was created.
- **TriggerRecord.created_by** (`str`): User ID who created the trigger.
- **TriggerRecord.enabled** (`bool`) = `True`: Whether the trigger is active.
- **TriggerRecord.engine** (`str`) = `'v1'`: Which engine evaluates this trigger: `"v2"` for the events/`once_per`/targets engine this module models (every trigger, once a deployment has cut over), `"v1"` for a trigger the older `causes`/`for_each` engine still evaluates, projected onto this shape. Server-assigned and read-only; no request model carries it. Defaults to `"v1"` for a response that omits it, which is what a Roboto deployment older than the field sends.
- **TriggerRecord.fires_on** (`roboto.domain.triggers.sources.TriggerSource`): What makes the trigger fire: an [`EventSubscription`](/reference/python-sdk/roboto/domain/triggers/sources#roboto.domain.triggers.sources.EventSubscription) (which also carries `once_per`) or a [`Schedule`](/reference/python-sdk/roboto/domain/triggers/sources#roboto.domain.triggers.sources.Schedule).
- **TriggerRecord.managed_by** (`ManagedBy | None`) = `None`: The owner of the trigger's definition when it is not the org's members, e.g. the ingestion rule the trigger ingests files for; `None` for a trigger a user created. Server-assigned and read-only; no request model carries it.
- **TriggerRecord.modified** (`datetime.datetime`): Timestamp when the trigger was last modified.
- **TriggerRecord.modified_by** (`str`): User ID who last modified the trigger.
- **TriggerRecord.name** (`str`): Human-readable name. Unique within [`org_id`](/reference/python-sdk/roboto/domain/triggers/record#roboto.domain.triggers.record.TriggerRecord.org_id).
- **TriggerRecord.org_id** (`str`): Organization that owns the trigger and whose events it sees.
- **TriggerRecord.targets** (`list[roboto.domain.triggers.targets.TriggerTargetSpec]`): What the trigger dispatches when it fires, in order. At least one; each `target_id` is unique within the trigger.
- **TriggerRecord.trigger_id** (`str`): Unique identifier for the trigger.
