generalbots/bottemplates/crm/marketing.gbai/marketing.gbdialog/list-campaigns.bas
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00

44 lines
1.1 KiB
QBasic

PARAM status AS STRING LIKE "draft" DESCRIPTION "Filtro de status (draft, scheduled, sending, sent, completed)" OPTIONAL
PARAM limit AS INTEGER LIKE 10 DESCRIPTION "Número máximo de campanhas a exibir" OPTIONAL
DESCRIPTION "Lista as campanhas de marketing."
IF NOT limit THEN
limit = 10
END IF
url = "/api/marketing/campaigns?limit=" + limit
IF status THEN
url = url + "&status=" + status
END IF
campaigns = GET url
count = UBOUND(campaigns)
IF count = 0 THEN
TALK "Nenhuma campanha encontrada."
RETURN
END IF
TALK "📊 **Campanhas — " + count + " resultado(s)**"
FOR EACH c IN campaigns
TALK "---"
TALK "**" + c.name + "** (" + c.status + ")"
TALK "📣 Canal: " + UCASE(c.channel)
TALK "🔑 ID: " + c.id
IF c.scheduled_at THEN
TALK "🕒 Agendada: " + c.scheduled_at
END IF
IF c.metrics THEN
TALK "📈 Enviados: " + c.metrics.sent + " | Erros: " + c.metrics.failed
IF c.channel = "email" THEN
TALK " Aberturas: " + c.metrics.opened + " | Clicks: " + c.metrics.clicked
END IF
END IF
NEXT c
RETURN campaigns