Skip to main content

Overview

Post-call WhatsApp functions send messages after AI calls end. You control exactly when messages send using conditions. Common Use Cases:
  • Appointment confirmations
  • Booking details
  • Follow-up surveys
  • Next steps documentation
  • Thank you messages

How It Works

[Call Ends] → [Conditions Checked] → [If Match: WhatsApp Message Sent]
Messages only send when all your conditions match (AND logic).

Configuration

Post-Call WhatsApp
1

Navigate to WhatsApp Tab

Go to your agent → WhatsApp configuration
2

Click Add

Click the Add button to create a new function
3

Select Type

Choose “After the Call (post-call)”
4

Enter Function Name

Use snake_case (e.g., appointment_confirmation)
5

Select Provider

Choose WhatsApp provider (Facebook, Heltar, or AI Sensy)
6

Select Template

Choose your WhatsApp message template
7

Map Variables

Connect template placeholders to call data
8

Set Conditions

Define when to send the message
9

Save

Save the function

Variable Sources

Post-call functions can use three variable sources:

1. Call Metadata

Customer information from your system. Example:
  • customer_name
  • customer_email
  • lead_id

2. Post-Call Variables

AI-extracted data from the call conversation. Example:
  • appointment_date - Date customer selected
  • appointment_time - Time customer selected
  • interested - Whether customer showed interest
  • confirmation - Whether customer confirmed

3. Static Values

Fixed text that doesn’t change. Example:
  • Company name
  • Support contact
  • Website URL

Variable Mapping Guide

Detailed guide on mapping template variables

Conditional Sending

Control when post-call messages send using conditions.

Call Type Filter

Options:
  • All - Send for all calls (default)
  • Connected - Only send for connected calls (duration > 0)
  • Not Connected - Only send for missed/failed calls

Variable Conditions

Add conditions based on:
  • Call Metadata - Customer data fields
  • Post-Call Variables - AI-extracted information
Logic: All conditions must match (AND) Example Conditions:
  • Call Type: Connected
  • Post-Call Variable: appointment_booked equals true
  • Call Metadata: lead_source equals "website"

Conditional Triggers

Complete guide on conditional message sending

Example: Appointment Confirmation

Function Name: appointment_confirmation Template: (WhatsApp template with 3 variables)
Hi {{1}}, your appointment is confirmed for {{2}} at {{3}}.

We'll see you then!
Reply CANCEL to cancel.
Variable Mapping:
  • {{1}} → Call Metadata: customer_name
  • {{2}} → Post-Call Variables: appointment_date
  • {{3}} → Post-Call Variables: appointment_time
Conditions:
  • Call Type: Connected (only for successful calls)
  • Post-Call Variable: appointment_booked equals true
Result: Message only sends when:
  1. Call was connected (customer answered)
  2. AND appointment was actually booked

Example: Follow-Up Survey

Function Name: satisfaction_survey Template:
Thanks for speaking with us, {{1}}!

Please rate your experience: [Survey Link]
Variable Mapping:
  • {{1}} → Call Metadata: customer_name
Conditions:
  • Call Type: Connected
  • Post-Call Variable: call_completed equals true

Provider-Specific Notes

WhatsApp (Facebook)

  • Templates must be approved by Meta
  • Create in Meta Business Manager
  • Only APPROVED templates available

Heltar

  • Templates from Heltar dashboard
  • No Meta approval needed

AI Sensy

Basic Plan:
  • Enter campaign name manually
  • Add variables as needed
Pro Plan:
  • Select from existing campaigns
  • Variables from campaign template

Best Practices

  • Add conditions - Don’t send to everyone, be selective
  • Connected calls - Usually filter for connected calls only
  • Verify data - Ensure post-call variables exist before using
  • Clear templates - Make messages actionable
  • Add opt-out - Include unsubscribe option for marketing messages
  • Test conditions - Verify messages send when expected
Start with simple conditions (connected calls + one variable), then add more as needed.

Multiple Messages

You can create multiple post-call functions with different conditions: Example Setup:
  1. Booking Confirmation - Only when appointment_booked = true
  2. Not Interested Follow-Up - Only when interested = false
  3. Callback Request - Only when callback_requested = true
Each function sends independently based on its own conditions.