# 📘 User Manual — Bobex Communication Center

> Step-by-step guide for operators, managers and admins (not developers).

---

## 🚪 1. Sign in

URL: **http://51.68.45.142:5000**

- **Email**: e.g. `admin@bobex.local` (leave empty to use the shared password)
- **Password**: provided by your admin
- Pick a language at the top: **FR / NL / EN / AR**

> 🛡️ Every API call is token-protected. No one can read data without an account.

---

## 🗺️ 2. Dashboard map

| Icon | Section | What it does |
|---|---|---|
| 📊 | **Dashboard** | KPIs + 4 live charts |
| 📞 | **Calls** | Table of every call + AI analysis |
| 🧠 | **Customers** | Light CRM with per-number memory |
| 🔀 | **Extensions** | Manage internal numbers (101–104) |
| 📈 | **AI Analytics** | Period reports powered by AI |
| 🚨 | **Alerts** | Auto-generated (negative sentiment, repeated transfers…) |
| 📑 | **Knowledge base** | FAQ injected into the AI system prompt |
| 🔄 | **Transfers** | Leaderboard of transfers per extension |
| ⚙️ | **Settings** | Business hours + agent availability |
| 👥 | **Users** | Account management *(admin only)* |
| 📚 | **History** | All stored conversations |

---

## 📞 3. Call flow

1. Customer calls **+322 886 0449**
2. Bilingual greeting plays: *"Bonjour, goeiedag…"*
3. AI detects the language and continues in it (FR/NL/EN/AR/…)
4. If the customer asks for someone specific:
   - *"I'd like to speak to the manager"* / *"المدير"*
   - AI announces: *"Transferring you, one moment"*
   - Routes to **Extension 104** (manager's phone)
5. If the manager picks up → direct conversation
6. Audio + transcript + stats are saved automatically

---

## 🧠 4. Customers section (CRM)

### View a customer
1. Open **Customers**
2. Pick from the list on the left → full profile on the right
3. You'll see:
   - 📊 Total calls, talk time, dominant language, sentiment
   - 🧠 **Memory facts** the AI reuses
   - 📞 Call history; each call has:
     - **💬** Written transcript
     - **💿** Play the audio recording
     - **📝** Manual notes + tags
     - **🤖 Analyze** AI report

### Add a memory fact
- Under "Memory facts": type what the AI should remember (e.g. *"prefers English"*)
- Pick category and importance
- Press **+**
- ✅ On the next call the AI will know

### Call the customer (Outbound)
- **📞 Call** button in the profile
- Asks your extension (e.g. 104)
- Your phone rings first, then the system dials the customer

### Search transcripts
- Field **🔎 Search transcripts…**
- Type a word → modal listing every call containing it with highlighted excerpts

---

## 🤖 5. AI Analytics (3 levels)

### Level 1 — Single call analysis
**🤖 Analyze** button on any call → executive summary + intent + sentiment + key takeaways + action items + resolution + QA checks.

### Level 2 — Customer journey
**📊 Journey** button in a customer profile → recurring topics + satisfaction trend + pain points + opportunities + recommended actions.

### Level 3 — Period report
**AI Analytics** → pick 24h / 7d / 30d → **Generate** → CSAT, trending topics, prompt-improvement suggestions.

### Export
- **🖨 PDF** opens the print dialog (Save as PDF)
- **📋 JSON** copies raw report

---

## 🚨 6. Alerts

Automatic when:
- ❗ Negative sentiment detected
- ❗ Same caller transferred ≥3 times in 24h
- ❗ Long call (>10 min)
- ❗ Technical error on a call

A **🔴 badge** appears in the sidebar. Click **✓** to acknowledge.

---

## 📑 7. Knowledge base

Where you store Q/A that the AI will use automatically.

1. **Knowledge base** section
2. Type a question + answer
3. Pick category + priority
4. Press **+**
5. ✅ Next call: if a customer asks something matching, AI paraphrases your answer naturally

Entries can be **OFF/ON** without deletion.

---

## ⏰ 8. Settings

### Business hours
- For each day: opening + closing time
- ✅/❌ to enable the day
- **Outside hours**: AI tells the customer the office is closed and does not transfer

### Agent availability
When an agent is on leave:
1. Find their extension (e.g. 104)
2. Uncheck "Available"
3. Type a reason
4. Set a return date
- ✅ AI won't transfer to that extension until then

---

## 🔀 9. Extensions

- Edit name/role/description inline → auto-saved (0.5s debounce)
- ON/OFF per extension
- **+ Add** to create a new one (also requires Zadarma configuration)

⚠ Rename effect: change 104 from "Manager" to "Boss" → next call, if customer says "boss" AI routes correctly.

---

## 👥 10. Users (admin only)

### Roles
| Role | Permissions |
|---|---|
| **admin** | Everything + manage users + settings |
| **operator** | Read + write CRM/notes + transfers |
| **viewer** | Read-only |

### Add an employee
Form at the top: email + name + password + role + language → **+**

### Reset a password
**🔑** button on the user row

### Disable / delete
- Uncheck "enabled" to suspend without deletion
- **×** to delete (can't delete yourself)

---

## 📚 11. History

Every stored conversation:
- 🔎 Search by number or free text
- 📅 Date filters
- ⬇ JSON export
- 🗑️ Delete one or all
- **💬** full transcript, **🤖** AI analysis

---

## 💰 12. Costs

In the **System summary** on the dashboard:
- Total cost (USD), voice vs analysis breakdown
- 24h / 7d / 30d windows
- Total audio minutes

Reference rates:
- **Voice (Bobex AI Live audio)**: ~ $0.029 / minute
- **Text analysis (Bobex AI)**: ~ $0.003 / report

Tunable via env variables.

---

## 🔐 13. Security

- Password gate on the login page
- 24h sliding-TTL session tokens
- Transfers restricted to 101–104 (strict whitelist)
- Per-caller isolation (AI cannot read another caller's data)
- Passwords stored as scrypt hashes

---

## 🆘 14. Troubleshooting

| Symptom | Fix |
|---|---|
| Can't log in | Ask admin to reset your password |
| Report in wrong language | Switch the language *before* generating |
| Dashboard looks stuck | Press `Ctrl+Shift+R` (hard refresh) |
| No audio recording | File is created at end-of-call, not during |
| AI doesn't remember a customer | Make sure the number isn't "unknown" |

---

## 📞 Support

- **WhatsApp**: +32 …
- **Email**: tech@bobex.com

---

*Last updated: 2026-05-26 — version 2.1 (multi-tenant, MP3 recordings, PWA)*
