Create a detection rule
Build a working detection rule from scratch. By the end you’ll have an Order Number rule that picks ORD-123456 (and similar) out of inbound messages and writes the value to a conversation custom field.
Before you start
- Admin permissions on Sidekick settings
- The destination custom field exists. For order numbers, this is typically a Text field on Conversations
- Sample messages where the data appears (so you can test)
Steps — pattern builder method
- Open Settings → Sidekick → Detection rules.
- Click New rule.
- Fill in the basics:
Name — descriptive (e.g.Order Number — ORD prefix)
Description — optional context for future maintainers
Detection method —Pattern builder - Configure the pattern:
Prefix —ORD-
Allowed characters — digits only
Min length — 6 (for123456)
Max length — 10 (allows up toORD-1234567890)
Suffix — leave empty - Map to custom field:
Target entity —Conversation
Target field —order_number(or whatever the field’s key is)
Skip if field already set — toggle on so manually-entered values aren’t overwritten - Test the pattern. Atender provides a built-in test tool — paste sample text and verify what the rule matches. For example:
Hi, I have a question about ORD-987654, can you help?→ should matchORD-987654My account is ACC-12345→ should NOT match (different prefix) - Set priority. Default priority is fine for most rules. Higher priority wins when multiple rules could match the same text.
- Save and enable.
Verify it worked
Send a test inbound message containing the pattern:
Hi, I’d like to check on order ORD-987654. Has it shipped yet?
Within a few seconds, open the resulting conversation:
- The text
ORD-987654should be highlighted inline (if inline highlights are on) - The conversation’s
order_numbercustom field should be populated withORD-987654 - If the value’s confidence is below the global threshold, it’ll be flagged for agent review instead of auto-saved
Other detection methods
This walkthrough used Pattern builder. The other two methods are configured similarly:
- AI detection — instead of prefix/suffix/length, you write a plain-language description (“the customer’s affected product”). LLM cost per detection. Best for fuzzy data.
- RegExp — you provide the raw regex (
\bORD-\d{6,}\b). Best when pattern builder isn’t expressive enough or when you’re porting an existing regex.
See the detection rule types reference for picking which.
Common gotchas
- Rule doesn’t match anything — Pattern is too strict (length wrong, charset wrong) — Use the test tool — paste sample text and adjust until it matches
- Rule matches too much — Pattern is too loose (e.g. matching numbers anywhere in text) — Tighten — add prefix, increase min length, narrow charset
- Rule matches but custom field stays empty — Mapping not set, or
Skip if field already setis on and the field has data — Check the mapping; clear the field manually and re-test - Rule fires on agent replies too — Detection runs on all messages by default — Use rule conditions (if available in your version) to scope to inbound only
Where this rule shows up afterwards
Once enabled, the rule runs on every new message:
- Detected values are visible in the Insights panel module (when enabled)
- Mapped custom fields populate automatically (when above confidence threshold)
- Below-threshold matches show amber for agent review
- Stats appear in Sidekick analytics — see how many messages matched, success rate, false-positive flags