LOGIC CHANGES:
[Inbound] + [Outbound] +[Callback] + [Internal]
[Internal]: F_Interactions.InteractionCreationType in ('OutgoingInternal')
[Answered/Handled]: F_InteractionSegments.InteractionState = 'Handling'
F_InteractionSegments.AgentID = @AgentID
Count(distinct F_AgentBpTime.AgentID)
@BusinessProcessName = '- ALL -'
OR(@BusinessProcessName = F_AgentBpTime.BusinessProcessName and F_AgentBpTime.isAssigned = 1)
Count(distinct F_AgentBpTime.AgentID)
@BusinessProcessName = '- ALL -'
OR(@BusinessProcessName = F_AgentBpTime.BusinessProcessName and F_AgentBpTime.isAssigned = 1)
Count(distinct F_AgentBpTime.AgentID)
@BusinessProcessName = '- ALL -'
OR(@BusinessProcessName = F_AgentBpTime.BusinessProcessName and F_AgentBpTime.isAssigned = 1)