diff --git a/src/api/config.js b/src/api/config.js index c633368..ccd341c 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -143,6 +143,7 @@ const STATE_ACTIVITIES = { { uid: 'zk-act-accept', label: 'Record the acceptance by hand', by: 'you, on consent', role: 'force' }, { uid: 'zk-act-quote', label: 'Re-quote', by: 'Engage AI', role: 'again' }, { uid: 'zk-act-collect-docs', label: 'Add a document', by: 'you', role: 'again' }, + { uid: 'zk-act-answer-customer', label: 'Reply to the customer', by: 'you, on WhatsApp', role: 'again' }, { uid: 'zk-act-kyc', label: 'Verify KYC', by: 'KYC AI', role: 'force' }, { uid: 'zk-act-uw-screen', label: 'Underwriting Screen', by: 'KYC AI', role: 'force' }, ], diff --git a/src/api/permissions.js b/src/api/permissions.js index afda8b1..c1c260c 100644 --- a/src/api/permissions.js +++ b/src/api/permissions.js @@ -33,6 +33,11 @@ export const ACTIVITY_ROLES = { 'zk-act-advise': ['ai_advisor'], 'zk-act-quote': ['ops_admin', 'ai_engage'], 'zk-act-accept': ['ops_admin', 'partner_agent', 'bank_rm', 'csr_direct'], + // Ops only. The customer's questions are normally Engage's, and this is + // the way a person answers one Engage declined — through the same WhatsApp + // thread, so the reply lands on the lead file instead of somewhere nobody + // can find it later. + 'zk-act-answer-customer': ['ops_admin'], 'zk-act-kyc': ['ops_admin', 'ai_kyc'], 'zk-act-uw-screen': ['ops_admin', 'ai_kyc'], 'zk-act-uw-prepare': ['ai_uw_referral'], diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index a55836f..050f1c8 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -38,6 +38,7 @@ const NARRATIVE = [ ['uw_decision_notes', 'Underwriting decision'], ['documents_notes', 'Documents'], ['customer_reply', 'The customer said'], + ['customer_answer', 'We replied'], ['lost_reason', 'Why it was dropped'], ['resume_note', 'Why now'], ] diff --git a/src/screens/Lead.jsx b/src/screens/Lead.jsx index f1d2512..47f496d 100644 --- a/src/screens/Lead.jsx +++ b/src/screens/Lead.jsx @@ -69,7 +69,8 @@ const GROUPS = [ ['Motor risk', ['motor_reg_no','motor_make_model','motor_mfg_year','motor_cc','motor_fuel','motor_idv','motor_ncb_pct','motor_addons','motor_prev_insurer','motor_prev_policy_no','motor_prev_expiry','motor_prev_claim']], ['AI advice', ['ai_recommended_cover','ai_recommended_addons','ai_recommendation_rationale','ai_recommendation_confidence']], ['Quote', ['product_code','quoted_od_premium','quoted_tp_premium','quoted_addon_premium','quoted_section_premiums','quoted_gst','quoted_premium','quoted_breakup','quote_valid_till']], - ['Proposal', ['acceptance_ref','accepted_at','customer_reply','customer_reply_from']], + ['Conversation', ['customer_reply','customer_reply_from','customer_answer','answer_count']], + ['Proposal', ['acceptance_ref','accepted_at']], ['KYC', ['kyc_mode','kyc_ref','kyc_outcome','kyc_mismatch_notes']], ['Underwriting', ['uw_outcome','uw_survey_required','referral_analysis','uw_referral_reason','uw_decision_notes']], ['Policy', ['payment_link','payment_ref','premium_realised','realised_at','policy_no','policy_issued_at']],