@php // Which channel this build is for — set by the index channel chooser // (?channel=sms / ?channel=email). SMS and Email reuse this exact builder, // but neither speaks Meta templates, the flow engine or A/B variants yet, // so those surfaces are hidden rather than offered and silently ignored. $campaignChannel = $campaignChannel ?? 'whatsapp'; $isEmailCampaign = $campaignChannel === 'email'; $customOnlyChannel = in_array($campaignChannel, ['sms', 'email'], true); @endphp @if (session('status') || $errors->any()) @push('scripts') @endpush @endif
{{ __('WA Campaigns / New') }}
{{ __('Create new WhatsApp') }} {{ __('campaign') }}
{{ __('Draft / unsaved') }}
@csrf @php $stepReview = !empty($canFollowups) ? 6 : 5; @endphp
1 {{ __('Setup') }}
2 {{ __('Compose') }}
3 {{ __('Recipients') }}
4 {{ __('Schedule') }}
@if (!empty($canFollowups))
5 {{ __('Follow-ups') }}
@endif
{{ $stepReview }} {{ __('Review') }}
01 {{ __('Campaign setup') }} {{ __('required') }}
{{ __('Internal label for reports and queue history.') }}
{{ __('Only connected senders can launch a queue.') }}
@if ($isEmailCampaign && $emailTemplates->count()) {{-- Email "Template" type — same two-choice shape as WhatsApp (Custom / Template). Picking it reveals the saved-email-template dropdown and renders the chosen design in the live preview. --}} @endif @unless ($customOnlyChannel) @endunless
{{-- A/B is WhatsApp/SMS only for now: the email runner reads custom_message alone, so an email campaign that offered a Variant B would silently send Variant A to everyone. --}} @unless ($isEmailCampaign)
{{ __('Variant B receives the remaining audience. Set Variant B content in the Compose step.') }}
@endunless
@if (!empty($canFollowups)) @endif
{{ __('Step') }} 1 of {{ $stepReview }}
{{-- Build-with-AI modal — same overlay/panel pattern as the templates + meta-ads modals so the visual language stays consistent. Opened by #open-ai-modal in the sticky bar above. POST submission lives in user-wa-campaigns-create.js. --}}