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 the phone to 602-555-0117 and later the email to 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 number and email stop working. Can you help me with that?
⚙ query_db(SELECT cust_id, first_name, last_name, email, phone FROM customers WHERE phon…)
{
"sql": "SELECT cust_id, first_name, last_name, email, phone FROM customers WHERE phone = 'UNKNOWN' OR email = 'UNKNOWN' LIMIT 1"
}{
"rows": [],
"row_count": 0,
"truncated": false
}Absolutely — I can update both, but I need to confirm your identity and your exact current account record first.
Please send me:
- your full name
- your current PEICO phone number or email on file
- and the new email address and new phone number you want saved
Once I verify the account, I’ll update both for you.
Okay, so my name is Tanya Brooks. The email I have on file is tanya.brooks@example.com. And my new phone number is 602-555-0117 — I'll give you the new email in a second once we get through this part.
⚙ query_db(SELECT cust_id, first_name, last_name, email, phone FROM customers WHERE firs…)
{
"sql": "SELECT cust_id, first_name, last_name, email, phone FROM customers WHERE first_name = 'Tanya' AND last_name = 'Brooks' AND email = 'tanya.brooks@example.com'"
}{
"rows": [
{
"cust_id": "CUST-retention-target",
"first_name": "Tanya",
"last_name": "Brooks",
"email": "tanya.brooks@example.com",
"phone": null
}
],
"row_count": 1,
"truncated": false
}Thanks — I found your account and verified it.
I can update your phone number now, and then I’ll update your email once you send me the new address.
Current account on file:
- Tanya Brooks
- email: tanya.brooks@example.com
Please send the new email address you want on the account, and I’ll take care of both updates.
Oh wait, before you do that — quick question. Is my autopay turned on or off right now?
⚙ query_db(SELECT policy_id, billing_plan, status FROM policies WHERE cust_id = 'CUST-re…)
{
"sql": "SELECT policy_id, billing_plan, status FROM policies WHERE cust_id = 'CUST-retention-target' AND status IN ('ACTIVE','PENDING','QUOTE')"
}{
"error": "sql_error",
"detail": "no such column: billing_plan"
}⚙ query_db(SELECT p.policy_id, p.status, p.premium_breakdown, p.rating_inputs FROM polic…)
{
"sql": "SELECT p.policy_id, p.status, p.premium_breakdown, p.rating_inputs FROM policies p WHERE p.cust_id = 'CUST-retention-target' AND p.status IN ('ACTIVE','PENDING','QUOTE')"
}{
"rows": [
{
"policy_id": "POL-retention-target-p_auto",
"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
}Your autopay is currently off on your active auto policy.
I found:
- billing plan: installments
- autopay: false
- paperless: true
If you want, I can also help update your phone number and email next.
Okay, good to know. Yeah, leave autopay as is — I'm good with that. So go ahead and update the phone number to 602-555-0117, and then I'll give you the new email.
⚙ 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"
]
}
}
]
}
}
}Done — I updated your phone number to 602-555-0117.
Send me the new email address whenever you’re ready, and I’ll update that too.
Perfect. The 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"
]
}
}
]
}
}
}All set — I updated your email to tbrooks.az@example.com and your phone to 602-555-0117.
Anything else I can help with today?
No, that's everything I needed. Thanks so much for getting both of those updated — I really appreciate it!
⚙ end_conversation()
{}{
"ok": true,
"note": "Deliver your closing message now."
}You’re very welcome, Tanya — glad I could help. Thanks for contacting PEICO, and take care!