docs: refresh database skill — timezone (UTC), full picklist tables, updated row counts
This commit is contained in:
parent
7ce06803dc
commit
eea66de129
1 changed files with 144 additions and 39 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
- **Database:** `pulse_autotask`
|
- **Database:** `pulse_autotask`
|
||||||
- **User:** `pulse_user`
|
- **User:** `pulse_user`
|
||||||
- **Read-only queries only** — no INSERT/UPDATE/DELETE
|
- **Read-only queries only** — no INSERT/UPDATE/DELETE
|
||||||
|
- **Timezone:** PostgreSQL server runs in **UTC**. All `timestamp without time zone` columns are UTC. Convert to ET with `AT TIME ZONE 'America/New_York'`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -15,15 +16,15 @@
|
||||||
|
|
||||||
| Domain | Key Tables | Approx Rows | Description |
|
| Domain | Key Tables | Approx Rows | Description |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| **Autotask PSA** | tickets, time_entries, companies, contacts, resources, configuration_items, contracts, projects, tasks, ticket_notes | 152K tickets, 155K time entries, 7K CIs | Service desk, billing, contracts, clients |
|
| **Autotask PSA** | tickets, time_entries, companies, contacts, resources, configuration_items, contracts, projects, tasks, ticket_notes | 152K tickets, 156K time entries, 7K CIs | Service desk, billing, contracts, clients |
|
||||||
| **Datto RMM** | datto_rmm_alerts, datto_rmm_devices, datto_rmm_sites | 20.7K alerts, 3.6K devices | Remote monitoring & management |
|
| **Datto RMM** | datto_rmm_alerts, datto_rmm_devices, datto_rmm_sites | 21K alerts, 3.6K devices | Remote monitoring & management |
|
||||||
| **SentinelOne** | s1_agents, s1_threats, s1_sites | 2.8K agents, 4.1K threats | Endpoint security |
|
| **SentinelOne** | s1_agents, s1_threats, s1_sites | 2.8K agents, 4.1K threats | Endpoint security |
|
||||||
| **Veeam** | veeam_organizations, veeam_backup_jobs, veeam_backup_agents, veeam_alarms, veeam_protected_workloads, veeam_repositories, veeam_backup_servers | ~2.5K total | Backup & disaster recovery |
|
| **Veeam** | veeam_organizations, veeam_backup_jobs, veeam_backup_agents, veeam_alarms, veeam_protected_workloads, veeam_repositories, veeam_backup_servers | ~2.5K total | Backup & disaster recovery |
|
||||||
| **IT Glue** | itg_organizations, itg_configurations, itg_passwords, itg_flexible_assets, itg_contacts, itg_documents, itg_expirations, itg_domains, itg_locations | 14.7K configs, 7.1K contacts | IT documentation |
|
| **IT Glue** | itg_organizations, itg_configurations, itg_passwords, itg_flexible_assets, itg_contacts, itg_documents, itg_expirations, itg_domains, itg_locations | 14.7K configs | IT documentation |
|
||||||
| **Microsoft 365** | graph_users, teams_meetings, teams_meeting_attendees, engagement_snapshots | 14.4K meetings | Teams meetings, activity reports |
|
| **Microsoft 365** | graph_users, teams_meetings, teams_meeting_attendees, engagement_snapshots | 14.4K meetings | Teams meetings, activity reports |
|
||||||
| **Zoom** | zoom_users, zoom_meetings, zoom_meeting_participants, zoom_calls | 2.8K calls, meetings | Zoom calls and meetings |
|
| **Zoom** | zoom_users, zoom_meetings, zoom_meeting_participants, zoom_calls | 2.8K calls | Zoom calls and meetings |
|
||||||
| **QuickBooks Online** | qbo_invoices, qbo_payments, qbo_deposits, qbo_transactions, qbo_reports | 6.9K invoices, 12.1K txns | Accounting — invoices, payments, deposits, financial reports |
|
| **QuickBooks Online** | qbo_invoices, qbo_payments, qbo_deposits, qbo_transactions, qbo_reports | 6.9K invoices, 12.1K txns | Accounting — invoices, payments, deposits, financial reports |
|
||||||
| **Zabbix NMS** | zabbix_events, zabbix_wan_hosts | 228 events, 75 hosts | Network monitoring — WAN hosts, alert events |
|
| **Zabbix NMS** | zabbix_events, zabbix_wan_hosts | 231 events, 75 hosts | Network monitoring — WAN hosts, alert events |
|
||||||
| **Billing** | billing_items | 96K items | Invoice line items tied to tickets/projects/tasks |
|
| **Billing** | billing_items | 96K items | Invoice line items tied to tickets/projects/tasks |
|
||||||
| **Authentication** | "user", session, account, verification, two_factor | 3 users | Better Auth — Entra ID SSO, RBAC, sessions |
|
| **Authentication** | "user", session, account, verification, two_factor | 3 users | Better Auth — Entra ID SSO, RBAC, sessions |
|
||||||
|
|
||||||
|
|
@ -33,6 +34,8 @@
|
||||||
|
|
||||||
### tickets (~152K rows, 68 columns)
|
### tickets (~152K rows, 68 columns)
|
||||||
|
|
||||||
|
> **Timezone note:** `create_date`, `due_date_time`, `completed_date`, `resolved_date_time`, `first_response_date_time`, `last_activity_date` are all `timestamp without time zone` stored in **UTC**. To display in ET: `create_date AT TIME ZONE 'America/New_York'`.
|
||||||
|
|
||||||
The central table. Each row is a service ticket.
|
The central table. Each row is a service ticket.
|
||||||
|
|
||||||
**Key columns:**
|
**Key columns:**
|
||||||
|
|
@ -62,27 +65,27 @@ The central table. Each row is a service ticket.
|
||||||
- `is_deleted` (boolean) — soft delete flag
|
- `is_deleted` (boolean) — soft delete flag
|
||||||
|
|
||||||
**Source codes (tickets.source):**
|
**Source codes (tickets.source):**
|
||||||
| Value | Meaning | Count |
|
| Value | Meaning |
|
||||||
|---|---|---|
|
|---|---|
|
||||||
| 8 | Monitoring Alert (RMM/Datto) | 80,736 |
|
| 8 | Monitoring Alert (RMM/Datto) |
|
||||||
| 4 | Email | 14,872 |
|
| 4 | Email |
|
||||||
| 21 | Portal | 2,500 |
|
| 21 | Portal |
|
||||||
| 2 | Phone/Voice | 1,781 |
|
| 2 | Phone/Voice |
|
||||||
| -1 | Insourced | 1,092 |
|
| -1 | Insourced |
|
||||||
| -2 | Outsourced | 1,088 |
|
| -2 | Outsourced |
|
||||||
| 35 | Phish Alert | 726 |
|
| 35 | Phish Alert |
|
||||||
| 6 | API | 488 |
|
| 6 | API |
|
||||||
| 17 | Internal Alert | 453 |
|
| 17 | Internal Alert |
|
||||||
|
|
||||||
**Ticket types:**
|
**Ticket types (tickets.ticket_type):**
|
||||||
| Value | Meaning | Count |
|
| Value | Meaning |
|
||||||
|---|---|---|
|
|---|---|
|
||||||
| 1 | Incident | 8,409 |
|
| 1 | Incident |
|
||||||
| 2 | Service Request | 3,217 |
|
| 2 | Service Request |
|
||||||
| 5 | Alert | 29,885 |
|
| 5 | Alert |
|
||||||
| NULL | Unclassified | 67,737 |
|
| NULL | Unclassified |
|
||||||
|
|
||||||
### companies (~241 rows, 41 columns)
|
### companies (~246 rows, 41 columns)
|
||||||
|
|
||||||
Client/customer organizations.
|
Client/customer organizations.
|
||||||
|
|
||||||
|
|
@ -225,52 +228,154 @@ These map integer codes to human-readable labels. Join on `value`.
|
||||||
|
|
||||||
### statuses (ticket statuses)
|
### statuses (ticket statuses)
|
||||||
|
|
||||||
|
Join: `statuses.value = tickets.status`
|
||||||
|
|
||||||
| Value | Label |
|
| Value | Label |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 1 | New |
|
| 1 | New |
|
||||||
| 5 | Complete |
|
| 5 | Complete |
|
||||||
| 7 | Waiting Customer |
|
| 7 | Waiting Customer |
|
||||||
| 8 | In Progress |
|
| 8 | In Progress |
|
||||||
|
| 9 | Waiting Materials |
|
||||||
| 10 | Dispatched |
|
| 10 | Dispatched |
|
||||||
| 11 | Escalate |
|
| 11 | Escalate |
|
||||||
| 12 | Waiting Vendor |
|
| 12 | Waiting Vendor |
|
||||||
| 13 | Waiting Approval |
|
| 13 | Waiting Approval |
|
||||||
| 14 | Resource Assigned |
|
| 14 | Resource Assigned |
|
||||||
|
| 15 | Ready to Deploy |
|
||||||
| 16 | Reopened |
|
| 16 | Reopened |
|
||||||
|
| 17 | Info Req |
|
||||||
| 19 | End User Note Added |
|
| 19 | End User Note Added |
|
||||||
|
| 20 | Equipment Pulled |
|
||||||
|
| 21 | Waiting Verification |
|
||||||
| 25 | On Hold |
|
| 25 | On Hold |
|
||||||
|
| 27 | Resolution Plan |
|
||||||
|
| 30 | Service Call Scheduled |
|
||||||
|
| 37 | Client Non-Responsive |
|
||||||
|
| 45 | Pending Next Site Visit |
|
||||||
|
| 46 | Burn-in In Progress |
|
||||||
|
| 47 | Resource Requested |
|
||||||
| 48 | Escalate to MC |
|
| 48 | Escalate to MC |
|
||||||
|
| 51 | Reconcile Billing |
|
||||||
| 54 | Resolved \<CSAT Survey\> |
|
| 54 | Resolved \<CSAT Survey\> |
|
||||||
|
| 55 | Huddle Review |
|
||||||
|
| 56 | Tracking Shipment |
|
||||||
| 57 | Escalate to Wulf |
|
| 57 | Escalate to Wulf |
|
||||||
|
| 58 | Pre-Pick Order |
|
||||||
|
| 59 | Need to Order/Fulfill |
|
||||||
|
| 60 | Loading Customer Config |
|
||||||
|
| 61 | Escalate to CSM |
|
||||||
|
| 62 | Escalate to Customer HD |
|
||||||
|
| 64 | Waiting Trivium Employee |
|
||||||
|
| 65 | Waiting Procurement |
|
||||||
|
| 66 | Internal Note Added |
|
||||||
|
| 67 | Quote Delivered |
|
||||||
|
| 68 | Ready for Customer Config |
|
||||||
|
| 69 | Outsourced |
|
||||||
|
| 70 | Waiting Quote Acceptance |
|
||||||
|
| 71 | Waiting Project/Ticket |
|
||||||
|
|
||||||
### priorities
|
### priorities
|
||||||
|
|
||||||
|
Join: `priorities.value = tickets.priority`
|
||||||
|
|
||||||
| Value | Label |
|
| Value | Label |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 1 | Standard |
|
| 1 | Standard |
|
||||||
| 2 | Medium |
|
| 2 | Medium |
|
||||||
|
| 3 | Standard |
|
||||||
| 4 | Critical |
|
| 4 | Critical |
|
||||||
| 6 | High |
|
| 6 | High |
|
||||||
| 7 | Security Event |
|
| 7 | Security Event |
|
||||||
| 8 | Minor Service |
|
| 8 | Minor Service |
|
||||||
| 9 | Major Service |
|
| 9 | Major Service |
|
||||||
|
| 10 | Installation |
|
||||||
| 11 | Fast Track |
|
| 11 | Fast Track |
|
||||||
|
|
||||||
### queues (46 active)
|
### queues (46 active)
|
||||||
|
|
||||||
Major queues include:
|
Join: `queues.value = tickets.queue_id`
|
||||||
- `29682833` Level 1 Support
|
|
||||||
- `29682969` Level 2 Support
|
| Value | Label |
|
||||||
- `29703428` Level 3 Support
|
|---|---|
|
||||||
- `29749490` Client Success
|
| 5 | Client Triage |
|
||||||
- `8` Monitoring Alert
|
| 6 | Post Sale |
|
||||||
- `29832283` Operations Triage
|
| 8 | Monitoring Alert |
|
||||||
- `5` Client Triage
|
| 29682833 | Level 1 Support |
|
||||||
- `29853700` Deployment
|
| 29682969 | Level 2 Support |
|
||||||
- `29853698` Project Delivery
|
| 29703428 | Level 3 Support |
|
||||||
- `29853701` IT Operations
|
| 29749490 | Client Success |
|
||||||
- `29853699` Mission Control
|
| 29793481 | App-Care |
|
||||||
- Client-specific queues: TTG, LEC, PER, VCF, Premier Automation, TNT Pizza, Trivium Packaging, Glunt
|
| 29807035 | Alert II |
|
||||||
|
| 29807036 | Alert I |
|
||||||
|
| 29832283 | Operations Triage |
|
||||||
|
| 29853695 | Follow Up |
|
||||||
|
| 29853697 | Trivium Packaging - Help Desk |
|
||||||
|
| 29853698 | Project Delivery |
|
||||||
|
| 29853699 | Mission Control |
|
||||||
|
| 29853700 | Deployment |
|
||||||
|
| 29853701 | IT Operations |
|
||||||
|
| 29853702 | Recurring Tickets |
|
||||||
|
| 29853706 | Premier Automation Help Desk |
|
||||||
|
| 29853710 | TTG Help Desk |
|
||||||
|
| 29853714 | Glunt Help Desk |
|
||||||
|
| 29853719 | TNT Pizza Help Desk |
|
||||||
|
| 29853720 | TTG Machines |
|
||||||
|
| 29853721 | TTG NetOps |
|
||||||
|
| 29853723 | TTG Finance |
|
||||||
|
| 29853724 | TTG Safety |
|
||||||
|
| 29853726 | TTG Remote |
|
||||||
|
| 29853727 | Purchasing |
|
||||||
|
| 29853728 | TTG New User Access |
|
||||||
|
| 29853729 | TTG Term User Access |
|
||||||
|
| 29853731 | Trivium Packaging - MES |
|
||||||
|
| 29853738 | TTG Security |
|
||||||
|
| 29853740 | TTG Change Mgmt |
|
||||||
|
| 29853741 | Subcontractor |
|
||||||
|
| 29853750 | PER Service Desk |
|
||||||
|
| 29853751 | PER Network Operations Center |
|
||||||
|
| 29853752 | PER Security Operations Center |
|
||||||
|
| 29853753 | LEC Service Desk |
|
||||||
|
| 29853754 | LEC Network Operations Center |
|
||||||
|
| 29853755 | LEC Security Operations Center |
|
||||||
|
| 29853756 | VCF Service Desk |
|
||||||
|
| 29853757 | VCF Network Operations |
|
||||||
|
| 29853758 | VCF Security Operations Center |
|
||||||
|
| 29853766 | Sales |
|
||||||
|
| 29780304 | TaskFire |
|
||||||
|
| 29753333 | Waiting Verification |
|
||||||
|
|
||||||
|
### issue_types
|
||||||
|
|
||||||
|
Join: `issue_types.value = tickets.issue_type`
|
||||||
|
|
||||||
|
| Value | Label |
|
||||||
|
|---|---|
|
||||||
|
| 4 | Upgrade |
|
||||||
|
| 6 | New Install |
|
||||||
|
| 7 | Monitoring Alert |
|
||||||
|
| 10 | Break/Fix |
|
||||||
|
| 11 | Maintenance |
|
||||||
|
| 12 | Help Desk |
|
||||||
|
| 13 | Email |
|
||||||
|
| 14 | Vendor |
|
||||||
|
| 15 | User Education |
|
||||||
|
| 16 | Provision |
|
||||||
|
| 18 | Purchase |
|
||||||
|
| 19 | Deploy |
|
||||||
|
| 20 | Reactive |
|
||||||
|
| 21 | MAC |
|
||||||
|
| 22 | Centralized Services |
|
||||||
|
| 23 | NOC Services |
|
||||||
|
| 25 | Networking |
|
||||||
|
| 27 | WiFi |
|
||||||
|
| 28 | Client Success |
|
||||||
|
| 29 | Automation |
|
||||||
|
| 30 | Server |
|
||||||
|
| 31 | Hardware |
|
||||||
|
| 32 | LOB Software |
|
||||||
|
| 33 | Workstation |
|
||||||
|
| 36 | 24-Hour Emergency Support |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -647,7 +752,7 @@ WHERE ze.value = 1 ORDER BY ze.clock DESC;
|
||||||
|
|
||||||
3. **Configuration item names are NOT unique globally.** Names like "DT037" are a per-client naming convention. Always pair with `company_id`.
|
3. **Configuration item names are NOT unique globally.** Names like "DT037" are a per-client naming convention. Always pair with `company_id`.
|
||||||
|
|
||||||
4. **Timestamps:** Most Autotask timestamps are `timestamp without time zone` stored in UTC. Teams/Zoom timestamps are `timestamp with time zone`.
|
4. **Timestamps — all UTC:** The PostgreSQL server timezone is UTC. All `timestamp without time zone` columns (Autotask) are stored in UTC. `timestamp with time zone` columns (Teams, Zoom, QBO) are also UTC-normalized. To display in Eastern Time: `column AT TIME ZONE 'America/New_York'`. Example: `create_date AT TIME ZONE 'America/New_York'`.
|
||||||
|
|
||||||
5. **Monitor tickets:** `tickets.source = 8` indicates RMM-generated tickets. `monitor_id` links to the specific Datto RMM monitor. These represent ~74% of all tickets.
|
5. **Monitor tickets:** `tickets.source = 8` indicates RMM-generated tickets. `monitor_id` links to the specific Datto RMM monitor. These represent ~74% of all tickets.
|
||||||
|
|
||||||
|
|
@ -658,4 +763,4 @@ WHERE ze.value = 1 ORDER BY ze.clock DESC;
|
||||||
- Zoom/Teams → Contacts: `matched_contact_id` / `matched_company_id` columns
|
- Zoom/Teams → Contacts: `matched_contact_id` / `matched_company_id` columns
|
||||||
- Config Items → RMM: `configuration_items.reference_number` sometimes matches RMM device UIDs
|
- Config Items → RMM: `configuration_items.reference_number` sometimes matches RMM device UIDs
|
||||||
|
|
||||||
7. **Row counts** (as of March 2026): tickets 152K, time_entries 155K, billing_items 96K, ticket_notes 41K, teams_meetings 14.4K, itg_configurations 14.7K, configuration_items 7K, companies 241, contacts 4.2K, datto_rmm_devices 3.6K, datto_rmm_alerts 20.7K, s1_agents 2.8K, s1_threats 4.1K, zoom_calls 2.8K, qbo_invoices 6.9K, qbo_transactions 12.1K, qbo_payments 4.5K, qbo_deposits 1.8K, qbo_reports 36, zabbix_wan_hosts 75, zabbix_events 228.
|
7. **Row counts** (as of March 17, 2026): tickets 152K, time_entries 156K, billing_items 96K, ticket_notes 42K, teams_meetings 14.4K, itg_configurations 14.7K, configuration_items 7K, companies 246, contacts 4.2K, datto_rmm_devices 3.6K, datto_rmm_alerts 21K, s1_agents 2.8K, s1_threats 4.1K, zoom_calls 2.8K, qbo_invoices 6.9K, qbo_transactions 12.1K, qbo_payments 4.5K, qbo_deposits 1.8K, qbo_reports 36, zabbix_wan_hosts 75, zabbix_events 231.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue