> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Testing

> Test conversational agents via WhatsApp messaging - fast and cost-effective text-based testing

## What is WhatsApp Testing?

WhatsApp testing allows you to test your conversational agents through WhatsApp messages. This provides a text-based alternative to voice testing, making it faster and more cost-effective for workflow validation.

WhatsApp testing is useful for:

* Testing conversation logic and flow without voice calls
* Validating agent responses and decision-making
* Quick iteration on agent behavior
* Cost-effective bulk testing scenarios

> [!NOTE]
>
> **Template Message**: Due to WhatsApp's 24-hour conversation window constraints, you may see a template message at the beginning of conversations: *"Thank you for your order. Your order ID is xyz and has been received successfully."* This opens the conversation window and allows the test to proceed.

## Setting Up WhatsApp Testing

**1. Configure Agent Settings**

In your agent settings, go to Provider tab in right side, in the Connection section, select WhatsApp under CHAT.

![Agent Settings with WhatsApp Provider](https://mintcdn.com/vocera/jgU_15-26qRVL6Rl/images/whatsapp/agent-setting-whatsapp.png?fit=max\&auto=format\&n=jgU_15-26qRVL6Rl\&q=85\&s=564f0f82e5c37e82b48b86c1959d21c5)

**2. Add Phone Number**

In the Phone Number section, add the WhatsApp-enabled phone number for the agent.

**3. Run with WhatsApp**

Head to **Evaluators**, select your evaluator, and click **Run**.

In the **Configure Run** dialog, select **WhatsApp** and click **Run** to start your test.

![Configure Run with WhatsApp](https://mintcdn.com/vocera/jgU_15-26qRVL6Rl/images/whatsapp/run-test-whatsapp.png?fit=max\&auto=format\&n=jgU_15-26qRVL6Rl\&q=85\&s=04ab1c631a848c4d76e311749089bad1)

View your test results on the **Results Page**.

## Tool Support

When testing via WhatsApp, the following tools are available:

| Tool | Description |
| - | - |
| **End Call** | End the conversation at any point |
| **End Call Only on Transfer** | End conversation only when a transfer occurs |

## Example Use Cases

**Customer Support:**

```
You are a customer asking about store hours.
Ask politely and thank the agent when you get the information.
```

**Appointment Confirmation:**

```
You received a reminder about tomorrow's 2 PM appointment.
Confirm your attendance when asked.
```

## Timeouts and Behavior

WhatsApp tests automatically end after a timeout period if no response is received. The timeout is configured in your project settings.

When a timeout occurs, it appears in the transcript as: `Main agent-whatsapp-timeout`

## Best Practices

1. **Use for Workflow Testing** - Ideal for validating conversation logic without voice overhead

2. **Write Clear Instructions** - Be specific in evaluator prompts:
   ```
   ✅ Good: "Ask about appointment on Monday and provide ID APT-123 when asked"
   ❌ Vague: "Interact with the agent about an appointment"
   ```

3. **Verify WhatsApp is Enabled** - Ensure your phone number has WhatsApp enabled before testing

4. **Monitor Results** - Review transcripts via the Results API to verify conversation flow

## Troubleshooting

> [accordion] Test timeout occurred
>
> **Solutions:**
>
> * Check timeout settings in project configuration
> * Verify phone number is correctly configured
> * Ensure the phone number has WhatsApp enabled

> [accordion] WhatsApp not enabled
>
> **Solutions:**
>
> * Verify WhatsApp is enabled for your phone number
> * Ensure the phone number is correctly added in agent settings

> [accordion] No messages received
>
> **Solutions:**
>
> * Verify the phone number is WhatsApp-enabled
> * Check that the phone number is correctly configured in agent settings
> * Confirm the number format is correct

***

## Next Steps

* Learn about [SMS Testing](https://docs.cekura.ai/documentation/guides/testing-agents/sms-during-call.md) for voice-based text testing
* Explore [Test Profiles](https://docs.cekura.ai/documentation/key-concepts/evaluators/test-profile.md) for identity-based testing
* Review [Custom Metrics](https://docs.cekura.ai/documentation/key-concepts/metrics/custom-metrics.md) for conversation validation
* Check [Results API](https://docs.cekura.ai/api-reference/endpoint/results) for viewing test outcomes


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.