@extends('setting.nav') @section('title', 'Follow-up Settings') @section('content')
@include('follow_ups._tabs') @unless ($saved)
Nothing has been saved for this account yet, so the boxes below show the shipped defaults. They are what will be used the moment you switch follow-ups on.
@endunless
@csrf
When a mail becomes late
enabled) @disabled(!$isAdmin)>
{{-- Per-action windows. Built from the live vocabulary rather than the saved JSON, so an action added at Next Actions appears here straight away. --}}

The classifier already says what a mail needs. This says how long that may go unactioned, counted from when the mail arrived — so a mail needing an immediate answer is late in hours, and one needing a nudge is late in days. Leave a box empty to never follow that action up.

@foreach ($windows as $window) @endforeach
Recommended action Due within In force
{{ $window['name'] }} {{ $window['code'] }}
hrs
@if ($window['source'] === 'account') yours @elseif ($window['source'] === 'standard') standard @else {{-- An action added after this feature shipped: no shipped window exists for it. --}} default below @endif
hours
Used for a mail whose action has no window above — including any action added later, and mail that arrived before next actions existed but asks for a reply.
How you are reminded
email_reminders) @disabled(!$isAdmin)>
notify_in_app) @disabled(!$isAdmin)>
due minus hours
Before the due time, not after it. Being told a mail is late is worth much less than being told in time to still answer it.
hours
0 sends one reminder per task and no more.
reminders
The task stays open when the budget runs out — it is still owed, it just stops shouting. A task nobody closes after this many mails will not be closed by another one.
hours
0 never escalates. Each task escalates once, not daily.
Leave blank and each person is reminded about their own queue. Set an address and every mailbox's reminders go there instead — for a shared desk that works the mail for everyone.
@if ($isAdmin)
Back to the queue
@else
Only the account administrator can change these. You can still work your own queue: close, snooze and dismiss are yours.
@endif
How the queue fills

No extra AI call is made for this feature. Every mail already goes through one classification prompt that returns a recommended next action, and that recommendation is the detection:

A mail arrives
      ↓
Recommended next action        "send_quotation"
      ↓
The window for that action     48 hours from when the mail was sent
      ↓
A task, with a due time        and a reminder armed {{ $settings->reminder_lead_hours }}h before it
      ↓
Closed when                    somebody ticks it off, or a reply is seen on the conversation

Mail that arrived before next actions existed is still caught, through the reply flag the pipeline has always set — those get the default window. Promotions, provider spam and conversations that have already been replied to are never raised.

@endsection