Skip to content
Helpdesk Agent dev Tesoro 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
ComponentWhat
Twilio accountActive, with credit
WhatsApp Business profileApproved by Meta via Twilio
Registered WhatsApp numberSpecific for WhatsApp Business API; set in Settings → My Company → Call Settings
Twilio SID + TokenAPI credentials, configured by system administrator

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

In Tesoro, each template has:

FieldWhatValidation
TitleName to recognize3, 100 characters
DescriptionThe content that is sent3, 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.
ReasonExplanation
Misleading contentInaccurate or misleading info
No opt-outNo unsubscribe option for recipient
Prohibited contentGambling, alcohol, etc.
Incorrect formattingVariables 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:

FeatureTemplateFree-form
First message✅ mandatory
ContentPredefinedFree
Max length100 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
TypeExamples
DocumentsPDF, Word, Excel
ImagesJPEG, PNG, GIF, WebP
AudioMP3, OGG
VideoMP4
ArchivesZIP, 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

StatusWhat
queuedIn queue at Twilio
sentSent to WhatsApp
deliveredOn recipient device
readRecipient has read
failedNot delivered
  • Incoming message → notification to all users
  • Status change → live update in chat view (no page refresh)

ComponentExplanation
Twilio message ratePer message (in + out), varies by country
WhatsApp conversation ratePer 24-hour window, difference between business-initiated (template) and user-initiated (reply)
Template categoryMarketing > transactional > authentication
Media messagesAdditional costs depending on type + size

ActionWho
Send messages (free-form)Admin, Employee
Send messages (template)Admin, Employee
Read messagesAdmin, Employee
View templatesAdmin, 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.