Implementing complex territory management in hs-2023 requires thoughtful architecture across custom objects, properties, and automation workflows. Here’s a comprehensive approach addressing all three focus areas.
Custom Objects Design:
Create a Territory custom object as the foundation of your system. This object represents each territory with properties for all assignment dimensions:
- Region (enum: North America, EMEA, APAC, LATAM)
- Industry Vertical (multi-select: Technology, Healthcare, Finance, Manufacturing, Retail)
- Account Size Tier (enum: SMB, Mid-Market, Enterprise)
- Territory Owner (user reference)
- Priority Level (number: 1-10 for conflict resolution)
- Active Status (boolean)
The custom object approach provides flexibility to add new dimensions without restructuring your entire automation framework. Each territory instance represents one unique combination of criteria.
Create a second custom object for Territory Rules that defines the matching logic. This separation allows you to modify assignment criteria without touching territory definitions:
- Rule Type (enum: Geographic, Industry, Size, Custom)
- Match Criteria (JSON string defining matching logic)
- Priority Weight (number for scoring)
- Associated Territory (reference to Territory object)
Property Configuration Strategy:
On the Contact/Lead object, create calculated properties that score territory fit:
- geographic_match_score: Evaluates location properties (zip, state, country) against territory geographic criteria
- industry_match_score: Compares company industry against territory industry verticals
- size_match_score: Evaluates company size, revenue, employee count against territory size tiers
- composite_territory_score: Weighted sum of individual dimension scores
These calculated properties simplify workflow logic by pre-computing match quality. Instead of complex nested conditionals, workflows can simply compare scores to thresholds.
Create a current_territory property (association to Territory object) and territory_assignment_date timestamp to track current assignment and enable historical analysis.
Automation Workflow Architecture:
Implement a three-tier automation structure:
Tier 1 - Dimension Scoring Workflows:
Create separate workflows for each dimension (geography, industry, size). These workflows trigger on lead creation or property changes and calculate dimension-specific match scores. This modular approach makes maintenance easier - you can modify geographic scoring logic without touching industry evaluation.
Tier 2 - Territory Assignment Orchestration:
Build a master workflow that triggers when dimension scores are updated. This workflow:
- Queries all active Territory objects
- Calculates composite match scores against each territory
- Identifies the highest-scoring territory
- Resolves conflicts using priority levels when multiple territories score equally
- Creates association between lead and winning territory
- Sets territory owner as lead owner
Tier 3 - Territory Refresh Automation:
Implement a scheduled workflow that periodically re-evaluates assignments. This ensures existing leads are reassigned when territory rules change. The workflow enrolls all active leads and runs them through the same scoring logic as new assignments.
Handling Complex Assignment Logic:
For sophisticated multi-dimensional logic, use custom code actions in workflows. This allows implementing complex scoring algorithms that would be unwieldy with standard workflow conditions:
// Pseudocode - Territory scoring logic:
1. Fetch all active territories from custom object
2. For each territory, calculate match score:
- Geographic match: 40% weight
- Industry match: 35% weight
- Size tier match: 25% weight
3. Apply business rules (exclude competitors, priority accounts)
4. Return highest scoring territory ID
5. Handle ties using territory priority property
Conflict Resolution:
When leads match multiple territories, implement priority-based resolution:
- Assign numeric priority to each territory (1=highest)
- When composite scores are equal, select lower priority number
- Log all matching territories to a multi-select property for visibility
- Create audit trail showing why specific territory was chosen
Maintenance and Scalability:
This architecture scales well because:
- New dimensions added by creating new custom object properties and dimension scoring workflows
- Territory criteria changes only require updating Territory Rule objects, not workflow logic
- Modular workflow structure isolates changes to specific dimensions
- Custom objects support complex reporting on territory performance and coverage
Best Practices:
- Use associations rather than property references to link leads with territories - better reporting and relationship visibility
- Implement comprehensive logging properties that track territory assignment history and reasoning
- Create dashboard monitoring territory balance - ensure no territories are overloaded or empty
- Build territory coverage reports showing which lead segments lack adequate territory coverage
- Schedule regular territory refresh workflows (monthly) to catch rule changes and maintain data integrity
This architecture provides the flexibility needed for complex sales structures while maintaining manageable automation workflows through proper separation of concerns across custom objects, properties, and automation tiers.