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

# Threaded CRM comments and activity feed

> Add threaded comments on any Dench CRM record, mention teammates or Dench, react, follow records, and read the merged change-history activity feed.

Every record has a conversation. Open an entry and the **Activity** feed sits
under Notes: comments (threaded, with reactions) interleaved with who changed
what, newest first. Consecutive edits by one person collapse into a single
line; click it to see the field diffs.

<CardGroup cols={3}>
  <Card title="Threads" icon="comments">
    Reply to any comment, at any depth. Deep threads flatten after three levels.
  </Card>

  <Card title="Mentions" icon="at">
    `@` a teammate to notify them. `@Dench` to bring the agent into the thread.
  </Card>

  <Card title="Follow" icon="bell">
    Commenting, being mentioned, creating, or being assigned follows the record.
  </Card>
</CardGroup>

## In the app

The comment box is the same editor as Notes: slash commands, images, tables,
and the `@` picker for files, records, meeting moments, people, and Dench.
`↵` posts, `Shift+↵` adds a line. Hover a comment for reactions, **Reply**, and `⋯` (edit, copy
link, delete). The **Follow** toggle in the section header controls whether
you hear about activity on the record.

## Mentions are links

A mention is a markdown link, so comments and notes round-trip as plain
markdown:

```md theme={null}
[@Kelly Go](/?member=<userId>)      # a teammate — notifies them
[@Dench](/?member=dench)            # the agent — replies in the thread
```

Member ids come from `dench members list`. Plain `@Kelly` text notifies nobody.

## CLI

```bash theme={null}
dench crm comments list <object> <entryId> --json              # roots newest first + preview replies
dench crm comments replies <commentId> --json                  # a whole thread, oldest first
dench crm comments create <object> <entryId> --body "…"        # markdown; --body-file or stdin also work
dench crm comments create <object> <entryId> --reply-to <commentId> --body "…"
dench crm comments create <object> <entryId> --dench --body "what's the ARR here?"
dench crm comments update <commentId> --body "…"
dench crm comments delete <commentId>
dench crm comments react <commentId> 👍                        # toggles
dench crm watch <object> <entryId> [--off]                     # follow / unfollow
dench crm watch status <object> <entryId>
```

`--dench` is fire-and-forget: the command returns the comment id and Dench's
answer lands as a threaded reply shortly after. Poll `comments list` or read
your notifications.

## API

```bash theme={null}
curl -sS "$DENCH_API_BASE/crm/objects/company/entries/<entryId>/comments?limit=20" \
  -H "Authorization: Bearer $DENCH_API_KEY"

curl -sS -X POST "$DENCH_API_BASE/crm/objects/company/entries/<entryId>/comments" \
  -H "Authorization: Bearer $DENCH_API_KEY" -H "Content-Type: application/json" \
  --data '{"body":"Kickoff went well — [@Bob](/?member=<userId>) can you send the proposal?","mentionDench":true}'

curl -sS -X PUT "$DENCH_API_BASE/crm/comments/<commentId>/reactions/%F0%9F%91%8D" \
  -H "Authorization: Bearer $DENCH_API_KEY"
```

Every comment link is deep-linkable:
`/<workspace>?entry=<object>:<entryId>&comment=<commentId>` opens the record
scrolled to that comment. Comments are also searchable from `⌘K`.

## @Dench

Mentioning Dench runs the same agent that answers in Slack. It reads the
thread it was mentioned in, replies as a comment, and delegates record work
(field changes, research, tasks) to a worker. Changes the worker makes appear
in the same feed with Dench as the actor, so the reply summarizes rather than
narrates. A comment written by Dench never re-summons Dench.

<Note>
  Dench's own replies can't be edited; workspace admins can delete them.
</Note>

## Notifications

| Event                                    | Kind               | Who                                     |
| ---------------------------------------- | ------------------ | --------------------------------------- |
| Mentioned in a comment                   | `mention`          | the mentioned member                    |
| Reply to your comment                    | `comment_reply`    | the parent author                       |
| Reaction on your comment                 | `comment_reaction` | the comment author (in-app only)        |
| Comment or change on a record you follow | `entry_activity`   | followers (coalesced per actor, 10 min) |
| Dench answered you                       | `dench_reply`      | whoever summoned Dench                  |

Each person is notified once per comment (mention wins over reply, reply over
activity), never for their own actions. See [Notifications](/docs/notifications).
