Discussions
How to find the eligible Employee/Technician list for a new WorkOrder based on WorkZone, Space, or Asset?
Hi everyone,
I’m working with the Corrigo Enterprise REST API and reviewing the Data Model of Entities. I need to determine which Employees/Technicians are eligible to be assigned when creating a WorkOrder. The WorkOrder may be created for a WorkZone, or the input may come from a Space or an Asset/Location. I’d like to understand the correct entity relationships and query approach.
From the entities documentation, I can see:
WorkOrderhasWorkZone,MainAsset,Customer,Specialty,Employee,Owner, andAssignments(WoAssignment).SpacehasCustomerId,Asset(Location),WorkZone, andStatusId.LocationhasParentId,RootId,TypeId,AssetInfo, etc., but no direct Employee reference.EmployeehasAccessToAllWorkZones,WorkZones(LinkUserAndWorkZone),Teams(LinkUserAndTeam),Portfolios(LinkUserAndPortfolio),CustomerGroups(LinkUserAndCustomerGroup),Specialties(LinkUserAndSpecialty),Role, etc.WorkZonehasTeams(LinkTeamAndWorkZone),Portfolios(LinkPortfolioAndWorkZone),SpecDispatchRules,Responsibilities,OnCallRules,EscalationRules,BizHours, etc.- There are link entities such as
LinkUserAndWorkZone,LinkUserAndTeam,LinkTeamAndWorkZone,LinkUserAndPortfolio,LinkPortfolioAndWorkZone,LinkUserAndCustomerGroup, andLinkUserAndSpecialty.
My questions are:
-
If I have a
WorkZone, what is the recommended way to query the eligible Employee list? Should I queryLinkUserAndWorkZonebyWorkZoneId, and also include Employees whereAccessToAllWorkZones = true? -
If the input is a
Space, should I first resolveSpace.WorkZoneand then use the same WorkZone-based lookup? DoesSpace.AssetorSpace.CustomerIdaffect eligibility? -
If the input is an
Asset/Location, how do I determine the owning WorkZone? Is it throughWorkZone.Asset,Location.RootId/Location.ParentId, or another relationship? Once the WorkZone is known, is the Employee lookup the same as case 1? -
Should the eligible list be a union of direct WorkZone links, Team-based links (
LinkUserAndTeam+LinkTeamAndWorkZone), and Portfolio-based links (LinkUserAndPortfolio+LinkPortfolioAndWorkZone)? How shouldCustomerGroupsandSpecialtiesbe applied? -
How do
Specialty,SpecDispatchRule,Responsibility,OnCallRule, andEscalationRuleaffect or prioritize the assignable Employee list? -
Is there an existing Query API sample or Command API operation that returns assignable Employees for a new WorkOrder based on WorkZone/Space/Asset? If not, what is the recommended workaround?
Any sample QueryExpression or guidance would be greatly appreciated.
Thanks!

