What are Escalation Rules?
Escalation rules identify situations where human judgment is needed:- Customer is upset or threatening
- Question involves legal, compliance, or security
- Issue is too complex for automation
- Customer explicitly requests a human
- VIP or high-value customer needs attention
Creating Escalation Rules
1
Navigate to Guardrails
Go to Train → Guardrails and select the Escalation Rules tab.
2
Click Create Rule
Click Create Escalation Rule.
3
Name Your Rule
Give it a descriptive name:
- Good: “Angry Customer Escalation”, “Legal Question Detection”
- Avoid: “Rule 1”, “Escalation”
4
Define Trigger
Configure what causes this rule to trigger.
5
Configure Response
Define what happens when triggered:
- Message to send to customer
- Internal note content
- Routing rules
6
Test
Use the built-in playground to verify detection.
7
Save
Save and activate the rule.
Detection Methods
AI-Based Detection
Use natural language to describe when to escalate: Example prompts:- Handles nuanced situations
- Adapts to context
- No need to predict every phrase
Keyword Detection
Trigger on specific words or phrases: Example keywords:- Fast and predictable
- Easy to understand and audit
- Good for specific trigger words
Regex Detection
Match complex patterns: Example patterns:- Precise pattern matching
- Good for structured data
- Catches variations
Combining Methods
Use multiple detection methods together:Configuring Escalation Response
Customer Message
What the agent sends to the customer when escalating: Example:Internal Note
Context for the human agent:Routing (if applicable)
Where to route the escalated conversation:- Specific team or queue
- Priority level
- Assignment rules
Example Escalation Rules
Angry Customer
| Setting | Value |
|---|---|
| Name | Angry Customer Escalation |
| Detection | AI-based |
| Prompt | Escalate when customer expresses significant frustration, anger, or threatens to leave |
| Message | ”I can see this has been frustrating. Let me connect you with someone who can help resolve this.” |
Legal Questions
| Setting | Value |
|---|---|
| Name | Legal Question Detection |
| Detection | Keyword + AI |
| Keywords | lawyer, attorney, lawsuit, legal, contract dispute |
| Prompt | Escalate questions about legal matters, liability, or contract terms |
| Message | ”For legal matters, I’ll connect you with someone who can properly assist.” |
VIP Customer
| Setting | Value |
|---|---|
| Name | VIP Customer Handling |
| Detection | Attribute-based |
| Condition | Customer tier = “Enterprise” |
| Message | ”Thank you for being a valued customer. I’m connecting you with your dedicated support contact.” |
Human Request
| Setting | Value |
|---|---|
| Name | Explicit Human Request |
| Detection | Keyword |
| Keywords | speak to human, talk to person, real person, human agent, live agent |
| Message | ”Of course! I’m connecting you with a member of our team now.” |
Testing Escalation Rules
Use the built-in playground:- Open the escalation rule
- Enter test messages
- See if the rule triggers
- Adjust detection criteria as needed
- Messages that should clearly trigger
- Messages that should clearly not trigger
- Edge cases and borderline situations
Assigning to Agents
1
Open Agent Configuration
Go to Build → Agents and click on an agent.
2
Go to Guardrails Tab
Select the Guardrails tab.
3
Select Escalation Rules
Check the rules that should apply to this agent.
4
Save
Save the agent configuration.
Best Practices
- Test thoroughly before activating
- Start broader, then refine — better to escalate too much initially
- Review regularly — analyze which rules trigger most
- Balance sensitivity — too sensitive = too many escalations
- Provide context — good internal notes help human agents