> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TriggerOptions

> Interface exported by @botmesh/core.

Defined in: [ops/trigger.ts:18](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L18)

Options of `bot.trigger(name, options)`: the target chat and user, the initial
`c.state` and what to do when that user already has a conversation.

## Properties

### chatId

```ts theme={null}
chatId: string;
```

Defined in: [ops/trigger.ts:20](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L20)

Chat to run the conversation in (an opaque transport id, used as-is).

***

### userId?

```ts theme={null}
userId?: string;
```

Defined in: [ops/trigger.ts:22](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L22)

Subject of the conversation (default: `chatId`). Required to target one participant of a group.

***

### isGroup?

```ts theme={null}
isGroup?: boolean;
```

Defined in: [ops/trigger.ts:24](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L24)

Is `chatId` a group? (default `false`). With `conversationScope: 'participant'` it keys the conversation per `userId`.

***

### data?

```ts theme={null}
data?: Record<string, unknown>;
```

Defined in: [ops/trigger.ts:26](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L26)

Seeds `c.state` (shallow copy) — e.g. `{ cita: 'mañana 3pm' }` → `c.state.cita`.

***

### ifActive?

```ts theme={null}
ifActive?: "skip" | "replace";
```

Defined in: [ops/trigger.ts:32](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L32)

What to do when the subject already has a live conversation or a dormant
(persisted) checkpoint: `'skip'` (default) leaves it alone and resolves
`{ started: false, reason: 'busy' }`; `'replace'` cancels it and starts this one.

***

### body?

```ts theme={null}
body?: string;
```

Defined in: [ops/trigger.ts:34](https://github.com/andresayac/botmesh/blob/main/packages/core/src/ops/trigger.ts#L34)

`ctx.body` of the synthetic triggering message (default `''`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.