Operations manual

Integrate · 06

AI and automation

Automation handles the repeatable work: content suggestions, customer assistance, lifecycle email, social publishing and scheduled operations. AI is optional and remains reviewable by staff.

IntegrateAIAutomationReviewed November 2026

AI Studio

/dashboard/ai/ generates and reviews content suggestions. With AI_PROVIDER=local the assistant uses deterministic local logic; with openai and an API key it can use the configured model. Generated copy is a draft until a staff member reviews and publishes it.

AI_PROVIDER=local
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini

Transcripts and generated runs are visible to staff. Do not paste customer secrets, full card data or private credentials into a prompt.

Customer assistance

The public fragrance advisor at /assistant/ answers from the live catalogue. The scent finder at /finder/ builds a shareable profile from a short quiz. Both use the same product data as the storefront; neither replaces a staff reply for order-specific questions.

Lifecycle automations

Newsletter automations run from the jobs timer and cover new subscribers, paid orders, abandoned bags, back-in-stock and inactive contacts. Each run records delivery and respects suppression and frequency settings. Campaigns can create a follow-up that targets non-openers only.

python manage.py run_email_automations
python manage.py send_email_campaigns --limit 10
python manage.py send_waitlist_notifications

Social scheduler

The scheduler at /dashboard/scheduler/ publishes due posts to configured X, LinkedIn, Meta/Instagram, Pinterest and TikTok adapters. A failed post records the attempt and can be retried. Publishing is idempotent per post/provider attempt, and provider credentials stay in the environment.

The jobs timer

perfumz-jobs.timer runs run_scheduled_jobs every five minutes. The command isolates each job so one failure does not stop the rest, then exits non-zero with the failing names. This replaces Celery beat without adding Redis or a worker service.

systemctl list-timers 'perfumz*'
sudo systemctl start perfumz-jobs.service
journalctl -u perfumz-jobs -n 100 --no-pager
.venv/bin/python manage.py run_scheduled_jobs --list

The jobs timer starts five minutes after boot and repeats every five minutes. A new deployment does not need a timer restart; the next run uses the new code.

Perfumz Operations Manual · English reference · Reviewed November 2026