Skip to content

Commit ab54c2d

Browse files
committed
feat: add cases dataset to CRM seed data for issue tracking
1 parent 8a175c7 commit ab54c2d

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

examples/app-crm/src/data/index.ts

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,118 @@ const tasks: DatasetInput = {
275275
]
276276
};
277277

278+
// ─── Cases ────────────────────────────────────────────────────────────
279+
const cases: DatasetInput = {
280+
object: 'case',
281+
mode: 'upsert',
282+
externalId: 'subject',
283+
records: [
284+
{
285+
subject: 'Login issues after platform upgrade',
286+
description: 'Users unable to log in after the v4.2 upgrade.',
287+
status: 'in_progress',
288+
priority: 'high',
289+
type: 'problem',
290+
origin: 'email',
291+
is_closed: false,
292+
is_sla_violated: false,
293+
is_escalated: false,
294+
created_date: new Date(Date.now() - 86400000 * 2),
295+
},
296+
{
297+
subject: 'Data export timing out for large datasets',
298+
description: 'CSV export fails for datasets over 10k rows.',
299+
status: 'escalated',
300+
priority: 'critical',
301+
type: 'bug',
302+
origin: 'phone',
303+
is_closed: false,
304+
is_sla_violated: true,
305+
is_escalated: true,
306+
escalation_reason: 'Customer threatening churn',
307+
created_date: new Date(Date.now() - 86400000 * 5),
308+
},
309+
{
310+
subject: 'How to configure SSO with Okta?',
311+
description: 'Customer needs guidance on SSO setup with Okta.',
312+
status: 'resolved',
313+
priority: 'medium',
314+
type: 'question',
315+
origin: 'web',
316+
is_closed: false,
317+
is_sla_violated: false,
318+
is_escalated: false,
319+
resolution_time_hours: 4.5,
320+
created_date: new Date(Date.now() - 86400000 * 3),
321+
},
322+
{
323+
subject: 'API rate limit exceeded on production',
324+
description: 'Production environment hitting rate limits during peak hours.',
325+
status: 'closed',
326+
priority: 'high',
327+
type: 'problem',
328+
origin: 'chat',
329+
is_closed: true,
330+
is_sla_violated: false,
331+
is_escalated: false,
332+
resolution_time_hours: 2.0,
333+
created_date: new Date(Date.now() - 86400000 * 7),
334+
closed_date: new Date(Date.now() - 86400000 * 6),
335+
},
336+
{
337+
subject: 'PDF reports not rendering charts correctly',
338+
description: 'Charts appear blank when exporting dashboard to PDF.',
339+
status: 'new',
340+
priority: 'medium',
341+
type: 'bug',
342+
origin: 'email',
343+
is_closed: false,
344+
is_sla_violated: false,
345+
is_escalated: false,
346+
created_date: new Date(Date.now() - 86400000),
347+
},
348+
{
349+
subject: 'Billing discrepancy on last invoice',
350+
description: 'Customer billed for 15 seats but only uses 12.',
351+
status: 'waiting_customer',
352+
priority: 'low',
353+
type: 'problem',
354+
origin: 'email',
355+
is_closed: false,
356+
is_sla_violated: false,
357+
is_escalated: false,
358+
created_date: new Date(Date.now() - 86400000 * 4),
359+
},
360+
{
361+
subject: 'Mobile app crashes on iOS 17',
362+
description: 'App crashes on launch for users running iOS 17.2+.',
363+
status: 'in_progress',
364+
priority: 'critical',
365+
type: 'bug',
366+
origin: 'web',
367+
is_closed: false,
368+
is_sla_violated: true,
369+
is_escalated: true,
370+
escalation_reason: 'Affects 30% of mobile users',
371+
created_date: new Date(Date.now() - 86400000 * 3),
372+
},
373+
{
374+
subject: 'Request: bulk import via CSV',
375+
description: 'Customer requesting ability to import records via CSV upload.',
376+
status: 'closed',
377+
priority: 'low',
378+
type: 'feature_request',
379+
origin: 'web',
380+
is_closed: true,
381+
is_sla_violated: false,
382+
is_escalated: false,
383+
resolution_time_hours: 8.0,
384+
created_date: new Date(Date.now() - 86400000 * 10),
385+
closed_date: new Date(Date.now() - 86400000 * 8),
386+
},
387+
],
388+
};
389+
278390
/** All CRM seed datasets */
279391
export const CrmSeedData: DatasetInput[] = [
280392
accounts,
@@ -283,4 +395,5 @@ export const CrmSeedData: DatasetInput[] = [
283395
opportunities,
284396
products,
285397
tasks,
398+
cases,
286399
];

0 commit comments

Comments
 (0)