@extends('layouts.app') @section('title', __('whatsappnotification::lang.whatsapp_notification') . ' - ' . __('whatsappnotification::lang.settings')) @section('content')

WhatsApp Connect

Configure Big Brains Flow / Meta Official API once, then use it for POS notifications and B2B customer login OTP.

@component('components.widget', ['class' => 'box-primary']) @slot('title') {{ __('whatsappnotification::lang.whatsapp_notification') }} — {{ __('whatsappnotification::lang.settings') }} @endslot @slot('tool') {{ __('whatsappnotification::lang.manage_templates') }} {{ __('whatsappnotification::lang.notification_logs') }} @endslot @if(session('status')) @if(session('status.success'))
{{ session('status.msg') }}
@else
{{ session('status.msg') }}
@endif @endif

B2B Portal Login OTP Setup

For B2B customer authentication, create one active template in Manage Templates with these exact settings:

  1. Template Name: B2B Login OTP
  2. Trigger Type: Manual
  3. Send via: Meta Official Cloud API
  4. Approved Meta Template: choose your approved OTP template from Meta
  5. Body Parameters: add {otp} on its own line
  6. Active: checked
Create B2B Login OTP Template
@php $selected_channel = !empty($settings->meta_api_key) || !empty($settings->meta_connection_id) ? 'meta_official' : 'unofficial'; @endphp
{{-- WhatsApp Connection Panel --}}

WhatsApp Connection

Use the buttons below to connect your WhatsApp account to this instance. Save your Access Token and API URL first, then click Create Instance if you don't have an Instance ID yet, or Get QR Code to scan with WhatsApp.

{!! Form::open(['route' => 'whatsappnotification.save_settings', 'method' => 'POST']) !!} {{-- API Configuration --}}

Channel Configuration


Common API Base URL

Keep this as your Big Brains Flow / MultiCRM API URL. Both official and unofficial channels use it as the base host.

{!! Form::label('api_url', __('whatsappnotification::lang.api_url') . ':') !!} {!! Form::text('api_url', $settings->api_url, ['class' => 'form-control', 'placeholder' => 'https://multicrm.bigbrainscrm.com/api/send_template']) !!}

Unofficial WhatsApp / QR Setup

Use this only if you selected Unofficial WhatsApp. Create an instance, scan QR, then use templates with provider “Unofficial”.

  1. Enter Access Token.
  2. Click Create Instance if you do not have Instance ID.
  3. Click Get QR Code and scan from WhatsApp Linked Devices.
  4. Create templates using provider “Unofficial”.
{!! Form::label('instance_id', __('whatsappnotification::lang.instance_id') . ':') !!} {!! Form::text('instance_id', $settings->instance_id, ['class' => 'form-control wa-unofficial-input', 'required', 'placeholder' => 'Your Instance ID']) !!}
{!! Form::label('access_token', __('whatsappnotification::lang.access_token') . ':') !!} {!! Form::text('access_token', $settings->access_token, ['class' => 'form-control wa-unofficial-input', 'required', 'placeholder' => 'Your Access Token']) !!}

Official Meta Cloud API Setup

Use this if you selected Official Meta Cloud API. Enter your Big Brains Flow / MultiCRM Meta API key and Meta connection ID, then create active Meta templates for B2B Login OTP, New Sale, Abandoned Cart, and Due Reminders.

  1. Enter Meta API Key from Big Brains Flow / MultiCRM API Keys.
  2. Enter Meta Connection ID from Connections page.
  3. Go to Manage Templates and create template rows with provider “Meta Official Cloud API”.
  4. For B2B OTP, create template name B2B Login OTP and body params {otp}.
{!! Form::label('meta_api_key', 'Meta API Key:') !!} {!! Form::text('meta_api_key', $settings->meta_api_key ?? '', ['class' => 'form-control wa-meta-input', 'placeholder' => 'mck_live_...']) !!}
{!! Form::label('meta_connection_id', 'Meta Connection ID:') !!} {!! Form::text('meta_connection_id', $settings->meta_connection_id ?? '', ['class' => 'form-control wa-meta-input', 'placeholder' => 'e.g. 12']) !!}
{!! Form::label('type', __('whatsappnotification::lang.message_type') . ':') !!} {!! Form::select('type', ['button' => 'Button', 'list' => 'List'], $settings->type, ['class' => 'form-control wa-unofficial-input']) !!}
{{-- Message Template --}}

{{ __('whatsappnotification::lang.message_template') }}


{!! Form::label('message_title', __('whatsappnotification::lang.message_title') . ':') !!} {!! Form::textarea('message_title', $settings->message_title, ['class' => 'form-control', 'rows' => 5, 'placeholder' => 'Thank you for your order #{invoice_no}! Your total is ₹{total_amount}.']) !!}
{!! Form::label('message_footer', __('whatsappnotification::lang.message_footer') . ':') !!} {!! Form::text('message_footer', $settings->message_footer, ['class' => 'form-control', 'placeholder' => '{business_name} - {business_phone}']) !!}
{{ __('whatsappnotification::lang.available_tags') }}

{{ __('whatsappnotification::lang.tags_help') }}

{invoice_no} — Invoice Number
{invoice_url} — Invoice URL (public link)
{invoice_pdf_url} — Invoice PDF URL
{total_amount} — Total Amount
{total_paid} — Total Paid
{total_due} — Total Due
{contact_name} — Customer Name
{customer_mobile} — Customer Mobile
{business_name} — Business Name
{business_phone} — Business Phone
{transaction_date} — Transaction Date
{product_list} — Product List
{item_count} — Total Items
{discount} — Discount
{tax} — Tax Amount
{shipping} — Shipping
{sale_note} — Sale Note
{payment_status} — Payment Status
{{-- Template Buttons --}}

{{ __('whatsappnotification::lang.template_buttons') }}

{{ __('whatsappnotification::lang.template_buttons_help') }}


@php $buttons = $settings->template_buttons ?? []; // Normalize old format (keyed by type) to new format (indexed array) if (!empty($buttons) && !isset($buttons[0])) { $normalized = []; foreach ($buttons as $type => $btn) { $btn['type'] = $type; $normalized[] = $btn; } $buttons = $normalized; } @endphp
@foreach($buttons as $index => $btn)
@if(($btn['type'] ?? 'urlButton') == 'urlButton')
@elseif(($btn['type'] ?? '') == 'callButton')
@elseif(($btn['type'] ?? '') == 'quickReplyButton')
@elseif(($btn['type'] ?? '') == 'copyCodeButton')
@endif
@endforeach
You can add up to 3 buttons per message
{{-- Trigger Settings --}}

{{ __('whatsappnotification::lang.trigger_settings') }}


{{-- Master Switch --}}

{{ __('whatsappnotification::lang.enable_module_help') }}


{{-- Auto Notification Triggers --}}
{{ __('whatsappnotification::lang.auto_notification_triggers') }}

{{ __('whatsappnotification::lang.auto_trigger_help') }}

{{ __('whatsappnotification::lang.notify_on_new_sale_help') }}

{{ __('whatsappnotification::lang.notify_on_sale_update_help') }}

{{ __('whatsappnotification::lang.how_it_works') }}: {{ __('whatsappnotification::lang.how_it_works_desc') }}

{{-- Test Notification --}}

{{ __('whatsappnotification::lang.test_notification') }}




{!! Form::close() !!}
WhatsApp Connect v{{ config('whatsappnotification.module_version', '1.0') }} — {{ __('whatsappnotification::lang.powered_by') }} | bigbrainstechnolabs.com
@endcomponent @stop @section('javascript') @endsection