# defineRecordTriggeredFlow

> API reference for defineRecordTriggeredFlow: parameters, properties, and return types.

Defines a flow triggered by changes to a custom object’s records.

```ts
import { defineRecordTriggeredFlow } from '@rippling/rippling-sdk';
```

## Properties

| Property | Required | Type | Description |
| --- | --- | --- | --- |
| `apiName` | Required | `` `${string}__c` `` | — |
| `description` | Required | `null \| string` | Internal description of this rule (for developer reference only). |
| `flowName` | Required | `string` | Display name of this automation rule shown in the UI. |
| `triggerType` | Required | `[TriggerType](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/TriggerType-b32adcdb)` | When this rule fires. One of `'CREATE'` \| `'UPDATE'` \| `'CREATE_OR_UPDATE'`.<br>The constructor throws if an invalid value is passed. |
| `actions` | Optional | `readonly [DefinedRuleAction](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedRuleAction-ed3584d5)<NoInfer<TObject>>[]` | — |
| `conditionsTree` | Optional | `null \| { [x: string]: [JsonValue](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/JsonValue-9634bb8c); }` | — |
| `entityApiName` | Optional | `null \| string` | — |
| `rqlCondition` | Optional | `string` | RQL formula guard — the rule fires only when this expression is truthy.<br>**Documented default:** `null` |
| `updateTriggerType` | Optional | `[UpdateTriggerType](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/UpdateTriggerType-0699b53d)` | Controls when an `UPDATE` trigger fires relative to the condition. One of `'MEETS_CONDITION_AFTER_ONLY'` \| `'MEETS_CONDITION_BEFORE_OR_AFTER'`.<br>Conditional. Required when `triggerType` is `'UPDATE'` or `'CREATE_OR_UPDATE'`. Must be omitted when `triggerType` is `'CREATE'`. |

[Complete options type](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefineRecordTriggeredFlowProps-6da06260)

## Parameters

| Parameter | Required | Type | Description |
| --- | --- | --- | --- |
| `object` | Required | `TObject` | — |

TypeScript signature

```ts
defineRecordTriggeredFlow<TObject extends ObjectReference>(object: TObject, props: DefineRecordTriggeredFlowProps<TObject>): Rule;
```

## Returns

```
Rule
```

## Availability

| Capability | Support |
| --- | --- |
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/defineRecordTriggeredFlow

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
