Skyden Send
Sign in
Templates / Using Templates

Using Templates

Templates let you define a message once, then reuse it everywhere in your code. When you change the template text, all future messages pick up the change automatically — no redeployment needed.

Why use templates?

  • No hardcoded messages — your code stays clean
  • Update without deploying — change the template in the dashboard
  • Team collaboration — marketing can edit text without touching code
  • Multi-language — create order_confirmed_fr and order_confirmed_en
  • Consistency — the same template is used everywhere

Creating a template

Go to your dashboard → TemplatesNew template. Fill in:

  • Name: unique identifier in snake_case (e.g. order_confirmed)
  • Display name: friendly name shown in the dashboard
  • Body: the message with variables in {{curly_braces}}

Example body:

Bonjour <?php echo e(name); ?> 👋

Votre commande <?php echo e(order); ?> de <?php echo e(total); ?>$ a été confirmée.

Merci !

Skyden Send automatically extracts the variables name, order, and total.

Using a template

Once created, use it from anywhere in your code:

'SkydenSend::to(\'+243812345678\') ->template(\'order_confirmed\', [ \'name\' => \'Alex\', \'order\' => \'ORD-123\', \'total\' => \'49.99\', ]);', 'node' => 'await SkydenSend.to(\'+243812345678\').template(\'order_confirmed\', { name: \'Alex\', order: \'ORD-123\', total: \'49.99\', });', ]" />

That's it. The server renders the message:

Bonjour Alex 👋
Votre commande ORD-123 de 49.99$ a été confirmée.
Merci !

…and sends it to WhatsApp.

What if a variable is missing?

If you don't provide a variable, the placeholder stays as-is in the sent message:

Bonjour {{name}}, ...Bonjour {{name}}, ... (if name is missing)

Always provide all variables to avoid this.

Best practices

  • Use descriptive variable names (customer_name, not n)
  • Keep messages short and clear — WhatsApp favors concise content
  • Test your template with the preview feature in the dashboard
  • For significant changes, create a new template (order_confirmed_v2)