{{ __('Admin') }} {{ __('Settings') }} {{ __('System Message Setting') }}
{{ __('Admin - Project settings') }}

{{ __('System message') }} {{ __('settings') }}.

{{ __("Pick exactly one messaging engine — only the active engine is used across the whole platform. Workspaces don't get a choice; they always use the engine you select here. Click another card to switch.") }}

{{ __('All settings') }}
{{-- The actual
; existing card UI lives inside it. The "Save changes" button at the page header submits via the form="wadesk-providers-form" attribute. --}} @csrf
{{-- Phase 5 — WABA multi-tenant dispatcher toggle. Surfaces the feature flag + Graph API version so admin can flip the new path on/off without touching .env. Only shown when WABA is the active engine. --}} @if (($activeProvider ?? '') === 'waba')
{{ __('waba · multi-tenant dispatch') }}

{{ __('Per-workspace WABA routing') }}

Routes every outbound /chat send through the workspace's connected WABA account in {{ __('wa_provider_configs') }} instead of the platform-wide .env token. Required for multi-merchant production. Default {{ __('OFF') }} so existing installs keep using the legacy single-tenant path.

{{ __('Connected WABAs') }}
{{ number_format($settings['waba_connected_count']) }}
{{ __('across all workspaces') }}
@if ($settings['waba_dispatch_v2_enabled'] && $settings['waba_connected_count'] === 0)
{{ __('Warning:') }} v2 is enabled but no workspace has connected a WABA at /devices yet. Outbound sends will return "No connected WABA account" until at least one workspace connects.
@endif
{{-- Phase 6 — Templates v2. Submits new /templates to Meta /message_templates immediately on save, polls status, enforces ban-prevention lint rules. --}}
{{ __('waba · template lifecycle') }}

{{ __('Meta template submission & sync') }}

When ON, every new template POSTs to /{WABA_ID}/message_templates on save. Approval status updates live via the {{ __('message_template_status_update') }} webhook plus an AJAX poll while the user has the detail page open. Default {{ __('OFF') }} — existing local-approval flow keeps working.

{{ __('Webhook poll') }}
30s
{{ __('client-side, while pending') }}
@endif
{{ __('wadesk-message-setting.blade.php') }}

{{ __('Active messaging engine') }}

{{-- Engine cards — SINGLE select. Clicking any card makes it the active engine. The hidden radios are what the form actually submits; the buttons just flip them. --}} @php $allowed = $settings['allowed_send_methods']; $activeProvider = $allowed[0] ?? 'baileys'; // Three engines now — Business API covers both the // manual-token paste workflow AND the Embedded Signup // (WABA login) flow, since they target the same Meta // Cloud API and share the same App ID + App Secret. $activeSlug = match ($activeProvider) { 'twilio' => 'twilio', 'baileys' => 'wa-api', 'waba' => 'business-api', default => 'wa-api', }; $engines = [ 'twilio' => [ 'key' => 'twilio', 'opt' => 'option 1', 'title' => 'Twilio service', 'desc' => "Send via Twilio's WhatsApp sandbox or production sender.", ], 'wa-api' => [ 'key' => 'baileys', 'opt' => 'option 2', 'title' => 'Unofficial API', 'desc' => 'Self-hosted Node bridge. Best for unofficial flows.', ], 'business-api' => [ 'key' => 'waba', 'opt' => 'option 3', 'title' => 'Business API', 'desc' => 'Meta Cloud API — manual token or Embedded Signup (WABA login).', ], ]; @endphp
@foreach ($engines as $slug => $eng) @php $on = $activeSlug === $slug; @endphp @endforeach
{{ __('Switching engines mid-traffic drops in-flight queues. Pause campaigns first, then change.') }}
{{-- AI assistance section removed — AI keys aren't entered here. Platform admins manage provider keys at /admin/api-keys, and workspace owners enter their own BYOK keys at /settings (per-workspace). --}} {{-- Sender pacing — these values are what Node's broadcast/ campaign/scheduled services USE to throttle outbound sends. Key names match what Node reads in node/index.js (app.locals.messageSettings): msg_gap — seconds between consecutive sends batches_gap — recipients per batch bw_msg_gap — minutes between batches enable_batches — 0/1 flag --}}
{{ __('pacing') }}

{{ __('Sender pacing & batching') }}