WhatsApp Integration
Step-by-step guide to connecting your WhatsApp Business account to PalySales.
WhatsApp is the most popular channel on PalySales. Customers can browse products, ask questions, and place orders directly in a WhatsApp conversation with your AI assistant.
What You'll Need Before Starting
Before you begin the setup wizard, make sure you have:
- A Meta Business Account (free to create)
- A WhatsApp Business Platform app in Meta's developer portal
- A verified phone number for WhatsApp Business
- About 10-15 minutes to complete the setup
You'll collect four pieces of information from Meta during this process:
| Credential | What It Is | Where to Find It |
|---|---|---|
| Phone Number ID | A number that identifies your WhatsApp phone number in Meta's system | WhatsApp → Getting Started page in your Meta app |
| Business Account ID | Your WhatsApp Business Account identifier | Same page as above |
| Access Token | A secret key that lets PalySales send messages on your behalf | System Users → Generate Token in Meta Business Settings |
| App Secret | A secret key used to verify that incoming messages are really from WhatsApp | App Settings → Basic in your Meta app |
Setup Wizard (6 Steps)
In the left sidebar, click Settings → Channels. You'll see cards for each available channel. Click the WhatsApp card to open the setup wizard.
Step 1: Introduction
What you'll see: A welcome screen explaining what WhatsApp integration does and listing the requirements.
What to do: Review the requirements checklist, then click Let's Get Started at the bottom.
Step 2: Create Your Meta App
What you'll see: Numbered instructions for creating a Meta Developer app.
What to do:
- Open Meta for Developers in a new tab
- Click Create App and choose the Business type
- Give your app a name (e.g., "My Store WhatsApp")
- Add the WhatsApp product to your app
- On the WhatsApp Getting Started page, note your Phone Number ID and Business Account ID
Once you've created your app, click Continue at the bottom.
Step 3: Enter Your Credentials
What you'll see: A form with four fields: Phone Number ID, Business Account ID, Access Token, and App Secret.
What to do:
- Paste your Phone Number ID into the first field
- Paste your Business Account ID into the second field
- For the Access Token: go to your Meta Business Settings → System Users → create a system user (if you don't have one) → click Generate Token → select your WhatsApp app → grant the
whatsapp_business_messagingandwhatsapp_business_managementpermissions → copy the token - For the App Secret: in your Meta app, go to App Settings → Basic → click Show next to the App Secret → copy it
Important: The token generated on the WhatsApp "Getting Started" page expires in 24 hours. For production use, always generate a permanent token through System Users as described above.
Click Continue. PalySales will validate your credentials and generate a unique webhook verify token for your store.
Step 4: Configure the Webhook in Meta
What you'll see: Two values with copy buttons:
- Callback URL — something like
https://app.palysales.com/api/webhooks/whatsapp - Verify Token — a unique token starting with
pv_followed by random characters
What to do:
- In your Meta app, go to WhatsApp → Configuration
- Under Webhook, click Edit
- Paste the Callback URL into the "Callback URL" field
- Paste the Verify Token into the "Verify token" field
- Click Verify and Save — Meta will send a test request to verify the connection
- After verification succeeds, click the Subscribe toggle next to the messages field
Click Continue in PalySales.
Step 5: Test the Connection
What you'll see: A Test Connection button.
What to do: Click Test Connection. PalySales will call Meta's API to verify your credentials are working. Specifically, it checks:
- That your Access Token is valid
- That your Phone Number ID exists
- That Meta returns your verified business name and phone display
If the test passes, you'll see a green success message with your phone number displayed. If it fails, you'll see a specific error message — check the Troubleshooting section below.
Click Complete to finish.
Step 6: Done!
What you'll see: A success screen confirming WhatsApp is connected.
What to do: Click Go to Inbox to return to the channels page. Your WhatsApp card will now show as Connected with your phone number displayed.
Testing It Out
Send a message to your WhatsApp Business number from a personal phone. Within a few seconds, you should see:
- The message appear in your Inbox (click Inbox in the left sidebar)
- An AI-generated response sent back to your phone
If you don't see a response, check the Troubleshooting section.
How WhatsApp Messages Are Processed
Here's what happens when a customer sends you a message:
- WhatsApp delivers it to your webhook URL (the Callback URL from Step 4)
- PalySales verifies the signature — every message includes a
X-Hub-Signature-256header. PalySales uses your App Secret to verify this signature matches, confirming the message is genuinely from WhatsApp - Your store is identified by matching the Phone Number ID in the message
- The customer is matched by phone number (automatically normalized to international format). If it's a new customer, a record is created
- The message is saved with a unique key to prevent duplicates
- The AI generates a response using your product catalog, knowledge base, and conversation history
- The response is sent back through WhatsApp
Message Types the AI Can Send
| Type | Description |
|---|---|
| Text | Standard text responses with product descriptions, answers, etc. |
| Image | Product photos or AI-generated images |
| Quick Reply buttons | Up to 3 buttons for fast selection (e.g., "View Menu", "Place Order", "Talk to Human") |
| List menus | Multi-item menus for browsing products or selecting options |
How Media Messages Are Handled
| What the Customer Sends | What Happens |
|---|---|
| Voice note | Downloaded, transcribed to text using AI, then processed as a text message |
| Photo | Downloaded, analyzed by AI vision to understand what's in the image, then searched against your product catalog to find matching products |
| Video or document | Customer receives a polite message that this type isn't supported yet |
Security
Signature Verification
Every incoming message is verified to prevent fake messages:
- WhatsApp includes a
X-Hub-Signature-256header with each message - PalySales computes a matching signature using your App Secret
- If they don't match, the message is logged as a security event and silently rejected
PalySales always returns a success response to WhatsApp, even for invalid messages. This prevents WhatsApp from retrying failed deliveries and flooding your webhook.
Per-Store Isolation
- Each store has its own App Secret, Access Token, and Verify Token
- The same Phone Number ID cannot be used by two different stores
- Credentials are masked in the dashboard (only the last few characters are visible)
- Your webhook only processes messages from the environment where you connected it
Troubleshooting
"app_secret not configured"
Your App Secret isn't saved for this store. Go to Settings → Channels, click the WhatsApp card, and re-enter your App Secret from Meta's App Settings → Basic page.
Webhook verification failed in Meta
- Make sure the Verify Token in Meta matches exactly what PalySales shows — copy it again using the copy button
- Make sure the Callback URL is correct and starts with
https:// - If you're on a development environment, make sure the URL is publicly accessible
Test Connection failed
- "Invalid access token" — your token may have expired. Generate a new permanent token through System Users
- "Phone number not found" — double-check the Phone Number ID you entered
- "Token appears to be masked" — you need to re-enter the full access token, not the masked version shown in the dashboard
Messages not appearing in Inbox
- Make sure you subscribed to the messages webhook field in Meta (Step 4)
- Verify your Access Token hasn't expired (use a permanent System User token)
- Check that your store's subscription is active (trial or paid plan)
- Make sure you connected WhatsApp on the same environment you're checking (e.g., if you connected on
app.palysales.com, check the inbox there, not on a dev URL)
AI not responding to messages
- In the left sidebar, click AI Assistant and make sure the AI is enabled
- Check that the conversation isn't in Waiting status (handoff mode) — look for a yellow banner in the Inbox
- Verify you haven't exceeded your plan's AI conversation or message limit in Settings → Billing