update-contact-both-fields
Grading criteriawhat this conversation was scored against
DB end-state
{
"customers": {
"changed": [
{
"pk": {
"cust_id": "CUST-retention-target"
},
"fields": {
"phone": [
null,
"602-555-0117"
],
"email": [
"tanya.brooks@example.com",
"tbrooks.az@example.com"
]
}
}
]
}
}Judge rubric
The rep applied BOTH contact updates the customer requested — new phone 602-555-0117 and new email tbrooks.az@example.com — and confirmed both values back to her before ending the call. Updating only one of the two (e.g., saving the phone and wrapping up without the email she said she'd provide) is a fail.(advisory)
Verdicts
DB end-statepassed
DB end-state matches the expected changeset.
Judge rubricpassed
judge: The rep updated both the phone (602-555-0117) and email (tbrooks.az@example.com) and confirmed both values back to the customer before ending the call.
Conversation
Hi, thanks for contacting PEICO — this is the service desk. How can I help you today?
Hi! Thanks for picking up. So I switched phone carriers last week and I'm also changing my email, and I need to get both of those updated on my account before my old email shuts down. Can you help me with that?
I can help with that. First, I need to verify your identity. Could you please give me your name along with the email or phone number currently on file, and your date of birth?
Sure. My name is Tanya Brooks. The email on file is tanya.brooks@example.com, and my date of birth is September 14, 1990.
⚙ query_db(SELECT cust_id, first_name, last_name, dob, email, phone FROM customers WHERE…)
{
"sql": "SELECT cust_id, first_name, last_name, dob, email, phone FROM customers WHERE lower(email) = 'tanya.brooks@example.com'"
}{
"rows": [
{
"cust_id": "CUST-retention-target",
"first_name": "Tanya",
"last_name": "Brooks",
"dob": "1990-09-14",
"email": "tanya.brooks@example.com",
"phone": null
}
],
"row_count": 1,
"truncated": false
}Thanks, Tanya — that all matches, you're verified.
Now, what would you like your new email and new phone number to be?
Great! So my new phone number is 602-555-0117. And I've also got a new email I'll give you in a second.
Got it — I have your new phone number as 602-555-0117. Just to confirm before I save: would you like me to update just the phone now, or wait and do both together once you give me the new email?
You can just go ahead and update the phone now, that's fine. But before you do — quick question — is my autopay turned on or off right now?
⚙ update_contact(CUST-retention-target, 602-555-0117)
{
"cust_id": "CUST-retention-target",
"phone": "602-555-0117"
}{
"ok": true,
"rows_affected": 1,
"changeset": {
"customers": {
"changed": [
{
"pk": {
"cust_id": "CUST-retention-target"
},
"fields": {
"phone": [
null,
"602-555-0117"
]
}
}
]
}
}
}⚙ query_db(SELECT policy_id, line, tier_id, status, premium_breakdown, rating_inputs FRO…)
{
"sql": "SELECT policy_id, line, tier_id, status, premium_breakdown, rating_inputs FROM policies WHERE cust_id = 'CUST-retention-target'"
}{
"rows": [
{
"policy_id": "POL-retention-target-p_auto",
"line": "AUTO",
"tier_id": "AUTO:PINE",
"status": "ACTIVE",
"premium_breakdown": "[{\"step\": \"BASE\", \"code\": \"base\", \"detail\": \"base_rate $900\", \"factor\": null, \"amount_cents\": null, \"running_cents\": 90000}, {\"step\": \"BASE\", \"code\": \"tier:PINE\", \"detail\": \"tier factor \\u00d71.0\", \"factor\": 1.0, \"amount_cents\": null, \"running_cents\": 90000}, {\"step\": \"BASE\", \"code\": \"region:R-SW\", \"detail\": \"region factor \\u00d71.12\", \"factor\": 1.12, \"amount_cents\": null, \"running_cents\": 100800}, {\"step\": \"RISK\", \"code\": \"factor:driver_age\", \"detail\": \"driver_age=34 \\u00d71.05\", \"factor\": 1.05, \"amount_cents\": null, \"running_cents\": 105840}, {\"step\": \"RISK\", \"code\": \"factor:risk_score\", \"detail\": \"risk_score=730 \\u00d71.0\", \"factor\": 1.0, \"amount_cents\": null, \"running_cents\": 105840}, {\"step\": \"RISK\", \"code\": \"factor:annual_miles\", \"detail\": \"annual_miles=11000 \\u00d71.0\", \"factor\": 1.0, \"amount_cents\": null, \"running_cents\": 105840}, {\"step\": \"RISK\", \"code\": \"factor:vehicle_age\", \"detail\": \"vehicle_age=5 \\u00d71.0\", \"factor\": 1.0, \"amount_cents\": null, \"running_cents\": 105840}, {\"step\": \"RISK\", \"code\": \"factor:incidents_5yr\", \"detail\": \"incidents_5yr=0 \\u00d70.95\", \"factor\": 0.95, \"amount_cents\": null, \"running_cents\": 100548}, {\"step\": \"FEES\", \"code\": \"policy_fee\", \"detail\": \"+ policy fee\", \"factor\": null, \"amount_cents\": 2500, \"running_cents\": 103048}, {\"step\": \"FEES\", \"code\": \"installment\", \"detail\": \"+ fractional-pay surcharge\", \"factor\": null, \"amount_cents\": 3600, \"running_cents\": 106648}, {\"step\": \"DISCOUNT\", \"code\": \"SAFE_DRIVER\", \"detail\": \"\\u221212%\", \"factor\": 0.88, \"amount_cents\": null, \"running_cents\": 93850}, {\"step\": \"DISCOUNT\", \"code\": \"PAPERLESS\", \"detail\": \"\\u2212$25\", \"factor\": null, \"amount_cents\": -2500, \"running_cents\": 91350}]",
"rating_inputs": "{\"billing\": {\"plan\": \"INSTALLMENTS\", \"autopay\": false, \"paperless\": true}, \"incidents_5yr\": 0, \"smoker\": false, \"promo_code\": null}"
}
],
"row_count": 1,
"truncated": false
}Done — your phone is now updated to 602-555-0117.
On your autopay question: your auto policy is currently on installments with autopay turned off. (You do have paperless on, which is giving you a $25 discount.)
Just a heads-up: your billing plan includes a fractional-pay surcharge (about $36) because you're paying in installments rather than paid-in-full. Let me know if you'd like me to look into any of that.
Whenever you're ready with the new email, just send it over.
Okay, thanks for checking on that. I'll leave autopay as is for now. So my new email is tbrooks.az@example.com — that's t, b, r, o, o, k, s, dot, a, z, at example dot com.
⚙ update_contact(CUST-retention-target, tbrooks.az@example.com)
{
"cust_id": "CUST-retention-target",
"email": "tbrooks.az@example.com"
}{
"ok": true,
"rows_affected": 1,
"changeset": {
"customers": {
"changed": [
{
"pk": {
"cust_id": "CUST-retention-target"
},
"fields": {
"email": [
"tanya.brooks@example.com",
"tbrooks.az@example.com"
]
}
}
]
}
}
}Done — your email is now updated to tbrooks.az@example.com.
So you're all set: phone is 602-555-0117 and email is tbrooks.az@example.com. Is there anything else I can help you with?
Perfect, thank you so much! That's all I needed. I appreciate your help!
⚙ end_conversation()
{}{
"ok": true,
"note": "Deliver your closing message now."
}Thanks again for reaching out to PEICO — have a wonderful day! 👋