IT Helpdesk application that manages support tickets, agents, and SLAs using SAP CAP framework.
- ✅ Create & manage support tickets with auto-generated ticket numbers (
TKT-2024-00001) - ✅ Track ticket lifecycle:
OPEN → IN_PROGRESS → RESOLVED → CLOSED - ✅ Priority levels:
LOW | MEDIUM | HIGH | CRITICAL - ✅ Automatic SLA due-date calculation based on category
- ✅ Assign agents, escalate, resolve, close and reopen tickets
- ✅ Comments system (public & internal notes)
- ✅ Full audit trail for every action
- ✅ Dashboard statistics
- ✅ Overdue ticket detection
| Layer | Technology |
|---|---|
| Backend Framework | SAP CAP (Cloud Application Programming Model) |
| Runtime | Node.js |
| Database (local) | SQLite (via @cap-js/sqlite) |
| API | OData V4 (auto-generated by CAP) |
| Testing | Jest + Supertest |
helpdesk-cap/
├── 📁 db/
│ ├── schema.cds ← Data model (entities, types, enums)
│ └── data/ ← CSV seed data for local dev
│ ├── helpdesk-Categories.csv
│ ├── helpdesk-Departments.csv
│ ├── helpdesk-Agents.csv
│ ├── helpdesk-Employees.csv
│ └── helpdesk-Tickets.csv
├── 📁 srv/
│ ├── helpdesk-service.cds ← Service definition (OData endpoints + actions)
│ └── helpdesk-service.js ← Business logic handlers (Node.js)
├── 📁 test/
│ └── helpdesk.test.js ← Jest test suite
├── package.json
├── .cdsrc.json
└── README.md
- Node.js 20+
- npm 9+
git clone https://github.com/RameshPrabakar/sap-btp-helpdesk-cap.git
cd sap-btp-helpdesk-capnpm installnpm run devThe API is now live at: http://localhost:4004
Open your browser and visit:
http://localhost:4004
You'll see all available endpoints:
/helpdesk→ Main helpdesk service/admin→ Admin management service
| Method | Endpoint | Description |
|---|---|---|
GET |
/helpdesk/Tickets |
List all tickets |
POST |
/helpdesk/Tickets |
Create new ticket |
GET |
/helpdesk/Tickets(:ID) |
Get single ticket |
PATCH |
/helpdesk/Tickets(:ID) |
Update ticket |
GET |
/helpdesk/Agents |
List active agents |
GET |
/helpdesk/Categories |
List categories |
GET |
/helpdesk/AuditLogs |
View audit trail |
| Method | Endpoint | Body | Description |
|---|---|---|---|
POST |
/helpdesk/assignAgent |
{ticketID, agentID, remarks} |
Assign agent to ticket |
POST |
/helpdesk/resolveTicket |
{ticketID, resolutionNote, agentName} |
Mark ticket as resolved |
POST |
/helpdesk/closeTicket |
{ticketID, agentName} |
Close a resolved ticket |
POST |
/helpdesk/escalateTicket |
{ticketID, reason, agentName} |
Escalate ticket priority |
POST |
/helpdesk/reopenTicket |
{ticketID, reason, agentName} |
Reopen resolved/closed ticket |
POST |
/helpdesk/changePriority |
{ticketID, priority, reason} |
Change priority |
| Method | Endpoint | Description |
|---|---|---|
GET |
/helpdesk/getDashboardStats() |
Get ticket statistics |
GET |
/helpdesk/getOverdueTickets() |
List overdue tickets |
GET |
/helpdesk/getAgentTickets(agentID='...') |
Tickets assigned to an agent |
curl -X POST http://localhost:4004/helpdesk/Tickets \
-H "Content-Type: application/json" \
-d '{
"title": "Cannot connect to company WiFi",
"description": "My laptop stopped detecting the office WiFi network after the latest Windows update",
"priority": "HIGH",
"category_ID": "cat-0003",
"department_ID": "dept-0001",
"reporter_ID": "emp-0001"
}'curl -X POST http://localhost:4004/helpdesk/assignAgent \
-H "Content-Type: application/json" \
-d '{
"ticketID": "<ticket-uuid>",
"agentID": "agt-0003",
"remarks": "Assigning to L2 support for network issues"
}'curl -X POST http://localhost:4004/helpdesk/resolveTicket \
-H "Content-Type: application/json" \
-d '{
"ticketID": "<ticket-uuid>",
"resolutionNote": "WiFi issue fixed by rolling back the Windows network driver update",
"agentName": "Mike Chen"
}'curl http://localhost:4004/helpdesk/getDashboardStats()curl "http://localhost:4004/helpdesk/Tickets?\$filter=status eq 'OPEN' and priority eq 'CRITICAL'"npm testTests cover:
- Ticket creation validation
- OData queries & filters
- Assign agent action
- Resolve & close lifecycle
- Escalation logic
- Dashboard statistics
- Comment creation
Departments ──< Employees ──< Tickets >── Agents
│
Categories
│
┌───────────┴────────────┐
Comments AuditLogs
Attachments
- Add React frontend with SAP UI5 Web Components
- Email notifications on ticket assignment/resolution
- SAP HANA Cloud support for production deployment
- Role-based access control (RBAC)
- File attachment upload support
- SLA breach alerts
- Deploy to SAP BTP Cloud Foundry
MIT License — feel free to use this project for learning and practice.