From 8eb80dc37105ca73b851841340ed484b90dbf703 Mon Sep 17 00:00:00 2001 From: Yashas Date: Tue, 8 Sep 2026 14:59:12 +0530 Subject: [PATCH] console: the payment chase is the scheduler's, not a button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 86 moved Log Payment Nudge onto a timer — booked 24h out by Request Premium, re-booked at 48h to a cap of three — because it was firing 47 seconds after the request and recording an outcome for a conversation nobody had had. A scheduled activity has to carry ZERO roles or the scheduler's own perform fails silently, so "Chase the payment" would now 403 for everyone who pressed it. It stops being offered. A person who actually wants to reach the customer has Reply to the customer, which sends a WhatsApp rather than recording that one was due. Co-Authored-By: Claude Opus 5 (1M context) --- src/api/config.js | 6 +++++- src/api/permissions.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/api/config.js b/src/api/config.js index ccd341c..1a1ecd4 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -154,7 +154,11 @@ const STATE_ACTIVITIES = { ], 'zk-state-payment': [ { uid: 'zk-act-realise', label: 'Confirm premium received', by: 'you', role: 'do' }, - { uid: 'zk-act-nudge', label: 'Chase the payment', by: 'Engage AI', role: 'again' }, + // Not offered: the chase is a SCHEDULED activity now (86), booked 24h + // out by Request Premium and re-booked at 48h to a cap of three. It + // carries zero roles so the scheduler can perform it at all, which means + // a button here would 403 for everyone. To actually reach the customer, + // use Reply to the customer — that sends something. { uid: 'zk-act-payment', label: 'Request Premium', by: 'Engage AI', role: 'force' }, ], 'zk-state-issued': [ diff --git a/src/api/permissions.js b/src/api/permissions.js index c1c260c..d35525d 100644 --- a/src/api/permissions.js +++ b/src/api/permissions.js @@ -49,7 +49,10 @@ export const ACTIVITY_ROLES = { 'zk-act-uw-decline': ['sme_underwriter'], 'zk-act-payment': ['ops_admin', 'ai_engage'], - 'zk-act-nudge': ['ops_admin', 'ai_engage'], + // Zero roles in the workflow since 86 — the scheduler performs it, and a + // scheduled activity with any role list fails silently. Left here as an + // empty list so the mirror still records that the activity exists. + 'zk-act-nudge': [], 'zk-act-realise': ['ops_admin'], 'zk-act-onboard': ['ops_admin', 'ai_engage'], 'zk-act-resume': ['ops_admin', 'partner_agent', 'bank_rm', 'csr_direct'],