Before
An operator likely had to determine whether the request used a username or email address, search the directory for the employee, and then perform a second lookup for the employee's manager. They also had to verify whether a manager was found and copy the manager's contact details into the final response.
How it works
- Receive the request and determine whether the user should be searched by username or email.
- Retrieve the user record, look up the associated manager, and check whether manager details are available.
- Return the manager's display name and email, or complete the workflow with a manager-not-found result.
Workflow details
- Request intake: An email-triggered request starts the workflow with a username or email address that identifies the employee whose reporting relationship needs to be found.
- User lookup: The workflow checks which identifier was provided and retrieves the matching user record from the directory, avoiding the need to search manually by the wrong attribute.
- Manager validation: After locating the user, the workflow requests the associated manager details and checks whether a manager was returned.
- Result handling: When a manager is found, the automation prepares the manager's display name and email as outputs. If no manager is available, it records that the manager email could not be retrieved before completing the workflow.
What changed
The complete user-to-manager lookup now runs automatically from an incoming request, including identifier selection and manager-availability validation. Human operators receive the manager contact result or an explicit retrieval-failure outcome without performing the directory searches themselves.
Work removed
Manually identifying the search attribute, searching the directory for the user, looking up the user's manager, checking whether a manager was found, and copying the manager's display name and email into the result.
Expected outcome
Each request can avoid at least two manual directory lookups and one manual manager-availability check, producing a consistent manager contact result or a clear no-manager outcome.