config: the two scheduled activities

The workflow now schedules work for itself. Two activities exist that
nobody navigates to — the scheduler performs them — and both are offered
here as well, because a person needs to be able to do by hand what the
timer does on its own.

Retry Call, in Awaiting Contact. Booked automatically four hours after an
unanswered call, clamped into 09:00-21:00 IST, three attempts and then
the lead closes. It records the attempt; whether it also DIALS is gated
on the lead's `auto_retry` field, which ships unset, so nothing rings a
phone until somebody arms it deliberately.

Send Document Reminder, in Document Pending. Fires at 24h, 72h and 120h
from Engage's request. On the third unanswered one the lead leaves the
queue — Parked if the renewal is still weeks off, Lost if the cover is
about to lapse. That is the bound: a chase with no ceiling fills a book
with leads nobody will ever work, all of them looking active.

Both are labelled "Scheduled — or you" rather than given an AI or a role,
because neither is true. The performer on the timeline will read System.
This commit is contained in:
Yashas 2026-09-07 14:12:42 +05:30
parent b9c76482a2
commit eea044b9f9

View File

@ -98,7 +98,13 @@ export const DV_LEAD = 'zk-dv-lead'
*/
const STATE_ACTIVITIES = {
'zk-state-new': [{ uid: 'zk-act-qualify', label: 'Qualify Lead', by: 'Intake AI' }],
'zk-state-qualified': [{ uid: 'zk-act-contact', label: 'Log Contact', by: 'Engage AI' }],
// Retry Call is scheduled automatically four hours after an unanswered
// call, clamped into 09:00-21:00 IST and bounded at three attempts. It
// records the attempt; whether it also DIALS is gated on the lead's
// `auto_retry` field, which ships unset. Offered here so a person can
// also place the retry by hand.
'zk-state-qualified': [{ uid: 'zk-act-contact', label: 'Log Contact', by: 'Engage AI' },
{ uid: 'zk-act-retry-call', label: 'Retry Call', by: 'Scheduled — or you' }],
// Contacted has exactly one way forward and it belongs to Engage. An AI
// cannot receive a file, so it writes the ask; the agent uploads one state
// later. Giving the AI the activity that RECEIVES documents is how you get an
@ -111,7 +117,11 @@ const STATE_ACTIVITIES = {
{ uid: 'zk-act-capture-motor', label: 'Capture Motor Risk', by: 'Engage AI' },
{ uid: 'zk-act-capture-sme', label: 'Capture SME Risk', by: 'Engage AI' },
{ uid: 'zk-act-advise', label: 'AI Cover Recommendation', by: 'Advisor AI' },
{ uid: 'zk-act-quote', label: 'Generate Quote', by: 'Rating engine' }],
{ uid: 'zk-act-quote', label: 'Generate Quote', by: 'Rating engine' },
// Fires on its own at 24h, 72h and 120h from the ask. On the
// third unanswered one the lead leaves this queue — Parked if
// the renewal is still weeks off, Lost if the cover is going.
{ uid: 'zk-act-doc-reminder', label: 'Send Document Reminder', by: 'Scheduled — or you' }],
// Likewise absorbs acceptance, identity and the underwriting screen — none of
// which was ever a stage a lead rested in. Generate Quote appears again as a
// RE-quote for a customer who wants different cover; the lead does not move,