---
title: "Composite Channels"
description: "Configure complex approval flows with multiple approvers"
icon: "layer-group"
---

<Note>
  This feature is currently in development. If you're interested in helping
  shape the design of composite channels, please reach out to us at
  contact@humanlayer.dev.
</Note>

## Overview

Composite channels allow you to create complex approval flows that require multiple approvers or have fallback approvers. You can specify:

- Required approvers
- Optional approvers
- Timeout-based fallbacks
- AND/OR logic between approvers

## Approval Policies

Policies define who can approve a request and under what conditions. They support nested AND/OR logic and timeouts.

```python
from humanlayer import ContactChannel

# Basic channel configurations
eng_channel = ContactChannel(
    slack=SlackContactChannel(
        channel_or_user_id="C123456",
        context_about_channel_or_user="the engineering team"
    )
)

compliance_email = ContactChannel(
    email=EmailContactChannel(
        address="compliance@company.com",
        context_about_user="the compliance team"
    )
)
```

### Combining Channels

Require multiple approvers with `all_of`:

```python
# Require both channels to approve
two_channels = ContactChannel(
    all_of=[eng_channel, compliance_email]
)
```

Allow alternative approvers with `any_of`:

```python
# Allow either channel to approve
either_channel = ContactChannel(
    any_of=[eng_channel, compliance_email]
)
```

### Timeouts

Add timeouts to create fallback approvers:

```python
# Allow email immediately, or Slack after 1 hour
email_timeout = ContactChannel(
    any_of=[
        compliance_email,
        {
            "timeout": 3600,
            "channel": eng_channel
        }
    ]
)
```

### Advanced Example

Complex policies can be created by nesting `any_of` and `all_of`:

```python
advanced = ContactChannel(
    all_of=[
        ContactChannel(
            any_of=[
                eng_channel,
                compliance_email,
                security_channel,
                {"timeout": 3600, "channel": ceo_channel}
            ]
        ),
        ContactChannel(
            any_of=[
                legal_email,
                {"timeout": 2000, "channel": cfo_channel}
            ]
        )
    ]
)
```

This policy requires:

1. One approver from the first group (3 immediate options or 1 delayed option)
2. AND one approver from the second group (immediate legal or delayed CFO)

## Next Steps

- [Configure response options](/core/customize-response-options)
- [Learn about run IDs](/core/run-ids-and-call-ids)
