# Conversation filter object

Limits which conversations a conversations select menu or conversations multi-select menu offers.

| | |
|---|---|
| **Used in** | [Select menu element](https://workstation.repzo.com/docs/developers/block-kit/elements/select-menu-element), [Multi-select menu element](https://workstation.repzo.com/docs/developers/block-kit/elements/multi-select-menu-element) |

## Usage

Set it as the `filter` field of a `conversations_select` or `multi_conversations_select` element. None of its fields is required on its own, but you must supply at least one.

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `include` | String[] | Which kinds of conversation to list. Any conversation that doesn't match is left out. One or more of `im`, `mpim`, `private` and `public`. The array can't be empty. | Optional |
| `exclude_external_shared_channels` | Boolean | Whether to leave out channels shared with other organisations. Defaults to `false`. | Optional |
| `exclude_bot_users` | Boolean | Whether to leave out conversations with bot users. Defaults to `false`. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Repzo has public channels, private channels, direct messages and group direct messages: `public` and `private` match channels, `im` matches one-to-one direct messages, and `mpim` matches group direct messages.
> - Without `include`, a conversations menu lists the channels and direct messages the reader can see; a channels menu lists channels only.
> - `include` is also enforced on the server: a picked conversation of another kind is refused before anything reaches your app.
> - `exclude_bot_users` hides direct messages with apps. `exclude_external_shared_channels` changes nothing — Repzo has no externally shared channels.

## Examples

### Pick a public or private channel

```json
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Where should the daily sales summary be posted?"
      },
      "accessory": {
        "type": "conversations_select",
        "action_id": "summary_channel",
        "placeholder": {
          "type": "plain_text",
          "text": "Select a channel"
        },
        "filter": {
          "include": [
            "public",
            "private"
          ],
          "exclude_bot_users": true
        }
      }
    }
  ]
}
```

### In a modal input

This example belongs in a modal view.

```json
{
  "blocks": [
    {
      "type": "input",
      "label": {
        "type": "plain_text",
        "text": "Notify these direct messages"
      },
      "element": {
        "type": "multi_conversations_select",
        "action_id": "notify_dms",
        "placeholder": {
          "type": "plain_text",
          "text": "Select conversations"
        },
        "filter": {
          "include": [
            "im"
          ]
        }
      }
    }
  ]
}
```

## Related

- [Composition objects](https://workstation.repzo.com/docs/developers/block-kit/objects)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
