# Split Agents by Domain/Company (Support)

Support - TicketsCalculated Attribute

Splits agents into groups (e.g. In-house vs BPO) based on their email domain.

## Business value & use cases

Enables direct comparisons between in-house teams and outsourced BPO providers when no custom user field exists to distinguish agents. Helps managers track whether BPO performance matches internal standards by reviewing metrics such as CSAT, one-touch ticket rates, and resolution times, while keeping dashboard segmentation simple and consistent. Pair with outcome metrics like [% True One-touch Talk Tickets](/content/best-practice/zendesk-explore-custom-metrics/library/percent-true-one-touch-talk-tickets/index.html) for a clearer read on efficiency by group.

## Dataset and dependencies

- **Dataset**: Support - Tickets  
- **Type**: Calculated Attribute  
- **Dependencies**: None (standalone attribute)

## The code

Unlock to view full code

Not sure how to work with the code? Check our [getting started guides](/content/best-practice/zendesk-explore-custom-metrics/guides/index.html).

## Implementation steps

1. Go to Explore > Report Builder > Support - Tickets Dataset > Start Report.  
2. Select the Calculator icon for Calculations.  
3. Choose Standard calculated attribute.  
4. Paste in the code above.  
5. Replace "yourcompany" and "bpodomain" with the domains used by your agents (keeping the quotation marks).  
6. Validate and save.  
7. Apply the attribute to reports to compare metrics between In-house, BPO, and Other agents.

## Validation tips

- Spot-check assignee emails from sample tickets to confirm they map to the correct group.  
- Test with multiple BPO domains if you work with several providers.  
- Confirm that "Other" only appears for emails outside the expected domains.

## Caveats and considerations

Update the formula whenever new BPO providers are added or internal domains change, and add extra ELIF lines for more granular segmentation if required. Best practice is to capture this information with a custom user field in Zendesk Support for long-term reporting. Note that an equivalent attribute exists for the Talk dataset if you also want to track phone performance—see [Split Agents by Domain/Company (Talk)](/content/best-practice/zendesk-explore-custom-metrics/library/split-agents-by-domain-company-talk/index.html).

## Example chart

Example dashboard showing in-house versus BPO ticket performance

## Related metrics / attributes

[**Split Agents by Domain/Company (Talk)**  
Voice - CallsCalculated Attribute  
Labels Talk calls based on the agent’s email domain so you can segment in-house staff from BPO providers or other groupings.
