Reference / Slack routing

Change a routing rule

update_routing_ruleocmgr routing rule updatePATCH /v1/routing-rules/{id}ADMIN

Change a rule: rename it, narrow the filter, move it to another channel or to a person, or switch it on and off. The filter is replaced whole rather than merged — a partial merge of a negation (not_team) is exactly how somebody ends up routing their own team by accident. Switching a rule on re-checks that its destination holds chat:write — and im:write too, when it names a person; renaming one asks Slack nothing.

Parameters

rulestringREQUIRED

A routing rule, by name (case-insensitively) or by id.

destination_user_emailstring (email)

Move to a teammate by email on the destination Slack connection.

namestring

Rename it.

event_typesstring[]

Replaces the list of types.

filterobject

Replaces the filter whole. Not merged: a partial merge of a negation (not_team) is how somebody ends up routing their own team by accident.

needs_replyobject

Unanswered community thread roots older than after_hours (1–168), excluding handled threads. Evaluated every five minutes; null thread references never match.

after_hoursinteger1–168REQUIRED
organisation_tagsstring[]

Any of these tags on the actor’s derived organisations, by case-insensitive name or id. Source may be omitted to watch all sources.

tone"positive" | "neutral" | "negative" | "mixed"[]up to 4

Any of these event tone labels. Unjudged events, and labels under 0.5 confidence (unclear), never match.

activity_tagsstring[]

Any of these activity thread tags, by name or id; not actor tags.

channel_idsstring[]

Slack channels this rule cares about, by id (C…) or by name (support, or #support). Ids are what the channel picker stores, because a renamed channel keeps its id.

category_idsstring[]

Discourse categories, by numeric id or by name.

repo_namesstring[]

GitHub repositories, as owner/name.

tagsstring[]

Only people carrying one of these tags. Case-insensitive. Tags are the community’s own labels, so this is how "tell me when a champion does anything" is expressed.

not_teamboolean

Leave the workspace’s own staff out. **On unless you turn it off** — a channel that also relays your colleagues talking to each other is one people mute, and a muted channel is a routing rule that has stopped working.

first_time_contributorboolean

Only somebody’s first activity on this source. The "a new person just showed up" rule. Asked of the person, not the account, so a second account we have just matched to somebody who has been here a year is not announced as new.

memberstring (uuid)

Only this member, following merges. Source may be omitted to watch all sources. Cannot combine with a segment trigger.

segmentstring

The segment a **segment rule** watches, by id or name (stored as the id): with event_types segment.entered and/or segment.left, the rule posts the member card — never message text — when somebody enters or leaves it. Only with those event types, and they only with it; a segment rule takes not_team and tags and no source clause.

destination_connection_idstring (uuid)

Post through a different connection.

destination_channel_idstring

Post in a different channel. Moving a DM rule to a channel clears the person.

destination_channel_namestring

The new channel’s name, for the screen.

destination_user_idstring

Direct-message this person instead, as Slack’s U…/W… id. Moving a channel rule to a person clears the channel, and re-checks the destination for im:write.

destination_user_namestring

That person’s handle, for the screen.

templatestring | null

null clears the override.

enabledboolean

Switching a rule on checks that its destination holds chat:write.

CLI flags

--name <name>

Rename it

--event-types <list>

Replace the list of types (empty string clears it)

--filter <json>

Replace the filter whole; it is never merged

--connection <id>

Post through a different connection

--channel <id>

Post in a different channel

--channel-name <name>

The new channel’s name, for the screen

--user <id>

Direct-message this person instead (Slack’s U… id)

--user-email <email>

The same, resolved through the connection’s member list

--user-name <name>

That person’s handle, for the screen

--template <text>

Replace the headline override

--enable

Switch it on (checks the destination holds chat:write)

--disable

Switch it off

Also in Slack routing