Routing builder

The full voice routing editor: business hours, what happens when you're open vs closed (ring a set of targets, or go straight to voicemail), and the recording policy. The complete sibling of business-hours-editor.

Installation

npx shadcn@latest add @handset/routing-builder

Reads and writes through GET / PATCH /routing_configs/:id. If you only need the hours, business-hours-editor is the lighter option.

Usage

import { RoutingBuilder } from "@/components/handset/routing-builder";

<RoutingBuilder routingConfigId={config.id} timezone={tenant.timezone} />

Built on useRoutingConfig. Open/closed behavior toggles between Ring (a list of targets — numbers or client:wc_… softphone seats — with a strategy, timeout, and optional roll-to-voicemail) and Voicemail (greeting + transcription). Save PATCHes the whole config at once.

Props

Props
PropTypeDefaultDescription
routingConfigIdstring—The routing config to edit (rtc_…).
timezonestring—The tenant's IANA timezone, shown as context.
onSaved() => void—Called after a successful save.
classNamestring—Merged onto the root card.