Set up WhatsApp Business

This guide goes with the WhatsApp configuration page (Settings → Integrations → WhatsApp → Configure). The steps are numbered the same way as the hints under each field. Allow 1-3 days, because Meta reviews business verification and templates by hand; if you want to start now, Telegram needs none of this.

1. What the page asks for

Under “Basic Configuration”, an “Integration Name” and the “Environment”. Under “Credentials”, four pieces of Meta data: the “Phone number ID” (step 4), the “Access token” (step 5), the “App secret” (step 6) and the “Webhook verify token”, which you make up (step 7).

Saving with “Save Configuration” makes “Test Connection” appear. Then each user turns WhatsApp on in their notification preferences: the “Go to notification preferences” link takes you there.

2. Steps 1 to 3: Meta Business account, verification and app

Step 1. Go to business.facebook.com with your Facebook account and create a business portfolio (company name, your name and a company email).

Step 2. In “Business settings → Security centre → Business verification”, upload the company tax ID and proof of address. Meta takes 2-4 days; until verified you can only send in test mode.

Step 3. In developers.facebook.com → “My apps” → “Create app”, choose the “Connect with customers through WhatsApp” use case, name it and link it to your portfolio.

3. Steps 4 to 6: number, token and app secret

Step 4. In “API Setup”, in the “From” drop-down, press “Add phone number” and verify it by SMS or call. The number cannot already have WhatsApp installed. Its ID appears below: copy it into “Phone number ID”.

Step 5. The “API Setup” token expires in 24 h. In “Business settings → System users” create an admin system user, assign it the app and the WhatsApp account, press “Generate token” with expiry “Never” and the permissions whatsapp_business_messaging, whatsapp_business_management and business_management. Copy it (it starts with EAA…) into “Access token”: it is shown only once.

Step 6. In the Meta app, “Settings → Basic”, press “Show” next to the app secret and copy it into “App secret”.

4. Steps 7 and 8: verify token and save

Step 7. Make up a long random string (32 characters or more) and enter it in “Webhook verify token”. You will use it again in step 9 and it must match.

Step 8. Press “Save Configuration” and then “Test Connection”. If the token and the number are right, the integration becomes active.

5. Step 9: the status webhook (recommended)

It lets goPrevina know whether each message was delivered or read. In the Meta app, “WhatsApp → Configuration → Webhooks → Edit”. In “Callback URL” enter https://<your-API-domain>/api/v1/whatsapp/webhook and in “Verify token” the same value as in step 7. Press “Verify and save” and, under “Webhook fields”, subscribe to messages.

6. Step 10: message templates to copy and paste

WhatsApp only lets you send templates approved by Meta. Create them in WhatsApp Manager → “Message templates” → “Create template”, with the exact name and the category shown, and paste the body as it is (the {{1}}, {{2}}… parameters follow the order of the list). Meta usually approves UTILITY templates in 24-48 h.

prl_user_invitation — Category: UTILITY — Parameters: recipientName, tenantName, activationUrl

Body to copy: Hi {{1}}, you've been invited to {{2}} on goPrevina. Activate your account here: {{3}}

prl_password_reset — Category: AUTHENTICATION — Parameters: recipientName, resetUrl

Body to copy: Hi {{1}}, you requested a password reset. Use this link: {{2}}

prl_critical_alert — Category: UTILITY — Parameters: alertTitle, alertMessage

Body to copy: CRITICAL ALERT: {{1}}. {{2}}

prl_document_expiring — Category: UTILITY — Parameters: documentName, expiryDate, daysRemaining

Body to copy: Document "{{1}}" expires on {{2}} ({{3}} days left). Review it in goPrevina.

prl_document_expired — Category: UTILITY — Parameters: documentName, expiryDate

Body to copy: Document "{{1}}" expired on {{2}}. Update it in goPrevina.

prl_incident_reported — Category: UTILITY — Parameters: incidentNumber, title, location

Body to copy: New incident {{1}}: "{{2}}" at {{3}}. Review it in goPrevina.

prl_incident_assigned — Category: UTILITY — Parameters: incidentNumber, title, assignedBy

Body to copy: Incident {{1}} assigned to you: "{{2}}" (by {{3}}). Open it in goPrevina.

prl_inspection_scheduled — Category: UTILITY — Parameters: inspectionTitle, scheduledDate, location

Body to copy: Inspection scheduled: "{{1}}" on {{2}} at {{3}}.

prl_inspection_reminder — Category: UTILITY — Parameters: inspectionTitle, dueDate

Body to copy: Reminder: inspection "{{1}}" is due on {{2}}.

prl_training_reminder — Category: UTILITY — Parameters: courseName, sessionDate, location

Body to copy: Training reminder: "{{1}}" on {{2}} at {{3}}.

prl_medical_appointment — Category: UTILITY — Parameters: appointmentDate, appointmentTime, location

Body to copy: You have a health-surveillance appointment on {{1}} at {{2}} in {{3}}.

prl_meeting_invitation — Category: UTILITY — Parameters: meetingTitle, meetingDate, organizer

Body to copy: Meeting: "{{1}}" on {{2}}, organised by {{3}}.

prl_notification — Category: UTILITY — Parameters: title, message

Body to copy: {{1}}: {{2}}

prl_generic — Category: UTILITY — Parameters: dynamic

Body to copy: {{1}}