Complete guide to the smart notification system for Nextcloud iTop integration.
The iTop integration provides two independent notification tracks to keep you informed about ticket updates:
- Portal Notifications (4 types) - For all users about their tickets
- Agent Notifications (8 types) - For IT agents about assignments, SLA warnings, and team work
✅ Smart Detection - Event-time based detection using iTop's change tracking (no duplicate notifications)
✅ Minimal State - Only timestamps stored, no per-ticket state
✅ Weekend-Aware SLA - Friday gets 72h warning, Saturday gets 48h warning
✅ Escalating Alerts - SLA warnings at 24h → 12h → 4h → 1h before breach
✅ Granular Control - Master toggle + per-notification-type preferences
✅ Flexible Intervals - Admin configurable polling (5 minutes to 24 hours)
These notifications keep you updated about tickets you created or are involved with:
| Notification | When You Get It | Example |
|---|---|---|
| Ticket Status Changed | Status changes (new→assigned, assigned→pending, etc.) | "Ticket R-000123: Status changed - new → assigned" |
| Agent Responded | Agent adds a public comment | "Agent responded to your ticket - John Doe added a response" |
| Ticket Resolved | Your ticket is marked as resolved | "Ticket resolved - Your ticket has been resolved" |
| Assigned Agent Changed | Agent assignment changes | "Assigned agent changed - John Doe → Jane Smith" |
If you're an IT agent, you receive additional notifications about your workload:
| Notification | When You Get It | Example |
|---|---|---|
| Ticket Assigned | A new ticket is assigned to you | "Ticket assigned to you - A new ticket has been assigned to you" |
| Ticket Reassigned | A ticket is reassigned from another agent to you | "Ticket reassigned to you - A ticket has been reassigned to you" |
| Team Unassigned New | New ticket appears in your team's queue (no agent yet) | "New unassigned ticket in Help Desk - A new ticket needs assignment in Help Desk" |
| TTO SLA Warning | Team ticket approaching Time To Own deadline | "⏰ TTO SLA warning: 24h remaining - Ticket needs assignment within 24 hours" |
| TTR SLA Warning | Your ticket approaching Time To Resolve deadline | "🔴 TTR SLA warning: 1h remaining - Ticket needs resolution within 1 hour" |
| SLA Breach | SLA deadline exceeded | "🚨 TTO SLA breached - Ticket has breached TTO SLA deadline" |
| Priority Critical | Ticket priority escalated to critical | "🔴 Ticket escalated to CRITICAL - Ticket priority changed to critical" |
| New Comment | Someone adds a comment (public or private) to your ticket | "New comment on your ticket - Jane Doe added a comment" |
- Go to Personal Settings → iTop Integration
- Enable Notifications - Toggle the master switch
- Choose Check Interval - How often to check for updates (default: 15 minutes)
- Select Notification Types - Check/uncheck specific notification types
- Save - Your preferences are saved automatically
- Portal Notifications OFF - You won't receive any notifications about your tickets
- Agent Notifications OFF - You won't receive any agent-specific notifications (if you're an agent)
- Individual notification types can be enabled/disabled when master toggle is ON
SLA warnings use escalating urgency levels:
- ⏰ 24 hours - Early warning (or 72h on Friday, 48h on Saturday)
⚠️ 12 hours - Increased urgency- 🟠 4 hours - High urgency
- 🔴 1 hour - Critical - immediate action needed
Weekend-Aware Logic:
- Friday: Get 72-hour warning (catches Monday/Tuesday breaches)
- Saturday: Get 48-hour warning (catches Sunday/Monday breaches)
- Other days: Standard 24/12/4/1 hour warnings
You'll only get one notification per ticket at the most urgent level since your last check.
-
Configure iTop Connection
- Go to Admin Settings → iTop Integration
- Set iTop instance URL
- Configure application token (admin-level access)
-
Set Default Interval
- Default check interval for all users (5-1440 minutes)
- Recommended: 15 minutes
- Users can customize their own interval
-
Configure Notification Types
- Choose which notification types are available to users
- Three states: Disabled, Forced, User Choice
Each notification type can be configured with one of three states:
| State | Icon | Behavior | User Control |
|---|---|---|---|
| Disabled | 🚫 | Not available, never sent | Hidden from users |
| Forced | ✓ | Always enabled, mandatory | Cannot be disabled by users |
| User Choice | ⚙️ | Enabled by default | Users can opt-out |
Portal Notifications:
- Ticket Status Changed: User Choice
- Agent Responded: User Choice
- Ticket Resolved: User Choice
- Assigned Agent Changed: User Choice
Agent Notifications:
- Ticket Assigned: User Choice
- Ticket Reassigned: User Choice
- Team Unassigned New: User Choice
- TTO SLA Warning: User Choice
- TTR SLA Warning: User Choice
- SLA Breach: Forced (mandatory, cannot be disabled)
- Priority Critical: Forced (mandatory, cannot be disabled)
- Comment: User Choice
The notification system uses two background jobs that run automatically every 5 minutes:
- CheckPortalTicketUpdates - Processes portal notifications
- CheckAgentTicketUpdates - Processes agent notifications
Background jobs are automatically registered and will start processing with the next cron run after app installation.
Each user checks for notifications based on their configured interval (or admin default). If a user sets a 60-minute interval, they're only processed once per hour, reducing API load.
The system automatically skips unnecessary API calls:
- If all notification types are disabled for a user, no queries are made
- If specific types are disabled, related queries are skipped
- Portal-only users are automatically skipped for agent notifications
- Max 20 notifications per user per run - Prevents spam
- Exceeding users get their 20 most recent/urgent notifications
Check background job logs:
# View recent notification job completions
tail -100 /var/nextcloud-data/nextcloud.log | grep "notification check completed"
# Test specific user
occ itop:notifications:test-user username --portal
occ itop:notifications:test-user username --agentCheck user configuration:
occ itop:notifications:test-user username --portalCommon issues:
- ❌ Notifications disabled - Master toggle is OFF
- ❌ No person_id - User hasn't configured their iTop personal token
- ❌ Portal-only user - Won't receive agent notifications
- ❌ All types disabled - User opted out of all notification types
- ❌ Interval not elapsed - Check when next run is scheduled
Check background jobs:
# List jobs
occ background-job:list | grep itop
# Check if jobs are running
tail -50 /var/nextcloud-data/nextcloud.log | grep "notification check completed"The system prevents duplicates through:
- Unique object keys - Each notification has unique identifier (ticket_id|subject|timestamp_hash)
- Timestamp filtering - Only changes since last check are processed
- SLA crossing-time algorithm - Only most urgent threshold notified
If you see duplicates:
- Check if multiple users have the same
person_idconfigured - Verify background jobs aren't manually triggered during normal operation
- Check iTop server time is synchronized
For specific event types:
-
Status Changes Not Detected
- Verify
ticket_status_changedis enabled - Check if status actually changed in iTop (CMDBChangeOp records)
- Verify
-
Comments Not Notified
- Public comments only for portal users
- Both public and private for agents
- System-generated comments are filtered out
-
SLA Warnings Not Received
- Verify ticket has
tto_escalation_deadlineorttr_escalation_deadlineset - Check if threshold was already crossed before last check
- Weekend-aware: Friday/Saturday thresholds are expanded
- Verify ticket has
-
Team Tickets Not Notified
- Verify user is member of the team (
lnkPersonToTeam) - Check if ticket's
team_idchanged since last check - Verify ticket is still unassigned (
agent_id = NULL)
- Verify user is member of the team (
To force notifications to check last 30 days of changes:
occ itop:notifications:test-user username --resetQ: How often are notifications checked?
A: Every user has their own interval (5-1440 minutes, default 15 minutes). Background jobs run every 5 minutes but only process users whose interval has elapsed.
Q: Can I disable specific notification types?
A: Yes, unless the administrator has marked them as "Forced". Check your personal settings to see available options.
Q: Will I get notified about my own comments?
A: No, the system filters out self-notifications to prevent spam.
Q: What happens if I miss notifications during downtime?
A: Next check will include all changes since last successful check (up to 30 days back on first run).
Q: Do portal users receive agent notifications?
A: No, users marked as is_portal_only only receive portal notifications about their own tickets.
Q: How are SLA warnings calculated?
A: Using a "crossing-time" algorithm: For each threshold (24h, 12h, 4h, 1h), calculate when it will be crossed. If that time falls between your last check and now, you get notified.
Q: Why do I get 72-hour warnings on Friday?
A: Weekend-aware logic expands the 24-hour threshold to catch Monday/Tuesday breaches so you can take action before the weekend.
Q: Can I change my check interval?
A: Yes, in Personal Settings → iTop Integration → Notification Check Interval (5-1440 minutes).
Q: What's the difference between TTO and TTR?
A:
- TTO (Time To Own): Deadline for assigning an agent to the ticket
- TTR (Time To Resolve): Deadline for resolving the ticket
Q: Why are some notifications marked as "Forced"?
A: Critical notifications (SLA breaches, priority escalations) are often forced by administrators to ensure important issues aren't missed.
- Dual Background Jobs: Portal and Agent jobs run independently every 5 minutes
- CMDBChangeOp Detection: Leverages iTop's built-in change tracking
- Minimal State: Only stores last check timestamps per user
- Weekend-Aware SLA: Dynamic threshold calculation based on day of week
- Query Optimization: Skips unnecessary API calls based on user preferences
Per-User Settings (oc_preferences):
notification_enabled- Master toggle (0/1)notification_check_interval- Custom interval in minutesnotification_last_portal_check- Unix timestampnotification_last_agent_check- Unix timestampdisabled_portal_notifications- JSON array or "all"disabled_agent_notifications- JSON array or "all"
App Configuration (oc_appconfig):
default_notification_interval- Default interval for all usersportal_notification_config- JSON map of type → stateagent_notification_config- JSON map of type → state
Portal Notifications:
CMDBChangeOpSetAttributeScalar- Status, agent_id changesCMDBChangeOpSetAttributeCaseLog- Public log entries
Agent Notifications:
CMDBChangeOpSetAttributeScalar- agent_id, team_id, priority, SLA flagsCMDBChangeOpSetAttributeCaseLog- Public and private log entries- Ticket queries for SLA deadline calculations
- Data Isolation: All queries filtered by user's person_id
- Application Token: Admin-level token for API access (encrypted storage)
- No User Credentials: Personal tokens used once for verification, then discarded
- Rate Limiting: Max 20 notifications per user per run
- Self-Notification Filtering: User's own changes excluded
For issues or questions:
- Check this guide's Troubleshooting section
- Test with OCC commands to diagnose issues
- Check Nextcloud logs for error messages
- Review iTop CMDBChangeOp records to verify change tracking
- Open an issue on GitHub: https://github.com/lexioj/integration_itop/issues