Library › Customer Support & Success AI › Customer support teams
Group duplicate tickets into a JSON merge list
- For Customer support teams
- You practice Asking for a format you can use
- Time about 5 minutes
- Level Advanced
About this exercise
Find the duplicate tickets and return a JSON array in one code block and nothing else. Each item has "keep" (the oldest ticket id), "merge" (an array of the other ids) and "reason" (under 8 words). Only merge tickets from the same customer about the same issue. Leave tickets with no duplicate out of the array. Use at most 14 lines of code.
Common mistakes when you ask AI for this
- Merging across customers. T-5102 has the same subject as T-5101, so the AI merges two different customers. Try: Add: "Only merge tickets from the same customer."
- Listing tickets with no duplicate. The AI includes every ticket, with an empty merge array for the singles. Try: Say: "Leave out tickets that have no duplicate."
- Missing subject-line variants. Tickets T-5105 and T-5113 are worded differently, so the AI misses them. Try: Ask: "Match by issue, not by exact subject. Read the notes."
- Wrong shape. The AI adds prose or a table around the JSON. Try: Say: "One JSON code block, nothing else, keys keep, merge, reason."
- Skipping the code block shape. The AI splits output into several code blocks or none. Try: Say "exactly one code block and nothing else".
What a strong prompt includes
- Asks for one code block
- Caps the code length
- Names the keys
- Sets the match rule
Related exercises
- Adapt one ad image to 3 sizes with Midjourney (Image & Video AI · Marketing and content)
- Age open requisitions as of today and flag the old ones (Finance AI · FP&A and financial analysts)
- Announce a referral bonus with the steps to claim it (Marketing AI · HR and recruiting)
- Announce a schedule change in a text message under 45 words (Leadership AI · Small business owners)
- Announce a team meeting change people will actually follow (Writing AI · Managers and team leads)