DocsFeature guides

Matching rules

Control how answer text is attributed to you and your competitors — competitor aliases, safe custom patterns, per-brand chart colors, and a re-scan that applies new rules to your collected history.

Matching rules control how the words in an AI answer get credited to you and your competitors. When an engine calls your brand by a nickname, a product name, or a misspelling, a rule teaches MentionFlow that those all mean you — and a re-scan can apply the new rule to answers you have already collected. It lives at Matching rules.

What it does

The page has four tools:

  • Competitor aliases — extra names for each competitor, so a mention under any of them is counted correctly.
  • Custom patterns — an advanced rule for names that aliases can't express, like spelling variants or glued-together product names.
  • Chart colors — the fixed color each brand keeps across every chart and table.
  • Apply rules to history — re-run your current rules over already-collected answers.

Who it's for

  • Anyone whose brand or competitors get called several things by AI assistants — abbreviations, product lines, common misspellings.
  • Analysts who want their charts to read consistently, with each brand in a fixed, recognisable color.

Competitor aliases

An alias is an alternate name — a product name, shorthand, or misspelling — that should count as the same competitor. (Your own brand's aliases live on the Brand hub, not here.)

Try it:

  1. Open Matching rules and find the Competitor aliases card. (If you have no competitors yet, add them on the Competitors page first.)
  2. Edit a competitor row and type the alternate names, comma-separated — the field prompts you with "Product names, shorthand, misspellings — comma-separated".
  3. Save. From now on, a mention under any of those names is credited to that competitor.

Aliases are matched case-insensitively, capped at 20 per competitor and 2–60 characters each. An alias that collides with another tracked brand is refused — "one alias can't attribute to two competitors" — so a name can never credit two companies at once.

Custom patterns (advanced)

Some names aliases can't capture — a brand written with or without a space or hyphen ("Acme Cloud", "acme-cloud", "acmecloud"), for example. A custom pattern handles those. It is an advanced tool, so it comes with a built-in Test button and strong safety limits.

Two things are worth knowing:

  • A dot means a literal dot. Unlike normal pattern syntax, a . matches an actual full stop — handy for domains, so acme.io matches the text "acme.io" and not "acmeXio". Where you really do want "any character", use a character class like [a-z0-9].
  • Patterns run in guaranteed linear time. A safe subset is allowed (no lookarounds, backreferences, or quantified groups), so a rule can never slow collection down. Patterns are case-insensitive, 2–120 characters, and capped at 12 per brand.

Try it:

  1. In the Custom patterns (advanced) card, choose the brand or competitor the pattern should credit.
  2. Type the pattern (the field shows an example like acme[\s-]?cloud).
  3. Click Test — it checks the pattern against your 40 most recent answers and reports "Matched X of Y recent answers", with a few example snippets. It is explicit that this is a sample preview, not your full history.
  4. Click Add rule to save it.

A pattern that would also match a different tracked brand is refused, so one entity's rule can never steal another's mentions. If a pattern is too broad or too complex, the page tells you exactly what to fix.

Apply rules to history

New rules apply to future answers automatically. Re-scanning applies them to answers you have already collected, too — the same matcher, run backward over your history.

Try it:

  1. In the Apply rules to history card, click Re-scan history and confirm the dialog: "Re-scan collected answers with the current rules?"
  2. The re-scan re-runs name, alias, and pattern matching over your stored answers and updates mentions to match — new rules add mentions, removed aliases take theirs away.
  3. When it finishes you'll see a summary: how many answers were scanned, and how many mentions were added, removed, or confirmed.

A few honest details:

  • AI-scored sentiment is kept; newly found mentions start unscored (an em-dash, not neutral — see Sentiment). The re-scan never re-runs the language model.
  • Metrics recompute from the updated mentions, and the re-scan can't be undone.
  • It works newest answers first, and if it doesn't finish in one pass it remembers where it stopped — "Run again to continue from where this run stopped." Only one re-scan runs per brand at a time.

Chart colors

Give each brand a fixed color that follows it across every chart and table. Each row offers eight preset swatches plus a free color picker, and a Default button to clear an override. Custom colors are applied as-is in both light and dark mode, so mid-brightness colors read best.

How matching decides what counts

  • Your tracked name and its aliases are matched on word boundaries, case-insensitively, so a name inside a longer word doesn't falsely count.
  • Custom patterns are applied exactly as written, case-insensitively, through the safe matcher.
  • When several brands appear in one answer, each is credited at its earliest appearance, and mentions are numbered in the order they appear in the text.
  • Cross-attribution is blocked at the source: an alias or pattern that also matches any other tracked brand is refused when you add it, so rules can't misattribute mentions.
  • These matches feed the mention rows that drive your metrics — which is why adding an alias or pattern adds mentions, and a re-scan is what carries a rule change back over your history.

Limits

  • Editor rights and a live workspace are required; view-only members and the demo can't edit rules.
  • These are your workspace's rules only — they never touch the shared global brand registry.
  • Aliases: 20 per competitor. Custom patterns: 12 per brand. Re-scan: one at a time per brand.