# Accounting Run Runbooks

Operational reference for monitoring, troubleshooting, and recovering from issues during accounting runs.

## Documents

| Document | When to Use |
|----------|-------------|
| [Monitoring](monitoring.md) | During a run — what to watch, what dashboards to check, what alerts mean |
| [Troubleshooting](troubleshooting.md) | Something went wrong — diagnose and fix common failures |
| [Environment Refresh](environment-refresh.md) | Need to reset QA/dev/UAT from prod |

## On-Call Quick Reference

### Escalation Path

| Step | Channel / Contact |
|------|-------------------|
| **First** | `#accounting-tech` — post the issue, tag the on-call engineer |
| **PagerDuty** | `accounting-email.ulwvrgqs@theorchard.pagerduty.com` |
| **Run-specific** | `#accounting-run-priv` — for blockers during an active production run |
| **Calculation questions** | `#accounting-calc` — data packages, checksums, calculation issues |
| **Customer Accounting** | `#cust-acc-support` or `#abacus-x-ca` |

### Weekly On-Call Handoff

The on-call engineer hands off each Wednesday. The handoff checklist lives in [`abacus-docs/operations/oncall-handoff.md`](../../operations/oncall-handoff.md) and includes:

- Pain scale, page count, P1 tickets handled/open
- Dashboard reviews (see [Monitoring](monitoring.md))
- Open campaigns, pipeline health
- Operational improvements made during the week

### Key Links (Bookmarks for On-Call)

| Resource | URL |
|----------|-----|
| **Abacus (Prod)** | https://abacus.theorchard.com/accounting-periods |
| **Abacus (QA)** | https://abacus.qaorch.com/accounting-periods |
| **Customer Accounting (Prod)** | https://accounting.theorchard.com/ |
| **Airflow (Prod)** | AWS Console → MWAA → `prod-abacus-airflow` → Airflow UI |
| **Airflow (QA)** | AWS Console → MWAA → `qa-abacus-airflow` → Airflow UI |
| **Jenkins Scheduler** | https://scheduler.theorchard.io/ |
| **Jenkins Pipelines** | https://pipeline.theorchard.io/ |
| **PagerDuty Alerts** | https://theorchard.pagerduty.com/alerts |
| **Jira Support Queue** | [ACC Board — P1/P2 filter](https://theorchard.atlassian.net/issues?filter=23908) |
| **Health Dashboard (Datadog)** | [Abacus Health & Performance](https://sonymusic-pde.datadoghq.com/dashboard/zcg-zpw-r9z/abacus-health--performance-dashboard) |
| **RDS Dashboard (Datadog)** | [prod-art-relations Timeboard](https://app.datadoghq.com/dashboard/czh-59d-w7i/prod-art-relations-rds-timeboard) |
| **Business Dashboard (Sigma)** | [Abacus Executive Dashboard](https://app.sigmacomputing.com/sony-music-entertainment/workbook/Abacus-Executive-Dashboard-6x1niJrHQxOB6UqHpGOBDm) |
| **SAP Contract Syncs (Snowflake)** | https://app.snowflake.com/sme/orchard/w27SZHF1Q3RW |
| **Adjustment Files (Snowflake)** | https://app.snowflake.com/sme/orchard/#/abacus-adjustments-d3Oud3J7B |
