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 to 602-555-0117 and later the email to tbrooks.az@example.com, confirming 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 to a new phone carrier last week and got a new number, and I also need to update my email on file. Can you help me with that?
Absolutely — I can help update both your phone number and email.
To verify and find your account, please provide:
- Your full name
- Date of birth
- Either your PEICO policy number or legacy account number
- Your current ZIP code on file
And then please include the new phone number and new email address you want saved.
Okay, so my name is Tanya Brooks, date of birth is September 14, 1990, and my ZIP code is 85004 in Phoenix. My new phone number is 602-555-0117. And I've got a new email too — I'll give you that in a second.
⚙ query_db(SELECT c.cust_id, c.legacy_acct, c.status, c.first_name, c.last_name, c.dob, …)
{
"sql": "SELECT c.cust_id, c.legacy_acct, c.status, c.first_name, c.last_name, c.dob, c.email, c.phone, a.line1, a.city, a.state, a.zip FROM customers c JOIN addresses a ON c.address_id = a.address_id WHERE c.first_name = 'Tanya' AND c.last_name = 'Brooks' AND c.dob = '1990-09-14' AND a.zip = '85004'"
}{
"rows": [
{
"cust_id": "CUST-retention-target",
"legacy_acct": null,
"status": "CUSTOMER",
"first_name": "Tanya",
"last_name": "Brooks",
"dob": "1990-09-14",
"email": "tanya.brooks@example.com",
"phone": null,
"line1": "540 Saguaro St",
"city": "Phoenix",
"state": "AZ",
"zip": "85004"
}
],
"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"
]
}
}
]
}
}
}Thanks, Tanya — I verified your account.
I’ve updated your phone number to 602-555-0117. Whenever you’re ready, please send the new email address you’d like on file and I’ll update that too.
Great! Before you do that though — quick question — is my autopay turned on or off right now?
⚙ query_db(SELECT policy_id, line, status, rating_inputs FROM policies WHERE cust_id = '…)
{
"sql": "SELECT policy_id, line, status, rating_inputs FROM policies WHERE cust_id = 'CUST-retention-target' ORDER BY created_at"
}{
"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
}Your autopay is currently off on your active auto policy. Your billing plan is installments, and you are enrolled in paperless billing.
Got it, thanks for checking. Okay, 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 — I’ve updated your email address to tbrooks.az@example.com. Your phone number is also on file as 602-555-0117.
Anything else I can help with today?
Perfect, that's all set. Thanks so much for your help!
⚙ end_conversation()
{}{
"ok": true,
"note": "Deliver your closing message now."
}You’re very welcome, Tanya. Thanks for contacting PEICO — have a great day!