@extends('layouts.portal')
@section('title', 'WhatsApp inbox')
@section('subtitle', 'One shared inbox for the academy number. New contacts become leads automatically, and every message is saved on the lead’s timeline.')
@section('actions')
Templates
Campaigns
@endsection
@section('content')
@unless($ready)
WhatsApp is not connected yet. Add the phone number ID, token, app secret and verify token in
Integrations, then add the webhook
{{ url('/webhooks/whatsapp') }} in Meta. Messages already received are still shown here.
@endunless
Unread{{ $stats['unread'] }}customer messages waiting
Received today{{ $stats['today_in'] }}incoming messages
Sent today{{ $stats['today_out'] }}replies, reminders and campaigns
@if($contact)
@foreach($thread as $m)
@if($loop->first || ! $m->created_at->isSameDay($thread[$loop->index - 1]->created_at))
{{ $m->created_at->isToday() ? 'Today' : $m->created_at->format('D d M Y') }}
@endif
@if($m->template)
Template · {{ $m->template }}@endif
{!! nl2br(e($m->body)) !!}
{{ $m->created_at->format('H:i') }}@unless($m->isInbound()) · {{ $m->sender?->name ?? ($m->campaign_id ? 'Campaign' : 'System') }} · {{ $m->status }}@endunless
@if($m->error)
{{ $m->error }}@endif
@endforeach
@if($contact['opted_out'])
This number replied STOP. Messages are blocked until they send START.
@else
@endif
@else
Select a conversation
Replies inside 24 hours of the customer’s last message can be free text; after that WhatsApp only allows approved templates.
@endif
@endsection
@push('scripts')@endpush