Library › Customer Support & Success AI › Customer support teams
Compute SLA credits for three tickets as JSON
- For Customer support teams
- You practice Asking for a format you can use
- Time about 5 minutes
- Level Advanced
About this exercise
Compute the SLA credit for each ticket and return one JSON code block with an array of three objects, one per line. Keys: ticket, breached (true or false), minutes_over (a number, 0 if not breached), credit_usd (a number). Nothing outside the code block. At most 5 lines of code.
Common mistakes when you ask AI for this
- Rounding partial blocks up. The finance note says to round up; the contract says full blocks. Try: Say: "Full 30-minute blocks only. Cap at $300."
- Missing the cap. The AI gives P-3 $500. Try: Say: "Maximum credit per ticket is $300."
- Extra text. The AI adds a working section. Try: Say: "One JSON code block, nothing else."
- Skipping the code block shape. The AI splits output into several code blocks or none. Try: Say "exactly one code block and nothing else".
- Letting the code sprawl. The AI adds extra lines and comments. Try: Say "at most N lines of code".
What a strong prompt includes
- Asks for one code block
- Caps the code length
- Names the keys
- States the credit rule
Related exercises
- Acknowledge an accessibility bug without a promised date (Customer Support & Success AI · Customer support teams)
- Acknowledge an executive escalation within the hour (Customer Support & Success AI · Executives)
- Adapt one ad image to 3 sizes with Midjourney (Image & Video AI · Marketing and content)
- Age a returns queue in business days and flag the ones over the limit (Customer Support & Success AI · Customer support teams)
- Age open requisitions as of today and flag the old ones (Finance AI · FP&A and financial analysts)