Skip to content
HelpdeskAgentdevTesoro CRM

WhatsApp templates and Business API

WhatsApp requires that business messages work with rules, pre-approved templates for the first message, a 24-hour window for free-form messages, and limits on attachments. This is how it works in Tesoro via Twilio.

Template settings on the personal settings screen.
WhatsApp settings
  • First message to a contact fails, you are looking for the template rule
  • The 24-hour window has expired and you don’t understand why you can no longer send
  • You want to know what it costs

Tesoro does not communicate directly with WhatsApp:

  1. Tesoro → message to Twilio API
  2. Twilio → forward to WhatsApp Business API (whatsapp: prefix)
  3. WhatsApp → delivery to recipient
  4. Status updates (delivered, read, failed) back via Twilio webhooks
  5. Incoming messages → real-time to all team members
Component What
Twilio account Active, with credit
WhatsApp Business profile Approved by Meta via Twilio
Registered WhatsApp number Specific for WhatsApp Business API; set in Settings → My Company → Call Settings
Twilio SID + Token API credentials, configured by system administrator

Pre-approved message formats. Mandatory for the first message to a contact.

In Tesoro, each template has:

Field What Validation
Title Name to recognize 3, 100 characters
Description The content that is sent 3, 100 characters

Auto-loaded when you open the WhatsApp tab on a record. Available for Admin and Employee.

  1. WhatsApp tab of contact/deal/lead/relation.
  2. No conversation history? → system asks template selection.
  3. Choose from dropdown (title visible).
  4. Get Starteddescription is sent as message text.
  5. Message logged with delivery status, Twilio SID, and direction.

  1. Create template: in Twilio or Meta Business Manager. Text + category (marketing, transactional, authentication) + variables.
  2. Review by Meta: minutes to days.
  3. Approval/rejection: Twilio dashboard or Meta Business Manager shows status.
  4. Registration in Tesoro: approved templates appear in dropdown.
Reason Explanation
Misleading content Inaccurate or misleading info
No opt-out No unsubscribe option for recipient
Prohibited content Gambling, alcohol, etc.
Incorrect formatting Variables or formatting do not meet technical requirements

  • When: first message or after expired 24-hour window
  • How: select template, system sends description
  • Attachments: not supported

Comparison:

Feature Template Free-form
First message ✅ mandatory
Content Predefined Free
Max length 100 characters (template limit) 1,600 characters
File attachments ✅ (up to 10)
Approval required ✅ (Meta)

WhatsApp rule to prevent spam.

  1. You send template message → conversation opened.
  2. Contact replies → 24-hour window starts.
  3. 24 hours long → you can send free-form messages without template.
  4. No reply within 24h → window closes. New template needed to reopen conversation.

Trying to send free-form message after 24 hours? WhatsApp rejects.

  1. Go back to template selection.
  2. Choose approved template.
  3. Send, window reopens.
  4. Wait for reply for free-form messages.

Only with free-form messages, not with templates.

How Tesoro processes it:

  • Each file = separate WhatsApp message via Twilio with mediaUrl
  • Text = separate message
  • Files stored in Tesoro + linked to message record
Type Examples
Documents PDF, Word, Excel
Images JPEG, PNG, GIF, WebP
Audio MP3, OGG
Video MP4
Archives ZIP, RAR

Limits: max 10 files per message, 1.5 MB each.

Contact sends file → Tesoro:

  1. Detects via Twilio NumMedia webhook
  2. Downloads from Twilio media URL
  3. Saves in Tesoro with correct extension (from MIME type)
  4. Links to message record + contact

Status What
queued In queue at Twilio
sent Sent to WhatsApp
delivered On recipient device
read Recipient has read
failed Not delivered
  • Incoming message → notification to all users
  • Status change → live update in chat view (no page refresh)

Component Explanation
Twilio message rate Per message (in + out), varies by country
WhatsApp conversation rate Per 24-hour window, difference between business-initiated (template) and user-initiated (reply)
Template category Marketing > transactional > authentication
Media messages Additional costs depending on type + size

Action Who
Send messages (free-form) Admin, Employee
Send messages (template) Admin, Employee
Read messages Admin, Employee
View templates Admin, Employee

  • Template does not appear: check title + description (both 3, 100 characters). Possibly not registered in Twilio.
  • “The selected template doesn’t match our records”: template ID no longer exists (deleted?).
  • Message rejected after 24 hours: window expired. Send new template.
  • Attachments not possible with template: use free-form message (after contact reply).
  • “Company with Twilio WhatsApp number attached not found”: number in Twilio webhook does not match any company. Check Settings → My Company → Call Settings.