AI Features (Gemini)
The platform integrates Google's Gemini AI for ticket urgency analysis, text rewriting, and email parsing. These features help the team prioritize support tickets and improve communication quality.
Ticket Urgency Analysis
What It Does
When a support ticket arrives, the AI analyzes its content and provides:
- Urgency Score (0–100) — How urgent is this issue?
- Urgency Level — CRITICAL, HIGH, MEDIUM, or LOW
- Summary — Brief description of the issue
- Reasoning — Why it received this score
- Timeline — Suggested response timeframe
- Suggested Title — Improved ticket subject line
How It's Used
The osTicket system automatically sends new tickets to the Gemini endpoint. The urgency data is stored on the ticket and displayed to agents for prioritization.
Understanding Urgency Levels
| Level | Score | What It Means | Response Expected |
|---|---|---|---|
| 🔴 CRITICAL | 75–100 | Production site down, data loss, security breach | Within 1 hour |
| 🟠 HIGH | 50–74 | Major feature broken, significant impact | Same business day |
| 🟡 MEDIUM | 25–49 | Non-critical issue, limited impact | Within 2 business days |
| 🟢 LOW | 0–24 | Enhancement request, minor cosmetic | Scheduled maintenance |
Score Modifiers
The AI considers special factors:
| Factor | Effect |
|---|---|
| VIP client | +10 points |
| Workaround available | -15 points |
| Revenue impact mentioned | +20–30 points |
| Multiple users affected | +10–20 points |
| Security-related | +30–40 points |
Testing Urgency Analysis
From the Admin Dashboard
- Navigate to Suma Gemini → Test Tool
- Enter test ticket data:
- Subject line
- Body content
- Client name
- VIP flag
- Click Analyze
- View the full urgency response
Interpreting Results
Review the AI's reasoning to understand why it scored a ticket the way it did. If the scoring seems off:
- Check if the ticket content is clear about the impact
- VIP status adds 10 points regardless of content
- Vague tickets tend to score MEDIUM by default
Text Rewriting
What It Does
Rewrites text content to be clearer, more professional, or follow specific guidelines.
Use Cases
- Polishing ticket responses before sending to clients
- Cleaning up technical notes for non-technical audiences
- Reformatting documentation drafts
Using the Rewriter
- Navigate to the rewrite tool in the admin
- Paste the original text
- Optionally provide instructions (e.g., "Make more concise" or "Simplify for a non-technical reader")
- Click Rewrite
- Review and copy the improved text
Email Reply Parsing
What It Does
Extracts just the latest reply from a full email thread, stripping:
- Quoted previous messages
- Email signatures
- Forwarding headers
- Auto-generated disclaimers
Why It's Needed
Email clients format replies differently:
- Gmail adds
>prefixes to quoted text - Outlook uses
From: ... Sent: ...separators - Mobile clients have inconsistent formatting
- Corporate disclaimers bloat the content
The AI reliably isolates just the new content regardless of format.
Settings Overview
Accessing Settings
Navigate to WP Admin → Suma Gemini for all AI settings.
Available Settings
| Setting | Description | Default |
|---|---|---|
| API Key | Google Gemini API key | — |
| Security Key | Key for external API access | — |
| Default Model | Model for general tasks | gemini-2.5-flash |
| Urgency Model | Model for ticket analysis | gemini-2.5-flash |
| Rate Limit | Max requests per minute | 60 |
| Cache TTL | How long to cache responses | 1 hour |
Changing Models
If response quality needs adjustment:
gemini-2.5-pro— Slower but more capable for complex analysisgemini-2.5-flash— Fast and good for most tasks (recommended)- Older models available as fallbacks
Clearing the Cache
AI responses are cached to avoid redundant API calls. Clear the cache when:
- You've changed the AI model and want fresh results
- A ticket was re-analyzed with new content
- Testing with different prompts
How to Clear
- Navigate to Suma Gemini → Settings
- Click Clear Cache
- All cached urgency results and rewrites are purged
Clearing cache doesn't affect stored urgency scores on existing tickets. It only affects future analyses.
Rate Limiting
The system limits API calls to prevent excessive costs:
- Default: 60 requests per 60 seconds
- Applies per IP address
- If rate limited, requests return a 429 error
- Normal usage rarely hits this limit
When You Might Hit Rate Limits
- Bulk re-analyzing many tickets simultaneously
- Running load tests against the API
- Multiple systems calling the endpoint concurrently
What to Do
Wait 60 seconds and try again. The limit resets automatically.
Troubleshooting
"AI analysis failed" on a Ticket
- Check that the Gemini API key is valid in settings
- Verify Google hasn't suspended the API key (quota exceeded)
- Check
wp-content/debug.logfor specific error messages - The system retries 3 times with exponential backoff — if all fail, the error surfaces
Inconsistent Urgency Scores
AI scoring can vary slightly between identical requests due to model randomness. This is normal:
- Scores may fluctuate ±5 points between identical analyses
- The level (CRITICAL/HIGH/MEDIUM/LOW) should remain consistent
- If wildly different, check that the model hasn't been changed
Slow Responses
- Normal response time: 2–5 seconds
- If consistently slow (>10s), check:
- Network connectivity to Google's API
- Whether the model is overloaded (try a different one)
- Rate limiting may be causing queuing