whatsapp_template

Allows the creation of messages from WhatApp Templates.

whatsapp_template(name=String, components=Array, language=String)

Create a template

In order to create a WhatsApp Template, read this guide.

Platforms

Platform
Supported

Messenger

WhatsApp

Telegram

Usage

@reply.whatsapp_template("hello_world")

On Demand

user = User.first
user.notification.whatsapp_template(
  "sample_issue_resolution",
  [
    {
      type: :body,
      parameters: [
        {
          type: :text,
          text: "Martín"
        }
      ]
    }
  ] 
)
user.send

Params

Name
Description

name String

Required.

Name of the template.

components Array

Optional. Array of components objects containing the parameters of the message. Read more.

language String

Optional. Contains a language object. Specifies the language the template may be rendered in. By default: "en_US".

Learn more about WhatsApp Templates in the official documentation.

Last updated