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

# Relay templates

> All 58 MessageDesk Relay templates that ship in the app, the builds behind them organized by trigger, and an industry-by-industry starting point.

# Relay templates

MessageDesk ships 58 Relay templates, grouped by outcome in the app. Install one and adjust it to your workflow.

This page has three parts. The **catalog** lists every shipped template. **How the builds work** shows the trigger, conditions, and actions behind each one, so you know what a template does before you turn it on. **Industry starting points** maps common situations to the right build.

> [!NOTE]
>
> **Every template is a starting point.** Adjust the wording, labels, assignees, active hours, and conditions to fit your team. For step-by-step instructions, including **AND/OR** between conditions, chained actions, and delays, see [Create and edit a Relay](https://docs.messagedesk.com/relays/create-edit.md). For every available trigger, condition, and action, see [Relay building blocks](https://docs.messagedesk.com/relays/building-blocks.md).

![Relay Templates 1](https://mintcdn.com/messagedesk/VTmH8E-aXIWaHbfm/images/relay-templates-1.png?fit=max\&auto=format\&n=VTmH8E-aXIWaHbfm\&q=85\&s=7d22483fd2ea2a767a6552f4ae9f8a7f)

***

> [!TIP]
>
> **Stacking templates on the same Trigger?** You can build more than one Relay on the same trigger. For example, an after-hours reply and a keyword reply both on **Message Received**. Set the **Order** on the Relays list so the more specific Relay runs first. All matching Relays run in Order. See [Order your Relays](https://docs.messagedesk.com/relays/create-edit.md#1a-order-your-relays).

## Templates that ship in the app

Seven outcome groups, 58 templates. Pick one, name it, and adjust the fields. Every template arrives **paused**, so nothing runs until you toggle it **On**.

> [!TIP]
>
> **Outcome groups expand and collapse.** The board opens with the outcome headings collapsed so you can scan all seven at once, then expand only the group you need. Individual template cards expand and collapse too, so you can read a template's detail without leaving the board.

Each group below lists every shipped template and what it does. Where this page documents the underlying build, the third column links to it, so you can either install the template or build the same outcome by hand.

### Assign & Route Conversations

| Template | What it does | Build reference |
| - | - | - |
| **Assign to Teammate** | Assigns new conversations to a teammate you pick | [Auto-assign](#scope-by-phone-line) |
| **Auto Assign to First Responder** | Assigns the conversation to the first teammate who replies | [Whoever answers a lead first owns the follow-up](#assign-to-whoever-replies-first) |
| **Unassign on Close** | Clears every assignee when a conversation closes | [Reset assignees on close](#reset-and-sync-when-a-thread-closes) |
| **Route by Phone Line** | Assigns and labels based on the connected number that received the message | [Phone line routing](#scope-by-phone-line) |
| **Route by Keyword** | Assigns the thread to the team that owns a texted keyword | [Keyword-based routing](#match-a-keyword) |
| **Escalate Urgent Texts** | Flags and routes messages that contain urgent wording | [Safety and incident texts escalate the second they land](#match-a-keyword) |
| **Escalate Complaints and Cancellations** | Routes churn-risk language to an owner who can save the account | None yet |
| **Label Applied → Assign Owner** | Turns applying a label into an assignment | None yet |
| **Flag Unclaimed Conversations** | Labels threads that no one has picked up | [Subcontractor and supplier texts never sit unclaimed](#flag-unclaimed-threads) |
| **Re-triage Reopened Conversations** | Clears assignees and labels the thread `Reopened` when a closed conversation comes back | [Re-triage on reopen](#re-triage-on-reopen) |
| **Route Inbound Calls** | Labels, assigns, and drops a note on an inbound call | [Log and route inbound calls to the right owner](#log-and-route-inbound-calls) |
| **Comment Commands (#escalate)** | Watches internal comments for a command word like `#escalate` and routes the thread | None yet |
| **Route a Label Namespace** | Matches every label under one prefix (for example `Region:`) with a single rule | [One rule that routes an entire namespace of labels](#route-a-whole-label-namespace) |
| **Route by Contact Property — Part 1 (Bridge)** | Writes the deciding contact property into a comment, so a conversation Relay can act on it | [Bridge a contact property](#bridge-a-contact-property-to-a-label-and-an-owner) |
| **Route by Contact Property — Part 2 (Apply Label)** | Reads that comment, then labels the thread and assigns its owner | [Bridge a contact property](#bridge-a-contact-property-to-a-label-and-an-owner) |

> [!NOTE]
>
> **Route by Contact Property takes both halves.** Contact triggers fire against a contact, not a conversation, so they can't label or assign on their own. Part 1 writes the property value into a comment; Part 2 reads that comment and does the labeling and assignment. Install both, or neither works. Part 2 also needs one copy per possible value. See [Bridge a contact property to a label and an owner](#bridge-a-contact-property-to-a-label-and-an-owner) for the full build.

### Organize Conversations & Update Status

| Template | What it does | Build reference |
| - | - | - |
| **Identify Unknown Contacts** | Asks anonymous contacts for their name | [First-touch reply for anonymous contacts](#greet-a-new-or-anonymous-contact) |
| **Label Conversation** | Auto-labels new conversations | None yet |
| **Auto Close No Reply Needed** | Closes threads labeled `No Reply Needed` and clears the label when a reply arrives | [Auto-close conversations that don't need a reply](#auto-close-threads-that-dont-need-a-reply) |
| **Label After-Hours Texts** | Labels messages that land outside your operating hours | [Off-duty driver messages still get an instant acknowledgement](#reply-outside-business-hours) |
| **Label by Phone Line** | Labels the thread by the connected number that received the message | [Phone line routing](#scope-by-phone-line) |
| **Auto-Close on Confirmation Keyword** | Closes the thread when the contact texts a confirmation word | [Auto-close after acknowledgement](#auto-close-after-an-acknowledgement) |
| **Handoff Note on Assignment** | Posts an internal comment with context for the new owner | [Leave an automatic handoff note for the team](#hand-off-with-context) |
| **Resolved Label on Close** | Adds a `Resolved` label when a conversation closes | [Clean reset and system sync every time a thread closes](#reset-and-sync-when-a-thread-closes) |
| **Keep Keyword Threads Unread** | Forces matching threads back to **Unread** so a teammate still reviews them | [After-hours auto-reply](#reply-outside-business-hours) |
| **Reopen on Label Removed** | Reopens the conversation when a label comes off | [When a label comes off, sync the change](#sync-the-change-when-a-label-comes-off) |

### Respond to Messages

> [!NOTE]
>
> **Setting up Office Hours?** If you used **Office Hours** in MessageDesk Reach, the first two templates below are the Inbox by MessageDesk equivalent. In the app, click the **lightning bolt** in the upper-left navigation, select **Templates**, then open **Respond to Messages**. Pick **Out-of-Office (Away) Autoresponse** or **After-Hours Auto Reply**, set your hours in the **Active hours** condition, and toggle the Relay **On**. See [Reply outside business hours](#reply-outside-business-hours) for the build.

| Template | What it does | Build reference |
| - | - | - |
| **Out-of-Office (Away) Autoresponse** | Texts an autoresponse outside operating hours | [Out-of-office for one teammate, even on a shared line](#reply-outside-business-hours) |
| **After-Hours Auto Reply** | Texts an autoresponse outside hours and keeps the thread queued for morning review | [After-hours auto-reply](#reply-outside-business-hours) |
| **Respond to a Keyword** | Auto-replies when a contact texts a keyword | [Keyword-based routing](#match-a-keyword) |
| **Instant Acknowledgement (New Conversations)** | Replies to the first message on a brand-new thread | [Website-to-text intake lands in a shared, trackable inbox](#greet-a-new-or-anonymous-contact) |
| **Send a Link on Keyword** | Texts a link when a contact texts the matching keyword | [Applicant first-touch that never goes cold](#match-a-keyword) |
| **Delayed Follow-Up Reply** | Sends a follow-up reply after a delay you set | None yet |
| **Keyword Menu — Option 1 / 2 / 3** | A texted menu where each option gets its own reply and owner | [A texted keyword menu that routes itself](#match-a-keyword) |
| **Broadcast Reply Tracker (ACK)** | Labels and logs every acknowledgement reply to a broadcast | [Policy and route acknowledgements get tracked, not chased](#match-a-keyword) |

> [!NOTE]
>
> **Add your own opt-out language.** Templates that send a message ship with placeholder copy. Keep "Reply STOP to opt out." in any automated outbound text so you stay aligned with carrier requirements.

### Start Conversations from Contacts & Other Tools

| Template | What it does | Build reference |
| - | - | - |
| **Welcome New Contacts** | Texts a welcome the moment a contact is saved | None yet |
| **Text When a Contact Property Changes** | Texts a contact when a property flips to a value you pick | None yet |
| **Text from Another Tool (Inbound Webhook)** | Lets an outside system text a contact through MessageDesk | [Turn an event in another tool into a text](#text-a-contact-from-another-tool) |
| **Appointment or Order Update from Your System** | Texts an appointment or order update built from a webhook payload | [Turn an event in another tool into a text](#text-a-contact-from-another-tool) |
| **Log External Event as a Comment** | Records an outside event as an internal comment instead of a text | None yet |
| **IVR Caller → Menu Link (Voice-to-Text)** | Texts a menu link to someone who calls in | [Log and route inbound calls to the right owner](#log-and-route-inbound-calls) |

### Keep Contacts in Sync

| Template | What it does | Build reference |
| - | - | - |
| **Sync a Contact Property from Another System** | Updates a contact property from a webhook payload | [Keep a contact property in sync from an outside system](#keep-a-contact-property-in-sync) |
| **Push New Contacts to Your CRM** | Sends every newly saved contact to your endpoint | None yet |
| **Push Contact Changes to Your CRM** | Sends contact property changes to your endpoint | None yet |

### Connect to Other Systems

| Template | What it does | Build reference |
| - | - | - |
| **Send Webhook** | A webhook starter you point at your own endpoint | [Send Webhook](https://docs.messagedesk.com/relays/webhooks.md#outbound-webhooks) |
| **Push Inbound Messages to Your System** | Streams inbound texts to your endpoint | [Push new inbound message to an external system](#stream-every-message-to-another-system) |
| **Notify Slack/Teams on New Message** | Pings your chat tool when a message arrives | [Push new inbound message to an external system](#stream-every-message-to-another-system) |
| **Sync Conversation Close to Your CRM** | Pushes the close event downstream | [Notify an external system on conversation close](#reset-and-sync-when-a-thread-closes) |
| **Forward Internal Comments** | Sends internal comments to your endpoint | None yet |
| **Label Applied → Update CRM Stage** | Turns applying a label into a downstream stage change | None yet |
| **Label Removed → Sync the Change** | Pushes label removals downstream | [When a label comes off, sync the change](#sync-the-change-when-a-label-comes-off) |
| **Notify on Assignment** | Pings your notifier when a conversation gets an owner | [Notify the new assignee on assignment](#hand-off-with-context) |
| **Log Inbound Calls to Your System** | Sends inbound call events to your endpoint | [Log and route inbound calls to the right owner](#log-and-route-inbound-calls) |

> [!NOTE]
>
> **Webhook templates need an endpoint first.** Configure your webhook endpoint and signing secret in [**Settings → Developer Tools**](https://docs.messagedesk.com/settings/workspace-settings/developer-tools.md) before you turn any of these on.

### Protect: Compliance & Delivery

| Template | What it does | Build reference |
| - | - | - |
| **Catch Failed Texts** | Surfaces, reopens, and assigns any text that fails to deliver | [Catch every text that fails to deliver](#catch-every-text-that-fails-to-deliver) |
| **Flag Bad Numbers** | Labels numbers whose failures look permanent | [Branch on the reason a message failed](#branch-on-the-reason-a-message-failed) |
| **Retry Later Queue** | Labels temporary failures that are worth retrying | [Branch on the reason a message failed](#branch-on-the-reason-a-message-failed) |
| **Label and Close Opted-Out Conversations** | Labels an opt-out and closes the thread | [Opted-out conversation handler](#follow-up-on-an-opt-out) |
| **Sync Opt-Outs to Your CRM** | Pushes opt-out events downstream | [Opted-out conversation handler](#follow-up-on-an-opt-out) |
| **Archive Every Message (Retention)** | Streams inbound and outbound messages to your retention store | [Every field message is retained and auditable](#stream-every-message-to-another-system) |
| **Assign a Compliance Owner on Opt-Out** | Puts every opt-out on a named owner to confirm you honored it | [Opted-out conversation handler](#follow-up-on-an-opt-out) |

> [!NOTE]
>
> **MessageDesk already blocks sending to opted-out contacts** at the workspace level. The compliance templates are for internal awareness, ownership, and audit trails, not for blocking the outbound message.

The **Custom Relay** (a blank canvas) is also available. Use it to build from scratch when no template fits.

> [!TIP]
>
> **Labels aren't created for you.** Templates that reference a label (`Resolved`, `No Reply Needed`, `Reopened`, `Delivery failed`, and so on) don't create it. Create the label first, or change the name in the template to one you already use. See [Labels](https://docs.messagedesk.com/inbox/labels.md).

> [!TIP]
>
> **Don't see the template you need?** Click **Suggest a Relay Template** at the bottom of the Relay Templates page. It routes you to MessageDesk's feedback board, where you can submit template ideas.

***

***

## How the builds work

Every template above is one of the builds below. They're grouped by trigger, because the trigger is the first thing you pick in the app. Each build lists the **conditions**, the **actions**, and why it works. Adjust the wording, labels, assignees, and scoping to fit your team.

> [!NOTE]
>
> **The Add Action menu varies by trigger.** Not every action appears on every trigger. If a build lists an action you don't see, check the **Add Action** menu for the trigger you picked. See [Relay building blocks](https://docs.messagedesk.com/relays/building-blocks.md#actions) for which actions are scoped to which triggers.

***

> [!NOTE]
>
> **Confirmed vs. pending.** The Add Action menu can vary by trigger. The templates below cover only the combinations confirmed to appear in the app today. Three additional foundational templates (on **Conversation Opened**, **Comment Created**, and **Conversation Label Applied**) are staged for a follow-up once their action menus land.

### Message Received

The busiest trigger. Eight builds cover almost everything teams do with inbound texts.

#### Scope by phone line

| Field | Value |
| - | - |
| **Conditions** | My phone number equals (the line you want to target) |
| **Actions** | Assign teammates to the conversation → Add labels to the conversation |

**Why it works:** Every inbound text on a line lands with an owner and a label you can filter on. This is how a shared line replaces one person's cell phone. A dispatch line routes to that region's dispatcher. A service line routes to the advisor on duty. A front-desk line goes to whoever's covering. Add **Conversation label equals** to split one line further by region or job type.

> [!NOTE]
>
> **There's no round-robin action.** Nothing rotates to the next teammate automatically. Real round-robin takes one Relay per teammate, each scoped by a different line or label so they don't all fire on the same message. That's the supported approach.

#### Match a keyword

| Field | Value |
| - | - |
| **Conditions** | Message contains text (`HELP`, `invoice`, `incident`, `apply`, `ACK`, whatever you need) |
| **Actions** | Reply to message → Assign teammates to the conversation → Add labels to the conversation → Send webhook |

**Why it works:** Keyword matching is the fastest triage you can build. The contact gets an instant acknowledgement, the right team picks up the thread, and the label gives you a filter. Use as many of those actions as the case needs. A safety keyword wants all four. A billing keyword wants an assignee and a label.

Build one Relay per keyword to make a texted menu. `support`, `pricing`, and `sales` each get their own reply and owner, all on the same number.

> [!TIP]
>
> **Keep a catch-all, and stop the cascade.** Order a keyword-free Relay **last** so a message that matches nothing still gets a graceful reply. Then add the **Stop Processing** action to each keyword Relay, so a specific match prevents the catch-all from firing on the same message. Ordering alone won't do it. See [Order your Relays](https://docs.messagedesk.com/relays/create-edit.md#1a-order-your-relays).

> [!NOTE]
>
> **Routing a keyword to a specific person multiplies.** A Relay matches one keyword and does one thing. It can't branch, so "route each of these five phrases to whichever of our fourteen people owns the thread" is 5 × 14 = **70 Relays**, one per pair. That's deliberate: Relays stay simple so they stay predictable.
>
> Three ways to keep it manageable. Pick one shared keyword like `urgent` and build one Relay per person, which is 14 instead of 70. Route the keyword to a single triage owner and let them reassign. Or move the branching to [Zapier](https://docs.messagedesk.com/integrations/zapier.md), which handles multi-condition logic in one Zap at the cost of a separate subscription.

#### Greet a new or anonymous contact

| Field | Value |
| - | - |
| **Conditions** | Is anonymous conversation, or Is new conversation |
| **Actions** | Reply to message (ask for a name) → Add labels to the conversation (`Lead`) → Assign teammates to the conversation |

**Why it works:** Texts from unsaved numbers arrive as anonymous conversations. Asking for a name while the contact is still typing keeps your directory clean and every thread attributable. The label gives sales or intake one filter to work from. See [Anonymous, opted out & blocked](https://docs.messagedesk.com/contacts/anonymous-opt-out-blocked.md) for how anonymous status is determined.

> [!TIP]
>
> **Once your contact list is complete, anonymous means new.** If every existing customer, client, or candidate already exists as a contact, then an anonymous conversation is by definition someone you haven't met. That makes **Is anonymous conversation** a reliable stand-in for "new lead" with no keyword to match and nothing for the sender to remember. Add **Mark Conversation Unread** so the thread stays queued after any auto-reply, and assign it to whoever owns intake.
>
> The reverse is also true: while contacts are still missing, this condition fires on regulars too. Finish importing before you rely on it.

#### Reply outside business hours

| Field | Value |
| - | - |
| **Conditions** | Active hours, with **Trigger outside of business hours** enabled to invert the window |
| **Actions** | Reply to message → Add labels to the conversation (`After-hours`) → Mark Conversation Unread |

**Why it works:** Inverting the Active hours window fires the Relay only when a text lands outside your hours, so nobody waits until morning for an acknowledgement. **Mark Conversation Unread** is the part teams miss: without it, the auto-reply moves the thread to **Replied** and out of the Unread filter, and the customer's actual question never gets reviewed. See [Relays and conversation status](https://docs.messagedesk.com/relays/create-edit.md#relays-and-conversation-status).

Keep "Reply STOP to opt out." in the reply text.

> [!TIP]
>
> **One teammate can be out without silencing the line.** Add **Teammate Assigned** set to the person who's away, then add **Is unassigned conversation** with **OR** to also cover brand-new threads. The auto-reply fires only on their conversations. You don't need a dedicated line per teammate.

#### Cover several shift windows with one set of Relays

| Field | Value |
| - | - |
| **Conditions** | Active hours, set to one window, plus **Teammate Assigned** or a line condition if the window is person-specific |
| **Actions** | Assign teammates to the conversation → **Stop Processing** |

**Why it works:** Most teams don't have one open window and one closed window. They have the hours the admin works, the evenings one group covers, the weekend another group covers, and the hours nobody works. One Relay can't express that, but one Relay per window can.

Build a separate Relay for each window, each with its own **Active hours** and its own assignee. Then order them with the narrowest or highest-priority window first. Every matching Relay runs, and no Relay knows another already fired, so **Stop Processing** as the last action is what stops the later windows from also assigning. See [Order your Relays](https://docs.messagedesk.com/relays/create-edit.md#1a-order-your-relays).

> [!TIP]
>
> **Put the busiest window first.** If your admin covers weekday business hours, that Relay goes at the top with Stop Processing, so the evening and weekend Relays below it never fire during her shift. The unstaffed window is the one to build last: give it an auto-reply rather than an assignee, since there's nobody to route to.

#### Stream every message to another system

| Field | Value |
| - | - |
| **Conditions** | None, or scope by line with My phone number equals |
| **Actions** | Send webhook |

**Why it works:** Every inbound text flows to your CRM, warehouse, ticketing tool, or retention store. Build a matching Relay on **Message Sent** to capture both directions, which is what an audit or recordkeeping requirement usually needs. Scope by line to avoid a firehose.

#### Auto-close threads that don't need a reply

| Field | Value |
| - | - |
| **Conditions** | Label name equals `No Reply Needed` |
| **Actions** | Close the conversation → Remove Label where name equals `No Reply Needed` |

**Why it works:** Courtesy replies like "thanks!" reopen threads nobody needs to touch. Label a conversation `No Reply Needed` when you're done, and the next inbound message closes it and clears the label. A real follow-up later reopens the thread normally.

> [!NOTE]
>
> **Ships as a template:** This build is available as the **Auto-Close No-Reply-Needed** starter from the Relays module. MessageDesk doesn't create the label for you. Create a label named `No Reply Needed` before turning the Relay on, or change the name in both the condition and the action to a label you already use. See [Labels](https://docs.messagedesk.com/inbox/labels.md). The **Label name equals** condition and **Remove Label where name equals** action are documented in [Relay building blocks](https://docs.messagedesk.com/relays/building-blocks.md).

#### Route a whole label namespace

| Field | Value |
| - | - |
| **Conditions** | Conversation label equals, operator **startsWith**, value `Region:` |
| **Actions** | Send webhook → Add labels to the conversation (`Routed`) |

**Why it works:** **Conversation label equals** is a matcher, not a fixed equality check. One `startsWith "Region:"` rule catches `Region:North`, `Region:South`, and every label you add later. You skip maintaining one Relay per region. See the operator list in [Relay building blocks](https://docs.messagedesk.com/relays/building-blocks.md#conditions).

#### Flag unclaimed threads

| Field | Value |
| - | - |
| **Conditions** | Is unassigned conversation |
| **Actions** | Add labels to the conversation (`Needs owner`) → Send webhook |

**Why it works:** Anything that slips past your routing gets flagged instead of aging in the queue. Pair it with an Inbox filter on **Assignee = Unassigned**.

***

### Message Sent

#### Assign to whoever replies first

| Field | Value |
| - | - |
| **Conditions** | Is unassigned conversation |
| **Actions** | Assign to sender |

**Why it works:** The first teammate to reply owns the follow-up. The conversation is no longer unassigned, so later replies don't steal it, and new inbound messages route to that teammate by default. Drop the condition if you want the sender to take ownership even on threads someone else already owns.

> [!NOTE]
>
> **Assign to sender** only appears on the **Message Sent** trigger.

> [!NOTE]
>
> **Ships as a template:** This template is available as the **Auto Assign to First Responder** starter from the Relays module. Install it as-is or use the fields above to build it yourself.

#### Auto-close after an acknowledgement

| Field | Value |
| - | - |
| **Conditions** | Optional: My phone number equals a specific line, or match an acknowledgement keyword |
| **Actions** | Close the conversation → Mark Conversation Read |

**Why it works:** One-shot confirmations (appointment reminders, delivery pings, "on my way") don't need to sit in the Inbox after they go out. Closing keeps the Inbox focused on threads that still need a person. A new inbound message reopens the thread and fires any **Conversation Opened** Relays you've built.

***

### Message Failed

#### Catch every text that fails to deliver

| Field | Value |
| - | - |
| **Conditions** | None, or scope to a line with My phone number equals |
| **Actions** | Add labels to the conversation (`Delivery failed`) → Open the conversation → Assign teammates to the conversation → Send webhook |

**Why it works:** A failed text is invisible, because the sender assumes it went through. This surfaces the failure, reopens and flags the thread, and puts it on someone. Most valuable for time-sensitive dispatch, staffing, and safety messages.

#### Branch on the reason a message failed

| Field | Value |
| - | - |
| **Conditions** | Message failure contains text (match the carrier error wording) |
| **Actions** | Add labels to the conversation (`Retry later`) → Send webhook |

**Why it works:** Not every failure is worth retrying. Matching the failure text lets you queue the temporary ones and clean up the permanent ones. Build a second Relay on the same trigger that matches a permanent-failure reason and labels it `Bad number` instead. Use provider-agnostic wording in your matches so the Relay survives a carrier change. See [Delivery status and errors](https://docs.messagedesk.com/messaging/delivery-status-errors.md).

***

> [!NOTE]
>
> **Verify before enabling.** If your workspace doesn't see the **Message failure contains text** condition on the Message Failed trigger yet, hold this build until it appears.

### Conversation Opened

#### Re-triage on reopen

| Field | Value |
| - | - |
| **Conditions** | None, or scope by line or label |
| **Actions** | Remove all teammates from the conversation → Add labels to the conversation (`Reopened`) |

**Why it works:** When a customer replies days later, the original assignee may not be the right owner anymore. Clearing assignees sends the thread back through normal triage, where your Message Received routing picks it up fresh.

***

### Conversation Users Assigned

#### Hand off with context

| Field | Value |
| - | - |
| **Conditions** | None, or scope by line or label |
| **Actions** | Send Comment (the handoff note) → Send webhook (ping Slack or Teams) → Add labels to the conversation (`Handoff`) |

**Why it works:** **MessageDesk doesn't notify anyone when they're assigned a conversation.** Assignment is silent, so a thread can sit with a new owner who has no idea it's theirs. This Relay is how the handoff actually gets noticed: the comment carries the context, and @mentioning the new owner in it fires the **@Mention in a comment** notification they do receive. The contact never sees any of it.

Assigning more than one teammate works too, which is how a manager lets their team reply on their behalf. Mention each of them in the comment.

> [!NOTE]
>
> **Assignment isn't a notification event.** MessageDesk notifies on new messages, @mentions in comments, and finished exports and imports. Being assigned isn't on that list, and the **Only notify me about conversations assigned to me** email setting filters *new message* notifications to your threads rather than alerting you when you're assigned one. See [Notification preferences](https://docs.messagedesk.com/settings/my-settings/notification-preferences.md).

***

### Conversation Closed

#### Reset and sync when a thread closes

| Field | Value |
| - | - |
| **Conditions** | Teammate Assigned (Any teammate), or scope by line or label |
| **Actions** | Remove all teammates from the conversation → Add labels to the conversation (`Resolved`) → Send webhook |

**Why it works:** Closing a conversation doesn't unassign anyone on its own, and a new inbound message reopens the thread with those assignees still attached. That's how a closed thread comes back owned by whoever handled it last, even when they're not the right owner now. This Relay resets assignment so the next message lands unassigned and your routing handles it fresh. The `Resolved` label keeps reporting clean, and the webhook pushes the close event to your CRM, warehouse, or ticketing tool. Gating on **Teammate Assigned** set to Any teammate means the Relay only runs when someone's actually assigned.

***

> [!NOTE]
>
> **Ships as a template:** This template is available as the **Unassign on Close** starter from the Relays module. Install it in one click, or build it from the fields above.

### Conversation Label Removed

#### Sync the change when a label comes off

| Field | Value |
| - | - |
| **Conditions** | Conversation has label, or scope by line |
| **Actions** | Send webhook → Reply to message → Open the conversation |

**Why it works:** A label coming off usually signals a state change, so firing on removal keeps your CRM or reporting in sync without anyone remembering to update it. **Remove labels isn't available on this trigger**, so this Relay reacts to a removal rather than performing one.

***

### Call Received

#### Log and route inbound calls

| Field | Value |
| - | - |
| **Conditions** | None, or My phone number equals to scope to a line |
| **Actions** | Add labels to the conversation (`Inbound call`) → Assign teammates to the conversation → Send Comment → Send webhook |

**Why it works:** Voice activity lives in the same thread as SMS. Firing on the call assigns an owner, drops an internal note, and pings your notifier the moment the phone rings. No waiting for a follow-up text.

> [!NOTE]
>
> **Call Received works on MessageDesk-owned numbers only.** It doesn't fire for Twilio-connected, Telegorithm, or hosted (text-enabled) numbers. **Reply to message** isn't available on this trigger. See [Call Received actions](https://docs.messagedesk.com/relays/building-blocks.md#actions-on-the-new-triggers).

***

> [!NOTE]
>
> **Call Received works only for fully ported (voice and text) and text-only numbers.** It doesn't fire for Twilio-connected numbers or hosted (text-enabled) numbers that are already tied to a voice service. **Reply to message** isn't available on this trigger. See [Call Received actions](https://docs.messagedesk.com/relays/building-blocks.md#actions-on-the-new-triggers) for the full action list.

### Inbound Webhook Received

#### Text a contact from another tool

| Field | Value |
| - | - |
| **Conditions** | Webhook Payload Field Equals (optional, to branch on a payload value) |
| **Actions** | Send Message (pick the outbound channel, build the text from **Event Data**) |

**Why it works:** Your CRM, form, or scheduling tool texts a contact through MessageDesk the moment something happens. Appointment reminders and order updates stop being a copy-paste job. Include "Reply STOP to opt out." in the message.

#### Keep a contact property in sync

| Field | Value |
| - | - |
| **Conditions** | None, or Webhook Payload Field Equals |
| **Actions** | Update Contact Property (set it from the payload using **Event Data**) |

**Why it works:** When a value changes in another system, the webhook updates the matching property in MessageDesk. **Text** properties accept any payload value. Non-text properties map the matching Custom Property from the payload, and the value has to pass [type validation](https://docs.messagedesk.com/relays/webhooks.md#custom-property-validation).

> [!NOTE]
>
> **This is a non-conversation trigger.** It runs against the contact in the payload, so conversation-scoped conditions don't apply. **Add labels to the conversation** is still available. See [Webhooks](https://docs.messagedesk.com/relays/webhooks.md#inbound-webhooks) for the endpoint URL, the `X-MD-Signature` header, and the payload schema.

***

### Contact Created, Contact Updated, and Comment Created

Three triggers that work as one pattern. The two contact triggers fire against a contact rather than a conversation, so on their own they can't label or assign anything. Comment Created is what connects them to a conversation.

#### Bridge a contact property to a label and an owner

That's a problem when the thing deciding ownership lives in a contact property: a `Clinician`, `Account owner`, or `Territory` field.

The way through is a comment. **Send Comment** creates the conversation and writes the property value into it. **Comment Created** is a conversation trigger, so it can label and assign. The comment is the bridge.

**Part 1: write the property into a comment.** Build this twice, once on each trigger.

| Field | Value |
| - | - |
| **Trigger** | Contact Created, then a second Relay on Contact Updated |
| **Conditions** | None, or **Contact Property Equals** to scope which contacts qualify |
| **Actions** | Send Comment, with **Event Data** set to the property that decides ownership |

**Part 2: read the comment, then label and assign.** Build one of these per possible value.

| Field | Value |
| - | - |
| **Trigger** | Comment Created |
| **Conditions** | Comment contains text, matching one property value (a person's name, a territory, an account tier) |
| **Actions** | Add labels to the conversation → Assign teammates to the conversation |

**Why it works:** Updating one contact property does the rest. The contact Relay drops a comment carrying the value, and the matching Comment Created Relay turns that value into a label and an owner. Nobody labels or assigns by hand, and the label keeps working as a scope for every other Relay you build.

> [!WARNING]
>
> **This needs a saved contact.** Contacts and conversations are separate records in MessageDesk, which is what lets an [anonymous conversation](https://docs.messagedesk.com/contacts/anonymous-opt-out-blocked.md) exist as a bare phone number. The bridge reads a contact property, so a conversation with no contact behind it has nothing to route on. You can still label anonymous conversations by hand, or with a Message Received Relay, but not with this pattern. Get contacts saved and their properties populated first.

> [!NOTE]
>
> **Expect a comment every time the property changes.** The Part 1 Relay on **Contact Updated** fires on every update to that contact, so the internal comment reposts each time. That's what keeps the label correct if someone edits the field later, and the comments accumulate in the thread.
>
> If the noise outweighs that, turn off the **Contact Updated** half and keep only **Contact Created**. The cost: a label that gets removed later won't come back on its own, and any Relay scoped to that label quietly stops matching that conversation. Contacts are visible to your team; internal comments are not visible to the contact either way.

> [!NOTE]
>
> **A Relay's comment does fire Comment Created.** It won't re-trigger the Relay that posted it, so this can't loop, but it does reach other Comment Created Relays. That's the whole mechanism. See [Comment Created](https://docs.messagedesk.com/relays/building-blocks.md#triggers).

> [!TIP]
>
> **Part 2 costs one Relay per value.** Fourteen clinicians means fourteen Comment Created Relays, each matching one name. They're near-identical, so build one and duplicate it. Keep the matched values distinct enough that **Comment contains text** can't hit two at once: `Sam Rivera` beats `Sam` when you also have a Samir.

> [!TIP]
>
> **What the property and label unlock downstream.** Build a [saved filter](https://docs.messagedesk.com/contacts/saved-filters.md) per value and each owner can pull up their own client list, select all, and message them at once. And because a [custom role](https://docs.messagedesk.com/settings/workspace-settings/team-management.md#custom-roles-and-permissions) can scope someone's Inbox to specific labels, the label this Relay applies also feeds who can see the thread. Build the role by copying **Operator** and setting **Label inboxes** to Editor or Viewer on just that person's label, with No Access elsewhere. The default Operator role won't do it on its own: its label permissions govern editing labels, not restricting what shows up in the Inbox. One caveat that matters here, since this Relay assigns as well as labels: [assignment overrides label scope](https://docs.messagedesk.com/inbox/labels.md#faq), so an assigned teammate can see the thread even with No Access to its label.

***

### Opt Out Created

#### Follow up on an opt-out

| Field | Value |
| - | - |
| **Conditions** | None |
| **Actions** | Add labels to the conversation (`Opted Out`) → Assign teammates to the conversation (compliance owner) → Close the conversation → Send webhook |

**Why it works:** The trigger fires on the opt-out event, so it catches opt-outs that never arrive as a STOP text. Labeling keeps the thread visible to compliance. An owner confirms you honored the request. The webhook syncs it downstream, so no other system texts the contact.

> [!NOTE]
>
> **MessageDesk already blocks sending to opted-out contacts** at the workspace level. This Relay is for awareness, ownership, and audit trails, not for blocking the message. Message-sending actions aren't available on this trigger, and conversation actions run only on channel-specific opt-outs. See [Opt Out Created](https://docs.messagedesk.com/relays/building-blocks.md#actions-on-the-new-triggers).

***

## Industry starting points

Every row below is one of the builds above with a different keyword, label, or line attached. Find the situation closest to yours, then go build it.

| Industry | The situation | Build | What to set |
| - | - | - | - |
| Construction | Texts pile up on one supervisor's phone | [Scope by phone line](#scope-by-phone-line) | The dispatch line, plus a crew or job label |
| Construction | Subcontractor and supplier texts sit unclaimed | [Flag unclaimed threads](#flag-unclaimed-threads) | Label `Needs owner` |
| Logistics | Driver texts need to reach the right dispatcher | [Scope by phone line](#scope-by-phone-line) | The dispatch line, plus a region label |
| Logistics | Off-duty drivers text after dispatch closes | [Reply outside business hours](#reply-outside-business-hours) | "Text URGENT for the on-call line." |
| Logistics | Policy and route acknowledgements go unchased | [Match a keyword](#match-a-keyword) | Keyword `ACK`, label `Acknowledged` |
| Field operations | Safety and incident texts need to escalate now | [Match a keyword](#match-a-keyword) | Keyword `incident`, assign the safety lead, webhook the safety channel |
| Field operations | Crew recruiting lives on personal phones | [Match a keyword](#match-a-keyword) | Keyword `available`, webhook your ATS |
| Field operations | Every field message has to be retained | [Stream every message to another system](#stream-every-message-to-another-system) | Build the matching Message Sent Relay too |
| Staffing | Shift-fill replies need an owner fast | [Match a keyword](#match-a-keyword) | Keyword `yes`, assign the coordinator, webhook your ATS |
| Staffing | Applicants go cold before anyone calls | [Match a keyword](#match-a-keyword) | Keyword `apply`, reply with the application link |
| Staffing | Candidate numbers arrive unsaved | [Greet a new or anonymous contact](#greet-a-new-or-anonymous-contact) | Label `Unverified` |
| Professional services | Website-to-text intake needs to be trackable | [Greet a new or anonymous contact](#greet-a-new-or-anonymous-contact) | Label `Intake`, webhook your CRM |
| Professional services | Billing questions clog the general queue | [Match a keyword](#match-a-keyword) | Keyword `invoice`, assign billing |
| Automotive service | Status texts land on one advisor's phone | [Scope by phone line](#scope-by-phone-line) | The service line, label `Service` |
| Financial services | Broadcast replies need an owner and a record | [Stream every message to another system](#stream-every-message-to-another-system) | Assign the advisor, webhook your recordkeeping system |
| Home services | After-hours texts are tomorrow's jobs | [Reply outside business hours](#reply-outside-business-hours) | The jobs line, assign the on-call coordinator |
| Support and sales | One number has to serve three teams | [Match a keyword](#match-a-keyword) | One Relay per keyword, plus a catch-all last |

> [!NOTE]
>
> **MessageDesk facilitates 10DLC registration as your CSP and honors opt-outs at the workspace level.** That covers the compliance floor for the retention and recordkeeping rows above. It doesn't replace your own retention policy.

***

## See also

* [Relay building blocks](https://docs.messagedesk.com/relays/building-blocks.md): every trigger, condition, and action
* [Create and edit a Relay](https://docs.messagedesk.com/relays/create-edit.md): step-by-step building, AND/OR conditions, delays, ordering, and conversation status
* [Send Webhook](https://docs.messagedesk.com/relays/webhooks.md#outbound-webhooks): payload structure, signature validation, and retry behavior
* [Developer Tools](https://docs.messagedesk.com/settings/workspace-settings/developer-tools.md): configure your webhook endpoint and signing secret
* [Relays overview](https://docs.messagedesk.com/relays/overview.md): concepts and what Relays are for


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.