Manage Your WhatsApp Business from Joomla

You can manage your WhatsApp Business Account (WABA) from Joomla website and send automatic messages to your users.

Step 1: Facebook (Meta) Channel Integration

The first step is to create a channel of type Facebook and then establish connection to the Facebook.

Click Here for Details

Then under the Options Tab > Services, select WhatsApp.

Step 2: Configuration and Testing

From the Facebook developers page, navigate to Use cases. Then, add Use case "Connect with Customers through WhatsApp".

Under Use cases, click Customize > Integrate with API.

Step 1. Try it out: Send a message from your test number to understand how WhatsApp API works.

Click "Generate token" to get access token and provide required permissions.

To send a message from your test number, select a recipient number and message. Click "Send message". You should receive test message to your WhatsApp recipient.

Step 2. Production setup: Set up your phone number to contact your customers through WhatsApp APIs.

To find the ID of a WhatsApp Business Account, go to Business Manager > Business Settings > Accounts > WhatsApp Business Accounts.

Add WhatsApp Business account ID and Phone Number ID under the Channel options.

Step 3: Update System User Access Token

Navigate to Business Settings > Users > System Users. Click the three dots and Assign assets. Assign WhatsApp accounts with Full control.

Generate the token again with updated permissions. Update the generated token under Channel options.

To check if the integration is successful, while viewing channel:

  • You should see the updated scoped for the System User
  • WhatsApp Business Account details will be displayed.

Step 4: Send Message from API

From the Channels dashboard, click WhatsApp. Under Templates tab, click "Send Message".

There are two types of messages that can be sent:

  • Text Messages: These free-text messages can be sent to users who have messaged you (Customer Service Window).
  • Template Messages: These are predefined message with placeholders. You can create templates from WhatsApp Manager.

Send WhatsApp Message

To: Enter the phone number with country code.

Message Type: Select the type of message - Text or Template.

Text Message: For message type as text, enter the message.

Template Name: Enter the name of the template.

Header Parameters: Enter comma separated values for header placeholders.

Body Parameters: Enter comma separated values for message body placeholders.

Step 5: Configure Webhook

This will allow the component to receive WhatsApp messages.

Callback URL

https://domain.com/index.php?option=com_tftools&task=facebook.webhook&id=<channel_id>&format=raw

Replace domain.com with your domain name and <channel_id> with the ID of back-end channel.

Verify Token

This is the same as the Cron Token in the component options.

Click "Verify and save". Subscribe to the messages Webhook.

Step 6: Add Task

Now, we add task to get the data and perform multiple actions when Facebook will send the message alert.

From the component dashboard, navigate to the Tasks. Create a new task:

  • Trigger: Facebook Alerts
  • Action: Send Email - Turn on Debug mode to see what is included in the data.

Click on the "Test" from Facebook developer webhook configuration to test it.

Other Possible Actions

  • Store the message in the database
  • Reply to the message

More About WhatsApp API

WhatsApp Business Account (WABA): It represents your business, storing metadata and linking to phone numbers, templates, and analytics.

Business Phone Numbers: Business phone numbers, real or virtual, are used for sending and receiving WhatsApp messages.

Message Templates: Templates are customizable messages that you can construct before sending them. Only template messages can be sent to WhatsApp users outside of a customer service window.

WhatsApp Manager: WhatsApp Manager is used for managing WABAs, phone numbers, templates, and reviewing analytics.

Customer Service Window: When a WhatsApp user messages you, a 24-hour timer called a customer service window starts. If the user messages again before the timer expires, the timer resets to 24 hours. During a customer service window, you can send any message (text or template).

Templates: Template messages are the only type of message that can be sent to WhatsApp users outside of a customer service window, so templates are used when when you need to message a user, but no customer service window is open between you and the user.

  • Category: Each template is categorized as authentication, marketing, or utility.
  • Components: Templates are made up of text, media, and interactive UI components.

Templates are made up of four parts: header, body, footer, and buttons. The only required part is body.

  • Text header: Each template can include only one text header.
  • Body: It represents the core text of your message template and is a text-only. It can include multiple parameters or variables.
  • Footer: Footers are text-only components that appear immediately after the body.
  • Buttons: Buttons are perform specific actions when tapped.
    • Copy code
    • Multi-product message
    • One-time password
    • Voice call
    • Phone number
    • Quick reply
    • Single-product message (SPM)
    • URL

Ice Breakers: Ice breakers are customizable, tappable text strings that appear in a message thread the first time you chat with a user.

Commands: Commands are text strings that WhatsApp users can see by typing a forward slash in a message thread with your business.