0
# Case Management
1
2
Support case tracking and management system with priority levels, case types, status management, resolution tracking, and integration with accounts and contacts for comprehensive customer support.
3
4
## Capabilities
5
6
### Case Listing and Search
7
8
List and search cases with comprehensive filtering options.
9
10
```python { .api }
11
def list_cases(name: str = None, status: str = None, priority: str = None,
12
case_type: str = None, assigned_to: str = None, account: str = None,
13
limit: int = 10, offset: int = 0) -> dict:
14
"""
15
List cases with filtering and search.
16
17
Args:
18
name (str, optional): Filter by case name (partial match)
19
status (str, optional): Filter by status ('New', 'In Progress', 'On Hold', 'Closed')
20
priority (str, optional): Filter by priority level
21
case_type (str, optional): Filter by case type
22
assigned_to (str, optional): Filter by assigned user UUID
23
account (str, optional): Filter by associated account UUID
24
limit (int): Number of results per page (default: 10)
25
offset (int): Number of results to skip (default: 0)
26
27
Returns:
28
dict: Paginated cases with metadata
29
30
Headers Required:
31
Authorization: Bearer <access_token>
32
organization-id: <org_uuid>
33
34
Example:
35
GET /api/cases/?status=In%20Progress&priority=High&limit=5
36
37
Response:
38
{
39
"count": 8,
40
"next": "/api/cases/?limit=5&offset=5",
41
"previous": null,
42
"results": [
43
{
44
"id": "case-uuid",
45
"name": "Login Issues - ACME Corp",
46
"status": "In Progress",
47
"priority": "High",
48
"case_type": "Technical",
49
"account": "account-uuid",
50
"contacts": ["contact1-uuid"],
51
"created_on": "2023-01-15T10:30:00Z",
52
"closed_on": null,
53
"assigned_to": ["user1-uuid"],
54
"teams": ["team1-uuid"]
55
}
56
]
57
}
58
"""
59
```
60
61
### Case Creation
62
63
Create new support cases with priority, type, and entity associations.
64
65
```python { .api }
66
def create_case(case_data: dict) -> dict:
67
"""
68
Create a new support case.
69
70
Args:
71
case_data (dict): Case information and associations
72
73
Returns:
74
dict: Created case details
75
76
Headers Required:
77
Authorization: Bearer <access_token>
78
organization-id: <org_uuid>
79
Content-Type: multipart/form-data (if including attachments)
80
81
Example:
82
POST /api/cases/
83
{
84
"name": "Email Configuration Problem",
85
"status": "New",
86
"priority": "Normal",
87
"case_type": "Technical",
88
"account": "account-uuid",
89
"contacts": ["contact1-uuid"],
90
"assigned_to": ["user1-uuid"],
91
"teams": ["support-team-uuid"]
92
}
93
94
Response:
95
{
96
"id": "new-case-uuid",
97
"name": "Email Configuration Problem",
98
"status": "New",
99
"priority": "Normal",
100
"case_type": "Technical",
101
"created_on": "2023-02-01T09:00:00Z",
102
...case details...
103
}
104
"""
105
```
106
107
### Case Details and Operations
108
109
Get comprehensive case information and perform updates.
110
111
```python { .api }
112
def get_case(pk: str) -> dict:
113
"""
114
Get detailed case information.
115
116
Args:
117
pk (str): Case UUID
118
119
Returns:
120
dict: Complete case details with related entities
121
122
Headers Required:
123
Authorization: Bearer <access_token>
124
organization-id: <org_uuid>
125
126
Example:
127
GET /api/cases/case-uuid/
128
129
Response:
130
{
131
"case_obj": {
132
"id": "case-uuid",
133
"name": "Login Issues - ACME Corp",
134
"status": "In Progress",
135
"priority": "High",
136
"case_type": "Technical",
137
"account": "account-uuid",
138
"contacts": ["contact1-uuid"],
139
"created_on": "2023-01-15T10:30:00Z",
140
"closed_on": null,
141
"created_by": "user-uuid"
142
},
143
"assigned_to": [...assigned users...],
144
"teams": [...assigned teams...],
145
"comments": [...case comments...],
146
"attachments": [...case attachments...],
147
"users_mention": [...users for @mentions...]
148
}
149
"""
150
151
def update_case(pk: str, case_data: dict) -> dict:
152
"""
153
Update case information.
154
155
Args:
156
pk (str): Case UUID
157
case_data (dict): Updated case information
158
159
Returns:
160
dict: Updated case details
161
162
Headers Required:
163
Authorization: Bearer <access_token>
164
organization-id: <org_uuid>
165
166
Example:
167
PUT /api/cases/case-uuid/
168
{
169
"name": "Login Issues - RESOLVED",
170
"status": "Closed",
171
"closed_on": "2023-02-05T16:30:00Z"
172
}
173
"""
174
175
def delete_case(pk: str) -> None:
176
"""
177
Delete a case.
178
179
Args:
180
pk (str): Case UUID
181
182
Returns:
183
None: 204 No Content on success
184
185
Headers Required:
186
Authorization: Bearer <access_token>
187
organization-id: <org_uuid>
188
189
Example:
190
DELETE /api/cases/case-uuid/
191
"""
192
```
193
194
### Case Comments and Attachments
195
196
Manage comments and file attachments for cases.
197
198
```python { .api }
199
def add_case_comment_or_attachment(pk: str, comment: str = None,
200
attachment: file = None) -> dict:
201
"""
202
Add comment or attachment to case.
203
204
Args:
205
pk (str): Case UUID
206
comment (str, optional): Comment text
207
attachment (file, optional): File to attach
208
209
Returns:
210
dict: Success response
211
212
Headers Required:
213
Authorization: Bearer <access_token>
214
organization-id: <org_uuid>
215
Content-Type: multipart/form-data (for attachments)
216
217
Example:
218
POST /api/cases/case-uuid/
219
{
220
"comment": "Issue reproduced, working on solution"
221
}
222
"""
223
224
def edit_case_comment(pk: str, comment: str) -> dict:
225
"""
226
Edit a case comment.
227
228
Args:
229
pk (str): Comment UUID
230
comment (str): Updated comment text
231
232
Returns:
233
dict: Updated comment
234
235
Headers Required:
236
Authorization: Bearer <access_token>
237
238
Example:
239
PUT /api/cases/comment/comment-uuid/
240
{
241
"comment": "Root cause identified - server configuration issue"
242
}
243
"""
244
245
def delete_case_comment(pk: str) -> None:
246
"""
247
Delete a case comment.
248
249
Args:
250
pk (str): Comment UUID
251
252
Returns:
253
None: 204 No Content on success
254
255
Headers Required:
256
Authorization: Bearer <access_token>
257
258
Example:
259
DELETE /api/cases/comment/comment-uuid/
260
"""
261
262
def delete_case_attachment(pk: str) -> None:
263
"""
264
Delete a case attachment.
265
266
Args:
267
pk (str): Attachment UUID
268
269
Returns:
270
None: 204 No Content on success
271
272
Headers Required:
273
Authorization: Bearer <access_token>
274
275
Example:
276
DELETE /api/cases/attachment/attachment-uuid/
277
"""
278
```
279
280
## Case Data Types
281
282
```python { .api }
283
class Case:
284
"""Case model representing support cases and issues"""
285
id: str # UUID
286
name: str # Required case title/description
287
status: str # 'New', 'In Progress', 'On Hold', 'Closed'
288
priority: str # Priority level (e.g., 'Low', 'Normal', 'High', 'Critical')
289
case_type: str # Type of case (e.g., 'Technical', 'Billing', 'General')
290
291
# Entity associations
292
account: str # Account UUID (optional)
293
contacts: list[str] # Contact UUIDs
294
295
# Resolution tracking
296
closed_on: datetime # When case was closed (if applicable)
297
298
# Metadata
299
created_on: datetime
300
created_by: str # User UUID
301
org: str # Organization UUID
302
303
# Assignments
304
assigned_to: list[str] # User UUIDs
305
teams: list[str] # Team UUIDs
306
307
class CaseComment:
308
"""Comments on cases"""
309
id: str # UUID
310
comment: str
311
case: str # Case UUID
312
commented_on: datetime
313
commented_by: str # User UUID
314
315
class CaseAttachment:
316
"""File attachments on cases"""
317
id: str # UUID
318
attachment: str # File path/URL
319
case: str # Case UUID
320
created_on: datetime
321
created_by: str # User UUID
322
```
323
324
## Case Status Management
325
326
Cases follow a standard support workflow with these status options:
327
328
- **New**: Newly created case, not yet assigned or started
329
- **In Progress**: Case is actively being worked on
330
- **On Hold**: Case is temporarily paused (waiting for customer response, etc.)
331
- **Closed**: Case has been resolved and closed
332
333
### Case Priority Levels
334
Priority helps organize case urgency and response times:
335
336
- **Low**: Minor issues that can be addressed during normal business hours
337
- **Normal**: Standard priority issues for regular support workflow
338
- **High**: Important issues that need prompt attention
339
- **Critical**: Urgent issues requiring immediate response
340
341
### Case Types
342
Cases can be categorized by type for better organization:
343
344
- **Technical**: Technical support and troubleshooting
345
- **Billing**: Billing questions and payment issues
346
- **General**: General inquiries and information requests
347
- **Bug Report**: Software bugs and system issues
348
- **Feature Request**: Enhancement and feature requests
349
350
## Search and Filtering
351
352
Cases support multiple search and filter options:
353
354
- **Name Search**: `name` parameter for partial text matching
355
- **Status Filter**: Filter by current case status
356
- **Priority Filter**: Filter by case priority level
357
- **Type Filter**: Filter by case type category
358
- **Assignment**: `assigned_to` filtering by user UUID
359
- **Account Association**: Filter cases related to specific accounts
360
- **Resolution Status**: Filter by open vs. closed cases
361
362
All text-based filters support partial matching and are case-insensitive.
363
364
## Related Entities
365
366
Cases can be associated with and relate to:
367
- **Accounts**: Cases can be linked to customer accounts
368
- **Contacts**: Associate cases with specific customer contacts
369
- **Teams**: Assign cases to support teams
370
- **Users**: Individual case assignments and ownership
371
- **Comments**: Case progress updates and resolution notes
372
- **Attachments**: Supporting documents, screenshots, and files
373
374
This makes cases central to customer support management and issue resolution tracking across the CRM system.