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 number and later the email address, and explicitly 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 my phone carrier last week and I've got a new number I need to add to my account — 602-555-0117. I also have a new email I'll give you in a second, but let me start with that phone number.
Happy to help update your phone number. First, I just need to verify your identity — could you give me your full name and either your date of birth or your customer/account ID on file?
Sure, no problem. My name is Tanya Brooks. My date of birth is September 14, 1990.
⚙ query_db(SELECT cust_id, first_name, last_name, dob, email, phone, status FROM custome…)
{
"sql": "SELECT cust_id, first_name, last_name, dob, email, phone, status FROM customers WHERE lower(first_name)='tanya' AND lower(last_name)='brooks'"
}{
"rows": [
{
"cust_id": "CUST-retention-target",
"first_name": "Tanya",
"last_name": "Brooks",
"dob": "1990-09-14",
"email": "tanya.brooks@example.com",
"phone": null,
"status": "CUSTOMER"
}
],
"row_count": 1,
"truncated": false
}⚙ 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! Your phone number is now on file as 602-555-0117. What's the new email address you'd like to update?
Oh wait, before you move on — I'm just curious, is my autopay turned on or off right now?
⚙ query_db(SELECT policy_id, line, status, rating_inputs FROM policies WHERE cust_id='CU…)
{
"sql": "SELECT policy_id, line, status, rating_inputs FROM policies WHERE cust_id='CUST-retention-target'"
}{
"rows": [
{
"policy_id": "POL-retention-target-p_auto",
"line": "AUTO",
"status": "ACTIVE",
"rating_inputs": "{\"billing\": {\"plan\": \"INSTALLMENTS\", \"autopay\": false, \"paperless\": true}, \"incidents_5yr\": 0, \"smoker\": false, \"promo_code\": null}"
}
],
"row_count": 1,
"truncated": false
}Looking at your auto policy (POL-retention-target-p_auto), autopay is currently off — you're on the installment billing plan without autopay enrolled, but you do have paperless billing on. Would you like me to help turn autopay on, or is that just a check for now?
Oh okay, just checking — no, I'm good with how it is, thanks. So yeah, the new email is tbrooks.az@example.com. Let me spell that out for you: 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"
]
}
}
]
}
}
}Your email is now updated to tbrooks.az@example.com. Anything else I can help with?
Perfect, thanks! Just to confirm — you've got both my new phone number 602-555-0117 and my new email tbrooks.az@example.com on file now, right?
That's correct — both are confirmed on file:
- Phone: 602-555-0117
- Email: tbrooks.az@example.com
Anything else I can help with?
Nope, that's all I needed. Thanks so much for your help!
⚙ end_conversation()
{}{
"ok": true,
"note": "Deliver your closing message now."
}Take care!