Documentation Templates

Sending Templates

Create and manage reusable message templates.

Sending Templates

Learn how to send messages using approved templates.

πŸ’‘ See Complete Documentation<br />
To see all information about sending templates, check the Complete Templates Documentation.

Send Template

use ScriptDevelop\WhatsappManager\Facades\Whatsapp;
use ScriptDevelop\WhatsappManager\Models\WhatsappBusinessAccount;
use ScriptDevelop\WhatsappManager\Models\WhatsappPhoneNumber;

// Get business account
$account = WhatsappBusinessAccount::first();
$phone = WhatsappPhoneNumber::first();

// Send template 1: template without buttons or without needing to provide button parameters
$message = Whatsapp::template()
    ->sendTemplateMessage($phone)
    ->to('57', '3137555908')
    ->usingTemplate('order_confirmation')
    ->addBody(['12345'])
    ->send();

View complete documentation β†’

Share this page