Topic Strategies & Use Cases
Quadrillian organizes conversations into "topics" - each topic represents a conversation thread. The topic_key parameter identifies which conversation to show. This guide covers strategies for organizing topics effectively across different use cases.
Topic Key Patterns
Here are common patterns for organizing topic keys effectively:
User-Specific Topics
Create unique topics for each user or user session:
Support Ticket Topics
Organize support conversations by ticket ID:
Feature-Based Topics
Group conversations by product feature or page:
Sales & Marketing Topics
Organize sales conversations by lead source or company:
Personal vs. Shared Topics
Important organizational principle: Decide whether topics should be personal to individual users or shared across multiple users.
Personal Topics (Include User ID)
Use when the conversation is specific to one user and their company:
Shared Topics (Generic, No User ID)
Use when multiple users should have access to the same conversation:
Database-Driven Topics
Create topics dynamically based on your database entities:
Creating Topics Programmatically
You can create topics programmatically using the Quadrillian API or JavaScript SDK:
Using the REST API (Recommended)
Topics should be created and managed from your backend for security reasons:
Security Considerations
All topic management operations must be performed from your backend server:
- Topic Creation: Only your backend can create topics with external keys
- User Addition: Only your backend can add users to topics
- Access Control: Implement your own business logic for who can access which topics
- JWT Authentication: All API calls must include valid JWT tokens
Use Case Examples
Here are real-world examples of how to organize topics for different scenarios:
Customer Support System
Create unique topics for each support ticket with detailed organization:
- support-ticket-12345 - Individual support tickets
- support-urgent-12345 - High-priority tickets
- support-billing-12345 - Billing-related issues
- support-technical-12345 - Technical problems
E-commerce Platform
Organize conversations by order, product, or customer:
- order-12345 - Order-specific conversations
- product-feedback-widget-123 - Product feedback
- customer-abc123 - Customer-specific chat
- returns-12345 - Return/refund requests
SaaS Application
Group conversations by feature, team, or project:
- feature-analytics - Analytics feature support
- team-marketing - Marketing team chat
- project-abc123 - Project-specific discussions
- onboarding-user-123 - User onboarding help
Internal Team Communication
Organize internal conversations by department or project:
- team-engineering - Engineering team chat
- project-q4-launch - Project-specific discussions
- meeting-standup-2024-01-15 - Meeting notes
- announcement-company-wide - Company announcements
Best Practices
Follow these guidelines to organize topics effectively:
Naming Conventions
- Use consistent prefixes: support-, sales-, feedback-
- Include unique identifiers: Ticket numbers, user IDs, or timestamps
- Keep it descriptive: Make topic keys self-explanatory
- Avoid special characters: Use hyphens or underscores for separation
Topic Lifecycle Management
- Archive old topics: Move completed conversations to archived state
- Set expiration dates: Automatically close topics after inactivity
- Monitor topic activity: Track which topics are most active
- Clean up unused topics: Remove topics that are no longer needed
Security Considerations
- Don't expose sensitive data: Avoid putting passwords or API keys in topic keys
- Use workspace isolation: Topics are automatically isolated by workspace
- Validate topic access: Ensure users can only access appropriate topics
- Audit topic creation: Log who creates topics and when