Library › Sales AI › Revenue operations

Convert a renewal list into JSON with ISO dates

  • For Revenue operations
  • You practice Asking for a format you can use
  • Time about 5 minutes
  • Level Intermediate

About this exercise

Convert the five contracts into one JSON array in a single code block. Keys for each object: account, renewal_date, arr, auto_renew, renews_within_60_days. Dates are US format (month first) and must become YYYY-MM-DD. arr is a number with no $ or commas. auto_renew is true or false. renews_within_60_days is true if the renewal date falls within 60 days of Nov 6, 2026, otherwise false. If a value is missing or unknown, use null (including renews_within_60_days when the date is missing). Add nothing outside the code block except one line of 10 words or fewer.

Common mistakes when you ask AI for this

  • Day-first dates. The AI reads 3/4/27 as 3 April. Try: Add: "Dates are month first: 3/4/27 is 2027-03-04."
  • Guessing missing values. The AI writes 0, "TBD" or "unknown" instead of null. Try: Add: "Use null for anything missing or unknown, including renews_within_60_days when the date is missing."
  • Dollar signs and text. The AI keeps "$48,000" as a string. Try: Add: "arr is a number, no $ or commas."
  • Commentary around the code. The AI explains the conversion in paragraphs. Try: Add: "One code block and at most one line of 10 words outside it."
  • Changing or dropping keys. The AI renames keys like renewalDate or skips the 60-day flag. Try: Add: "Use exactly these keys: account, renewal_date, arr, auto_renew, renews_within_60_days."

What a strong prompt includes

  • Names the keys
  • Says ISO dates
  • Uses null
  • Numbers only for arr
  • Sets the 60-day test

Practice this now ↑

Related exercises