Email Routing Rules
Email routing rules send each new inbound email to a team or a flow based on who sent it, who it was addressed to and its subject, and can send the sender an automatic acknowledgement.
Setting Up Email Routing
Every new email becomes a ticket. Routing decides which team’s queue it lands in, or which flow handles it first. Work through these decisions in order; each links to the section that explains it in full.
- Make sure mail reaches RapiDesq. Connect a mailbox or set up a forwarding address on the Connections tab. Rules only see mail that arrives one of those two ways. See Email Channel.
- Decide where ordinary mail goes. Most mail should not need a rule. Give each mailbox or forwarding address its own routing on the Connections tab, and pick a Fallback team for unmatched mail on the Pattern Rules tab for anything that is left. Without either, unmatched mail becomes a ticket with no team. See What Happens When No Rule Matches.
- Add a rule for each exception, such as invoices for Billing or press mail for Marketing. For each rule, decide:
- Which mail it watches (Applies To): all inbound email, one mailbox, or one forwarding address. This cannot be changed later. See Step 1: Source.
- What it looks for: To, CC and From addresses and subject words, with
*as a wildcard. See Step 2 and How Patterns Match. - Where matching mail goes: Direct to Team puts the ticket in a team’s queue; Through Flow runs a flow on it first (Professional and Enterprise). See Where Matching Mail Goes.
- Whether the sender gets an automatic reply, and which template it uses. Create the template first on the Templates tab. See Auto-acknowledgements and Email Templates.
- Put the rules in order. When two rules could match the same email, the lower Priority number wins. Every new rule starts at 0, so edit a rule to change its priority. See How a Rule Is Chosen.
- Check the result. Send a test email that should match, and check which team the ticket landed on and which rule sent it there. See Checking Where an Email Went.
Where to Find Them
Open Admin > Channels > Email and select the Pattern Rules tab. The tab shows two things:
- Fallback team for unmatched mail at the top: where mail goes when no rule matches.
- Email Routing Rules below it: the list of rules, sorted by priority, lowest number first. Each row shows the Rule Name with a line under it that sums up what the rule looks for (for example
To: billing@acmeoutdoors.com | Subject: *invoice*, with the entries of one field joined by “or”), the Email Connection it applies to, its Routing Target (Direct to Team and the team, or Through Flow and the flow), its Priority and its Status, Active or Inactive. The pencil and bin icons under Actions edit and delete the rule.
Before the first rule exists, the list shows No email routing rules with an Add Rule button. Until a fallback team is chosen, the card above it warns: “No fallback team is set. Unmatched mail is created without a team, so no team’s queue shows it: only people who can see all teams’ tickets will find it.”
The tab before any rule or fallback team.
Owners and Admins can open the tab and change everything on it. For anyone else, see Permissions and Plan Availability.
How a Rule Is Chosen
When the first message of a new email conversation arrives, RapiDesq tries the active rules that apply to it, one by one, and the first rule that matches decides where the message goes. A rule applies to a message when its Applies To is All inbound email, or is the mailbox or forwarding address the message arrived on. Replies to an existing conversation stay on that conversation’s ticket; rules are not tried again for them.
Rules are tried in this order:
- Priority: lower numbers first. A rule with priority 0 is tried before a rule with priority 10.
- At the same priority, a rule for a specific mailbox or forwarding address is tried before a rule for All inbound email.
- After that, the older rule first.
Inactive rules are skipped. The list on the Pattern Rules tab is sorted by priority, so you can read the order from its Priority column.
A rule is tried only once per email, when its conversation starts. Changing a rule later never moves tickets that already exist.
Where Matching Mail Goes
A rule sends the email it matches to one of two destinations, chosen under Routing Mode. Either way the email becomes a ticket at once, and the sender’s later replies join that ticket.
| Routing Mode | What happens | What your team sees | What the sender experiences |
|---|---|---|---|
| Direct to Team “Route matching emails directly to a team for user assignment” | The ticket is created on the team you choose under Select Team, and that team’s routing takes over: it is offered or assigned to a member, or waits in the team’s queue, according to the team’s assignment mode. | The ticket in the team’s queue, or an offer to a member who is available and has capacity. | Nothing until someone replies, unless the rule sends an acknowledgement. Replies from your team arrive as email in the same thread. |
| Through Flow “Process matching emails through a conversation flow before routing” | The ticket is created with no team, and the flow you choose under Select Flow starts on it straight away. The flow’s Route to Team step is what puts the ticket in a team’s queue. | Nothing in a queue until the flow routes the ticket. A flow path that ends without routing it leaves the ticket on Unrouted Tickets. | Whatever the flow’s steps send, then your team’s replies once a team has the ticket. |
- Choose Direct to Team when you already know which team handles this kind of mail. It is on every plan.
- Choose Through Flow when the email needs sorting or enriching first: tagging it, setting its priority, or picking a team from what it says. Routing email to a flow needs the flow builder and advanced routing, which Professional and Enterprise include. Build and publish the flow before you point a rule at it; see Conversation Flows.
If the flow cannot start, for example because your plan no longer includes flows, the ticket keeps no team and appears on Unrouted Tickets. How a team offers and assigns its tickets is set on the team; see Routing Strategies & Queues.
What Happens When No Rule Matches
A message that matches no rule is routed the way its source is routed:
- The routing set on the mailbox or forwarding address itself (on the Connections tab, in the connection’s Routing section). See Email Channel: Routing Configuration.
- If the source has no routing of its own, the Fallback team for unmatched mail.
- If there is no fallback team either, the ticket is created without a team. No team’s queue shows it; only people who can see every team’s tickets will find it. See Unrouted Tickets.
To set the fallback team, pick a team under Fallback team on the Pattern Rules tab. It is saved as soon as you pick it. Remove fallback clears it. If unmatched mail currently goes to a flow or a bot, the card says “Unmatched mail currently goes to a flow or bot. Choosing a team here replaces that.” If the choice cannot be saved, the card shows “The fallback team could not be saved. Try again.”
The fallback team does not use one of your plan’s channel connections. A team that is the fallback cannot be deleted until you choose another fallback or remove it: the team’s delete screen lists it as “Email to any mailbox without its own route”.
The fallback team card with Support chosen.
Creating a Rule
Click Add Rule. The Create Routing Rule wizard has four steps: Source, What to match, Where to send it and Review & Confirm. Next moves on once the step is complete, Back returns to the step before, and Cancel closes the wizard without saving anything.
Step 1: Source
- Routing Rule Name (required, up to 100 characters). Two rules for the same source cannot share a name.
- Description: the step shows this box, but what you type in it is not kept with the rule.
- Applies To (required): which mail the rule watches.
- All inbound email: every message, however it arrives.
- A connected mailbox, shown as its name and address.
- A forwarding address, shown as the full address.
The source cannot be changed once the rule exists. To route a different source, create a new rule.
Wizard step 1 filled in.
Step 2: What to match
Four fields, each a list. Type an entry and press Enter after each one; an entry you type and then leave is added too. Each entry shows as a chip, and its × removes it.
- To addresses: matched against the addresses on the To line, and also against the address the message was delivered to (your mailbox address or your forwarding address).
- CC addresses: matched against the CC line only. Leave it empty to ignore the CC line.
- From addresses: matched against the sender’s address.
- Subject patterns: matched against the subject line.
Wizard step 2 with To and Subject entries.
The wizard asks for at least one entry in at least one field: with every field empty, Next shows “Add at least one address or subject pattern, otherwise this rule matches every message on the mailbox.” A rule with no entries at all would match every message from its source.
Wizard step 2: Next with every field empty.
Step 3: Where to send it
- Routing Mode:
- Direct to Team: the message becomes a ticket in the team you choose under Select Team.
- Through Flow: the message runs through the flow you choose under Select Flow. Routing email to a flow is available on the plans that include the flow builder and advanced routing; see Pricing. On other plans the wizard still lists Through Flow, but a rule that uses it cannot be created. See Conversation Flows.
- Auto-acknowledge matching emails: sends the sender an automatic reply when the message matches this rule. When it is on, the wizard needs an Acknowledgement Template (“Choose the template to send when auto-acknowledge is on”). The list shows every email template you have, of every type and including switched-off ones, and whichever you pick is the one sent, so pick one written as an acknowledgement. New template, at the end of the list, opens the Create Email Template guided setup on top of the wizard; the template you create there is selected when it closes. That guided setup cannot save a template at the moment (see Troubleshooting), so create the template first with Add Template on the Templates tab. See Auto-acknowledgements below.
Wizard step 3 filled in (Billing, acknowledged).
Step 4: Review
Review & Confirm states the rule back: Name, Email Connection (the source), From, To, CC, Subject (each field’s entries joined by “or”, or Not set), Routing Target and Priority. Click Create.
Wizard step 4, Review & Confirm.
The wizard then shows Created Successfully. Done closes it. Create Another starts the next rule with the same source and destination and a numbered name (“Invoices 2”); the patterns and the acknowledgement are cleared.
Created Successfully, with Create Another.
A new rule starts at priority 0 and is active. To change its priority, edit it.
How Patterns Match
- Any entry in a field is enough. A To field with
sales@example.comandbilling@example.commatches mail to either address. - Fields are combined. A rule with both To and Subject entries matches only mail that satisfies both.
- An empty field does not restrict the rule. An empty From field accepts any sender.
- A filled field needs something to match. A rule with a CC entry never matches a message that has no CC line.
*is a wildcard for any run of characters. It is the only wildcard.- The whole value must match.
*@example.commatches every address at example.com,support@*matches support@ at any domain, and*invoice*matches any subject containing “invoice”. A subject entry ofinvoicewithout wildcards matches only a subject that is exactly “invoice”. - Matching ignores upper and lower case.
- Display names are ignored:
"Support Team" <Support@Example.com>on the To or CC line is matched assupport@example.com. - Plus-addressing is understood: a rule for
support@example.comalso matches mail sent tosupport+urgent@example.com.
Each entry can be up to 255 characters. Blank entries are dropped when you save.
Editing, Switching Off and Deleting
Use the pencil icon on a rule’s row to open Edit Routing Rule. It holds Rule Name; Applies To, shown but fixed; Priority; the four fields under Match Patterns; Routing Mode with its Select Team or Select Flow under Routing Target; Auto-acknowledge matching emails with its Acknowledgement Template; and Active. Click Save to keep the changes. On a plan without flows, Through Flow is greyed out here and says what is missing.
Edit Routing Rule for "Press enquiries".
The Acknowledgement Template list in this dialog offers your active acknowledgement templates and Default template. Choosing Default template saves no template today: a rule that already had a template keeps sending it, and a rule that never had one sends no acknowledgement. Pick a named template.
In the edit dialog you can empty every match field. The rule then matches every new message from its source, so give it a high priority number if you mean it as a catch-all.
Switch Active off to keep a rule without using it. The list shows it as Inactive, and it is skipped until you switch it back on.
The bin icon opens Delete Routing Rule; click Delete to remove the rule, or Cancel to keep it. Emails it used to match are then routed by the next matching rule, or as unmatched mail.
The Delete Routing Rule confirmation.
A team that a rule routes to with Direct to Team cannot be deleted, whether the rule is active or not: the team’s delete screen says it “can’t be deleted yet” and lists “The “rule name” email routing rule”, with “(all mailboxes)” after it for an All inbound email rule. Point the rule at another team, or delete it, first. Disconnecting a mailbox deletes the rules that apply to that mailbox.
If something a rule names no longer exists, the list says so instead of a name: Unknown source under Email Connection (for example a forwarding address that was removed), or Unknown Team or Flow: Unknown Flow under Routing Target. Edit the rule to choose a new destination, or delete it; a rule whose source is gone can no longer match anything.
Auto-acknowledgements
With Auto-acknowledge matching emails on, a new message that matches the rule gets one automatic reply, however it arrived (a connected mailbox or a forwarding address).
- Who sends it. Mail that arrived in a connected mailbox is answered from that mailbox. Forwarded mail is answered from the address the customer wrote to when one of your connected mailboxes may send as that address; otherwise it goes from your first connected mailbox, with its Reply-To set to the address the customer wrote to. When the brand of that address has a Support email, the reply’s Reply-To is that address. Without a connected mailbox that can send, no acknowledgement goes out.
- The reply uses the rule’s template, whatever its type and whether or not it is switched off: switching a template off only takes it out of the edit dialog’s list, and the rules already using it keep sending it. To stop a rule acknowledging, switch off Auto-acknowledge matching emails on the rule. If the template has been deleted, nothing is sent. Templates are managed on the Templates tab; see Email templates.
- The template’s placeholders are filled from the incoming email: the sender’s name (or address), their address, the subject and the address they wrote to. The ticket number, team and user name are not known yet, so give those placeholders a default; see Which placeholders each type fills.
- If the template has no subject, the reply’s subject is “Re: ” followed by the original subject. If its body comes out empty, nothing is sent.
- Only the first message of a conversation is acknowledged, not the replies after it.
- Automatic mail is never acknowledged: out-of-office and other auto-replies, delivery notices, and mail marked as bulk.
- An acknowledgement that cannot be sent never stops the message itself from becoming a ticket.
- A message that reaches you twice (by a synced mailbox and by forwarding, or delivered again) is acknowledged once.
- When Outbound delivery on the General Settings page is set to Suppress, no email leaves the workspace, acknowledgements included; each is recorded as suppressed instead.
Checking Where an Email Went
Every new email’s routing is recorded. Open Routing Decisions, find the ticket’s entry, and open its details. Its Outcome says what decided the email’s destination, and Decision Factors say why:
- Matched rule: the rule that sent it, or empty when no rule matched.
- Matched recipient: the To or CC address that made the rule match. It is empty when the rule matched on the sender or subject alone.
- Addresses considered: every address the email arrived on, which is what To and CC entries are compared with.
- Source type and Received at: whether it came through a connected mailbox or a forwarding address, and which one.
- Routing outcome: Team selected (a rule sent it to a team), Configured fallback team (no rule matched, and the source’s own routing or the fallback team took it), Flow selected (a rule or the source’s routing sent it to a flow), or Unrouted (nothing chose a destination).
Routing Decisions is on the plans that include interaction tracking (Professional and Enterprise). Owners, Admins and Supervisors can open it, and so can anyone with the Interaction Visibility permission set; see Routing Strategies: Routing decisions. Without it, the ticket’s team is the best clue: a ticket on the rule’s team was matched by the rule.
Worked Example: Sending Invoices to Billing
Mail to support@ is handled by the Support team, but anything about invoices sent to billing@ should go to Billing, and should be acknowledged.
- On Pattern Rules, set Fallback team to Support.
- Click Add Rule. Name it “Invoices”, and under Applies To choose All inbound email. Click Next.
- Under To addresses, add
billing@acmeoutdoors.com. Under Subject patterns, add*invoice*. Click Next. - Leave Direct to Team and choose Billing under Select Team. Switch on Auto-acknowledge matching emails and choose your acknowledgement template. Click Next.
- Check the review, click Create, then Done.
The worked example's "Invoices" row.
A message to billing@acmeoutdoors.com with the subject “Invoice 4411 overdue” matches and goes to Billing. A message to billing@acmeoutdoors.com about “Password reset” does not match, because both fields must match, so it goes to the source’s routing or to Support.
Permissions and Plan Availability
- Opening the Email page needs Email Connections View. Owners and Admins have it.
- Seeing the rules needs Email View or Edit; creating, editing and deleting them needs Email Edit. Owners and Admins have both. To give them to a Supervisor or User, add the built-in Email Administrator permission set, which also lets them connect mailboxes and set up forwarding. See Permissions.
- The fallback team is a channel routing setting: seeing it needs Channel Routing View, and setting, changing or removing it needs Create, Edit or Delete. Owners and Admins have them; the Routing Administrator permission set grants them. Email Administrator alone does not.
- Routing Decisions, for checking where an email went, needs Routing Decisions View: Owners, Admins and Supervisors have it, and the Interaction Visibility permission set grants it.
- Plans: rules with Direct to Team, auto-acknowledgements and the fallback team are on every plan. Through Flow needs the flow builder and advanced routing, which Professional and Enterprise include; on Starter, Create refuses a flow rule, and the edit dialog shows Through Flow greyed out with “The flow builder isn’t in your plan — upgrade to enable it.” Routing Decisions is on Professional and Enterprise.
- Limits: there is no limit on the number of rules, and rules do not use your plan’s channel connections. Acknowledgement templates count toward your email template limit; see Email Templates: Plan Limits.
Troubleshooting
| What you see | Likely cause | What to do |
|---|---|---|
| Email lands on the wrong team | Another rule with a lower priority number matched first, or no rule matched and the source’s routing or the fallback team took it | Open the ticket on Routing Decisions and read Matched rule and Addresses considered; then change the priorities or the patterns (see How a Rule Is Chosen). |
| A rule never matches | The rule is Inactive; a subject entry has no * and so must equal the whole subject; a CC entry is set and the email has no CC line; or the rule watches a different mailbox or forwarding address | See How Patterns Match. Use *word* to match a word anywhere in a subject. |
| A rule matches far more mail than intended | Every match field is empty, so the rule matches every new email from its source | Edit the rule and add at least one address or subject entry, or give it a high priority number so other rules are tried first. |
| A customer’s reply was not routed by the rules | Rules only route the first email of a conversation | That is expected: replies join the existing ticket. |
| Tickets from email have no team; the Pattern Rules tab warns “No fallback team is set” | No rule matched, the mailbox or forwarding address has no routing of its own, and there is no fallback team | Pick a Fallback team, or give the source its own routing. Move the waiting tickets from Unrouted Tickets. |
| Flow-routed tickets reach no team | A path of the flow ends without Route to Team, the flow is not published, or your plan no longer includes flows | Check the flow (see Conversation Flows) or switch the rule to Direct to Team. |
| Create fails on a Through Flow rule | Your plan does not include the flow builder and advanced routing | Use Direct to Team, or change plan (see Permissions and Plan Availability). |
| Create on the review step, or Save in the edit dialog, shows an error | A rule with the same name already exists for the same source, or an entry is longer than 255 characters, or the name longer than 100 | Choose another name or shorten the entry. |
| The sender gets no acknowledgement | The rule has no template (or Default template on a rule that never had one); the template was deleted or its body is empty; no connected mailbox can send; the email was a reply, or automatic mail such as an out-of-office; or Outbound delivery is set to Suppress | Open the rule with the pencil icon and pick a named template; check the Connections tab and General Settings. See Auto-acknowledgements. |
| The sender keeps getting an old acknowledgement after you switched the template off | Switching a template off does not stop rules that already use it | Choose another template on the rule, or switch off Auto-acknowledge matching emails. |
| New template in the wizard shows an error that begins “availableVariables: {{contact_name}} is not a template placeholder” | The guided template setup sends placeholder names the product no longer accepts | Close it, create the template with Add Template on the Templates tab, then pick it in the rule. |
| “The fallback team could not be saved. Try again.” | You lack the Channel Routing permissions, or the service was briefly unavailable | Ask an Owner or Admin, or try again. |
| A row shows Unknown source, Unknown Team or Unknown Flow | What the rule names was removed | Edit or delete the rule (see Editing, Switching Off and Deleting). |
| “Failed to load email routing rules. Please try again.” | You lack the Email permissions, or the service was briefly unavailable | Reload the page; if it persists, ask an Owner or Admin to check your permissions. |
| A team cannot be deleted | A rule, or the fallback team, sends it email | Point the rule or the fallback at another team first. |
FAQ
Two rules match the same message. Which one wins?
The one with the lower priority number. At equal priority, a rule for that specific mailbox or forwarding address wins over an All inbound email rule, and then the older rule wins.
Does a reply from the customer get routed again?
No. Rules are tried only for the first message of a conversation. Replies join the existing ticket.
Can I use regular expressions?
No. * is the only wildcard, and every other character is matched as written.
Why did a rule for support@ match mail sent to support+orders@?
Plus-tags are ignored when matching, so support+orders@example.com also counts as support@example.com.
Why did my CC rule not match?
CC entries are matched only against the CC line, and a rule with a CC entry never matches a message without one.
The rule matched but the sender got no acknowledgement. Why?
Check four things: that the rule names a template (open it with the pencil icon; Default template sends nothing on a rule that never had a template); that you have a connected mailbox that can send; that the message started a new conversation rather than replying to one; and that it was not automatic mail such as an out-of-office reply.
Related Topics
- Email Channel — connecting mailboxes and forwarding addresses.
- Email Templates — automatic acknowledgements and ready-made replies, with placeholders.
- Routing Strategies & Queues — how conversations reach people, step by step.
- Unrouted Tickets — tickets that reached no team, and how to fix their routing.
- Conversation Flows — building, testing and publishing a flow.
- Team Management — teams, users, roles and permission sets.