Skip to content

Directus Guide

This guide explains how to use Directus Data Studio to manage your buyer intent platform content, leads, campaigns, and configuration.

Directus is an open-source headless CMS and data platform that provides a powerful admin interface (Data Studio) for managing your content without writing code. In this platform, it serves as your central management hub for:

  • Managing leads and contact data
  • Creating and tracking marketing campaigns
  • Building audience segments with dynamic rules
  • Configuring AI prompts and automation
  • Managing team members and permissions
  • Organizing documents and media files
  1. Navigate to your Directus URL (check with your administrator)
  2. Log in with your credentials
  3. You’ll see the main dashboard with all your collections

Collections are like tables in a database — they hold specific types of content. Your platform includes:

Main Data Collections:

  • Leads — Contact information, intent data, company details
  • Campaigns — Marketing campaigns with QR tracking and email content
  • Segments — Dynamic audience groups based on rules
  • Notes — Internal notes and annotations

AI & Automation:

  • AI Prompts — Prompt templates for AI interactions
  • Integrations — Third-party service connections

Configuration:

  • Settings — Platform-wide configuration settings
  • Globals — API keys and service credentials (Twilio, OpenAI, N8N)
  • Teams — Organization accounts with subscription info
  • Users — Team member accounts and roles

Supporting Data:

  • Documents — File storage and document management
  • Activity Logs — Audit trail of all platform actions
  • Deduplication Audits — Duplicate detection records
  • QR Tracking Events — QR code scan analytics

Fields are the individual pieces of information in each collection item. For example, a lead has:

  • Email (text)
  • Company Name (text)
  • Intent Score (number)
  • Intent Topics (list)
  • Status (dropdown: new, qualified, contacted, etc.)
  • Location (city, state, country)
  • Team assignment (relationship to Teams)

Items are individual records within a collection. For example:

  • A specific lead contact is an item in the Leads collection
  • A marketing campaign is an item in the Campaigns collection

Leads are the core of your platform — they represent potential buyers with intent data.

  1. Navigate to Leads Collection
    • Click “Leads” in the sidebar
    • You’ll see a list of all leads
  2. Create New Lead
    • Click “+ Create Item”
    • Fill in required fields: Email address, Company name, Team assignment
    • Add optional information:
      • Name (first_name, last_name)
      • Contact details (phone, additional emails)
      • Job information (job_title, department)
      • Company data (company_size, industry, revenue_range)
      • Location (address, city, state, zip_code, country)
      • Intent data (intent_topics, intent_score, intent_keywords)
  3. Save Your Work
    • Click “Save” to create the lead
    • Lead becomes searchable immediately

Intent data shows buying signals:

  • Intent Topics — Topics the lead is researching (list)
  • Intent Score — 0–100 score indicating buying readiness
  • Intent Strength — Categorical strength (low, medium, high)
  • Intent Recency — Days since last intent signal
  • Intent Keywords — Specific keywords they’ve searched

The platform automatically manages duplicate leads:

  • is_canonical — True if this is the primary lead record
  • canonical_lead_id — Points to the main lead if this is a duplicate
  • duplicate_group_id — Groups related duplicate leads
  • confidence_score — Confidence level of duplicate match

Track lead lifecycle:

  • status — Current stage (new, qualified, contacted, etc.)
  • quality_score — Lead quality rating (0–100)
  • is_suppressed — Marked as do-not-contact
  • engagement_count — Number of interactions
  • last_engaged_at — Most recent engagement date

Campaigns drive your outreach efforts with email, QR codes, and tracking.

  1. Navigate to Campaigns
    • Click “Campaigns” in the sidebar
    • View existing campaigns and their performance
  2. Create New Campaign
    • Click “+ Create Item”
    • Fill in campaign details:
      • name — Campaign title
      • status — draft, active, paused, completed
      • campaign_type — email, direct_mail, etc.
      • target_segment_id — Link to audience segment
  3. Configure Campaign Content
    • subject_line — Email subject
    • html_content — Rich text email body
    • cta_url — Call-to-action link
    • qr_code_id — Unique QR code identifier
    • qr_code_url — QR landing page URL
  4. Enable Integrations (optional)
    • use_sendspark — Enable video messaging
    • use_firstclass — Enable direct mail

Monitor campaign performance:

  • total_contacts — Total audience size
  • sent_count — Number sent
  • qr_scans — Total QR code scans
  • qr_unique_scans — Unique scanners
  • launched_at — Campaign start date

Segments are dynamic audience groups based on rules. They automatically update as lead data changes.

  1. Navigate to Segments — Click “Segments” in the sidebar

  2. Create New Segment

    • Click “+ Create Item”
    • Set basic info:
      • name — Segment name (e.g. “High Intent - Tech Industry”)
      • segment_type — static or dynamic
      • team_id — Team ownership
  3. Define Segment Rules — Click into the rules field (JSON editor) and define filtering logic:

    {
    "intent_score": { "gte": 70 },
    "industry": { "in": ["Technology", "SaaS"] },
    "status": { "eq": "qualified" }
    }
  4. Activate Segment

    • Set is_active to true
    • System calculates segment_size automatically
    • View last_recalculated_at for freshness

High Intent Leads:

{
"intent_score": { "gte": 80 },
"is_suppressed": false
}

Recent Engagers:

{
"last_engaged_at": { "gte": "2024-01-01" },
"engagement_count": { "gte": 3 }
}

Geographic Targeting:

{
"state": { "in": ["CA", "NY", "TX"] },
"company_size": { "in": ["100-500", "500+"] }
}

AI Prompts are templates for AI-powered interactions and content generation.

  1. Navigate to AI Prompts — Click “AI Prompts” in the sidebar
  2. Create New Prompt
    • name — Descriptive prompt name
    • slug — URL-friendly identifier
    • status — draft, published, archived
    • description — What this prompt does
  3. Configure System Prompt
    • system_prompt — Base instructions for the AI
    • Use markdown formatting
    • Example: “You are a helpful sales assistant…”
  4. Add Message Examples
    • messages — Array of example interactions
    • Each message has role (user or assistant) and text (message content with {{placeholders}})

AI prompts support dynamic data:

Generate an email for {{first_name}} at {{company_name}}.
Their intent topics are: {{intent_topics}}.
Intent score: {{intent_score}}/100.

When executed, placeholders are replaced with actual lead data.

  1. Navigate to Directus Files — Click “File Library” in the sidebar to view all uploaded files
  2. Upload New Files — Click “Upload Files” or drag-and-drop. Organize into folders: Campaign Assets, Lead Documents, Templates, Reports
  3. File Metadata
    • Title — Descriptive name
    • Description — File purpose
    • Tags — Keywords for searching
    • Folder — Organizational folder

The Globals collection stores platform-wide API credentials:

Twilio (SMS/Voice): twilio_account_sid, twilio_auth_token, twilio_caller_id, twilio_app_sid

OpenAI (AI Features): openai_api_key

Integration URLs: n8n_url (Automation platform), directus_url (CMS URL), site_url (Main application URL)

Security Note: These are sensitive credentials. Only administrators should edit.

The Settings collection uses key-value pairs:

  • key — Setting identifier
  • value — JSON or text value
  • section — Grouping (e.g. “email”, “notifications”)
  • status — draft, published, archived

Common settings: Email templates, Feature flags, UI configuration, Default values

Teams represent customer organizations:

  • name — Organization name
  • plan_name — Subscription tier
  • subscription_status — active, canceled, past_due
  • stripe_customer_id — Stripe customer reference
  • stripe_subscription_id — Stripe subscription reference

User accounts for team members:

  • name — Full name
  • email — Login email
  • role — Team role (admin, member, viewer)
  • is_admin — Platform administrator flag
  • deleted_at — Soft delete timestamp (null if active)

Most collections support status workflows:

  1. Draft Status — Work in progress, not used in production, safe to experiment
  2. Published Status — Active and in use, available to platform features, can still be edited
  3. Archived Status — No longer active, retained for history, can be restored

For items with a status field:

  1. Select the item
  2. Change status dropdown
  3. Save changes
  1. Use the search bar in any collection
  2. Searches across key fields (email, name, company)
  3. Results appear instantly

Filter Leads by Intent Score:

  1. Click filter icon
  2. Add condition: “intent_score” greater than or equal to “80”
  3. Apply filter

Filter Campaigns by Status:

  1. Add condition: “status” equals “active”
  2. Combine with date range: “launched_at” is after “2024-01-01”

Filter Leads by Location:

  1. Add condition: “state” in [“CA”, “NY”, “TX”]
  2. Add condition: “country” equals “US”
  1. Configure filters
  2. Click “Save Preset”
  3. Name it (e.g. “High Intent CA Leads”)
  4. Access from presets dropdown anytime

One lead belongs to one team:

  • Lead → team_id → Team
  • Select team from dropdown when editing lead

One team has many leads:

  • View all team’s leads in Team detail page
  • Automatically shows related leads

Some relationships use junction tables:

  • Segment Membershipsegment_leads links segments to leads (automatically managed by segment rules)
  • Team Membersteam_members links users to teams (defines user access per team)

The Activity Logs collection tracks who performed actions, what changed, when it happened, and the full change history.

To view activity:

  1. Navigate to Activity Logs
  2. Filter by user, date, or entity
  3. View detailed change records

The Deduplication Audits collection records when duplicates were detected, confidence scores, merge decisions, and who approved merges.

Track QR code engagement:

  • campaign_id — Which campaign
  • lead_id — Who scanned (if identified)
  • scan_time — When scanned
  • location — Geographic data
  • device_info — Device type

To view QR analytics:

  1. Navigate to QR Tracking Events
  2. Filter by campaign
  3. Export for reporting
  1. Select multiple items with checkboxes
  2. Click bulk actions dropdown
  3. Choose “Update Status”
  4. Select new status
  5. Confirm changes
  1. Filter to desired items
  2. Select all or specific items
  3. Click export icon
  4. Choose format (CSV, JSON)
  5. Download file
  1. Select items to delete
  2. Click delete icon
  3. Confirm deletion
  4. Note: Some deletes are permanent
  1. Navigate to Leads collection
  2. Click import icon
  3. Upload CSV file with columns:
    • email (required)
    • company_name (required)
    • first_name, last_name
    • phone
    • city, state, country
    • intent_score
    • intent_topics (comma-separated)
  4. Map CSV columns to lead fields
  5. Preview import
  6. Confirm and import

The platform will validate email formats, check for duplicates, assign to your team, and index for search.

  • Check required fields — Email and company_name are required
  • Check email format — Must be valid email
  • Check team assignment — Must belong to a team
  • Check permissions — You may not have edit rights
  1. Check status — Must be “active”
  2. Check segment — Must have target_segment_id
  3. Check content — Must have subject_line and html_content
  4. Check integrations — Required services must be configured in Globals
  1. Check is_active — Must be true
  2. Check rules syntax — Must be valid JSON
  3. Check last_recalculated_at — May need manual refresh
  4. Contact administrator — May need system recalculation
  • Check user role — May not have permission
  • Check team membership — May not be in correct team
  • Contact administrator — Permissions may need adjustment
  1. Keep data clean — Remove invalid emails regularly
  2. Monitor duplicates — Review deduplication_audits weekly
  3. Track engagement — Update engagement_count and last_engaged_at
  4. Use quality_score — Flag low-quality leads
  5. Respect is_suppressed — Never contact suppressed leads
  1. Test segments first — Verify segment_size before launching
  2. Use descriptive names — Include date and target in campaign name
  3. Track QR codes — Monitor qr_scans for engagement
  4. Archive old campaigns — Keep active list clean
  1. Start simple — Test rules with small datasets
  2. Document rules — Add description explaining segment logic
  3. Monitor size — Large segments may impact performance
  4. Use appropriate types — Static for one-time, dynamic for ongoing
  1. Version prompts — Include version in name or description
  2. Test with real data — Use actual lead placeholders
  3. Keep focused — One prompt per use case
  4. Archive old versions — Don’t delete, archive for history
  1. Protect Globals — Only admins should edit API keys
  2. Use strong passwords — For user accounts
  3. Regular audits — Review activity_logs monthly
  4. Backup data — Export critical collections weekly
  • Hover over field names for descriptions
  • Check field notes for detailed guidance
  • Review activity_logs for recent changes
  • Technical Issues — Contact system administrator
  • Data Questions — Reach out to data team lead
  • Feature Requests — Discuss with product team
Collection Purpose Key Fields
Leads Contact records email, company_name, intent_score
Campaigns Marketing campaigns name, status, target_segment_id
Segments Audience groups name, rules, is_active
AI Prompts AI templates name, system_prompt, messages
Settings Configuration key, value, section
Globals API credentials openai_api_key, twilio_*
Teams Organizations name, subscription_status
Users Team members name, email, role

Leads: new (recently added), qualified (meets criteria), contacted (outreach sent), engaged (responded), converted (became customer)

Campaigns: draft (being created), active (currently running), paused (temporarily stopped), completed (finished)

General: draft (work in progress), published (active/live), archived (retired)

  • 0–30: Low intent — Research phase
  • 31–60: Medium intent — Evaluating options
  • 61–80: High intent — Ready to engage
  • 81–100: Very high intent — Hot lead
  • Text — Short text (email, name)
  • Textarea — Long text (notes)
  • Number — Numeric (intent_score, quality_score)
  • Boolean — True/false (is_canonical, is_suppressed)
  • Date/Time — Timestamps (created_at, launched_at)
  • JSON — Structured data (rules, meta, intent_topics)
  • Dropdown — Select from options (status, role)
  • M2O — Link to another item (team_id, segment_id)

Remember: This is a buyer intent platform — accurate lead data and well-targeted campaigns drive results. Keep your data clean and up-to-date!