# 🚀 WhatsApp Agent - Quick Start Guide

## Setup dalam 5 Menit

### Step 1: Setup Admin Numbers (2 menit)

1. Buka browser:
   ```
   http://your-domain/mikhmon/setup_admin_whatsapp.php
   ```

2. Masukkan nomor admin (format 628xxx):
   ```
   628123456789,628987654321
   ```

3. Klik **Simpan**

✅ Admin numbers tersimpan!

---

### Step 2: Configure Webhook (1 menit)

1. Copy webhook URL:
   ```
   http://your-domain/mikhmon/api/whatsapp_agent_webhook.php
   ```

2. Paste di WhatsApp Gateway dashboard

3. Save webhook configuration

✅ Webhook configured!

---

### Step 3: Test (2 menit)

#### Test sebagai Admin:

Kirim WhatsApp ke bot:
```
HELP
```

Response:
```
👑 BANTUAN ADMIN BOT
...
```

Generate voucher:
```
GEN 3JAM 5
```

Response:
```
✅ VOUCHER ADMIN
...
🔑 ADMIN ACCESS - No balance deduction
```

#### Test sebagai Agent:

1. Daftar agent via admin panel
2. Set harga untuk profile
3. Topup saldo

Kirim WhatsApp:
```
SALDO
```

Response:
```
💰 INFORMASI SALDO
...
💵 Saldo: Rp 100,000
```

Generate voucher:
```
GEN 3JAM 2
```

Response:
```
✅ VOUCHER BERHASIL DI-GENERATE
...
💰 Saldo Anda: Rp 94,000
```

---

## 📋 Command Cheat Sheet

### Agent Commands
```
GEN 3JAM 5      → Generate 5 voucher
SALDO           → Cek saldo
TRANSAKSI       → Lihat history
HARGA           → Lihat harga
HELP            → Bantuan
```

### Admin Commands
```
GEN 3JAM 10     → Generate 10 voucher (no balance)
SALDO           → Admin info
HARGA           → Lihat profile
HELP            → Bantuan
```

---

## ⚠️ Troubleshooting

### "Nomor belum terdaftar"
→ Daftar sebagai agent atau tambah ke admin numbers

### "Saldo tidak cukup"
→ Topup saldo via admin panel

### "Harga belum diset"
→ Admin set harga via "Kelola Harga"

### Command tidak response
→ Cek webhook URL sudah benar

---

## 🎯 Next Steps

1. ✅ Setup admin numbers
2. ✅ Configure webhook
3. ✅ Test commands
4. 📚 Read full documentation: `WHATSAPP_AGENT_COMMANDS.md`
5. 🎓 Train agents how to use

---

**Ready to use!** 🎉

Agents can now generate vouchers directly via WhatsApp!
