Sales Agent Deployment Guide
salesiq_bot/DEPLOY.md document
Updated: 2026-03-07 02:45
# Sales Agent Deployment Guide
## Quick Deploy
```bash
# 1. Copy files to droplet
cp /root/.openclaw/workspace/salesiq_bot/sales_agent.py /opt/kb_website/sales_agent.py
# 2. Check Anthropic API key exists
grep ANTHROPIC /opt/zoho-extract/.env || echo "ANTHROPIC_API_KEY=your-key-here" >> /opt/zoho-extract/.env
# 3. Install anthropic library
cd /opt/zoho-extract && source venv/bin/activate
pip install anthropic
# 4. Create systemd service
cat > /etc/systemd/system/sales-agent.service << 'EOF'
[Unit]
Description=ROLLerUP Sales AI Agent
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/kb_website
Environment=PATH=/opt/zoho-extract/venv/bin
ExecStart=/opt/zoho-extract/venv/bin/python sales_agent.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# 5. Start service
systemctl daemon-reload
systemctl enable sales-agent
systemctl start sales-agent
# 6. Add Caddy route (edit /etc/caddy/Caddyfile)
# Add this block:
#
# bot.rollerup.ca {
# reverse_proxy localhost:5001
# }
#
# Then: systemctl reload caddy
# 7. Update SalesIQ webhook URL to:
# https://bot.rollerup.ca/webhook/salesiq
```
## Test
```bash
# Health check
curl http://localhost:5001/health
# Test conversation
curl -X POST http://localhost:5001/webhook/salesiq \
-H "Content-Type: application/json" \
-d '{"visitor":{"id":"test123"},"message":{"text":"I want to buy security shutters"}}'
# Check conversation state
curl http://localhost:5001/conversations
```
## Logs
```bash
journalctl -u sales-agent -f
```
## Architecture
```
SalesIQ Chat
│
â–¼
Webhook (Flask :5001)
│
├──▶ KB Search (semantic/keyword)
│ │
│ ▼
└──▶ Claude AI ◀── Sales Persona Prompt
│ + KB Context
â–¼ + Conversation History
AI Response
│
â–¼
SalesIQ Reply
```
## Features
- **Conversational AI** - Claude generates natural responses
- **KB-Powered** - Searches your 47K+ embedded records for context
- **Lead Extraction** - Auto-detects name, phone, email, product interest
- **Memory** - Remembers conversation per visitor
- **Objection Handling** - Built-in scripts for common objections
- **Positive Language** - Avoids negative words
## Webhook URL for SalesIQ
After deployment, update your SalesIQ bot webhook to:
```
https://bot.rollerup.ca/webhook/salesiq
```