The Kapso WhatsApp Sandbox provides a dedicated phone number allowing you to test your AI agents directly within WhatsApp without needing to configure your own WhatsApp Business number during development.

How it Works

The sandbox system separates phone number authorization from message routing configuration:

  1. Sandbox Sessions authorize specific phone numbers to use the sandbox
  2. Sandbox WhatsApp Configuration determines how messages are routed (to agents, flows, or webhooks)

Workflow

  1. Configure Routing: Associate your sandbox WhatsApp configuration with the agents, flows, or webhooks you want to test
  2. Create a Sandbox Session: Create a new session with your test phone number through the web UI
  3. Receive Activation Details: You’ll receive an activation code and the sandbox WhatsApp number (as a wa.me link)
  4. Activate the Session: Send the activation code as a message to the sandbox WhatsApp number from your test phone
  5. Test Your Configuration: Messages sent to the sandbox number will be routed according to your configuration

Setting Up Message Routing

Before creating sandbox sessions, configure how messages should be handled:

  1. Navigate to your project’s WhatsApp configurations
  2. Find or create the “Sandbox WhatsApp” configuration
  3. Set up routing by:
    • For Agents: Associate the configuration as the primary WhatsApp config for your agent
    • For Flows: Create inbound message triggers linked to the sandbox configuration
    • For Webhooks: Configure webhooks in the sandbox configuration settings

Creating a Sandbox Session

To authorize a phone number for testing:

  1. Go to the WhatsApp Sandbox page in your project
  2. Click “Add Test Number”
  3. Enter the phone number you’ll use for testing
  4. You’ll receive:
    • A unique activation code
    • The sandbox WhatsApp number (as a wa.me link)
    • Instructions for activation

Important Notes

  • Sandbox sessions only authorize phone numbers to use the sandbox
  • Message routing is determined by the sandbox WhatsApp configuration
  • Multiple phone numbers can be authorized to test the same configuration
  • Sessions remain active until manually deleted or expired

[web]