> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Find Workers

- Component: `appmixer.workday.core.FindWorkers`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.workday 1.0.0](https://connectors.appmixer.com/connector/appmixer.workday/1.0.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.workday/1.0.0/component/appmixer.workday.core.FindWorkers>

Find workers by name or employee ID, work email, supervisory organization, location and status. Returns every matching worker with the current staffing information. Without any filter it returns all active workers.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Search (`search`) | text | Text to search for in worker names and employee IDs, e.g. `Logan` or `21001`. Not case-sensitive; several words separated by spaces match any of them. |
| Email (`email`) | text | Return only workers with this email address, e.g. `lmcneil@workday.net`. |
| Supervisory Organization (`organizationId`) | text | Return only workers whose primary job belongs to this supervisory organization. Select one or enter its Workday ID or reference ID, e.g. `SUPERVISORY_Human_Resources`. Workers of subordinate organizations are not included. Workday has no such filter, so all workers are read and the matching ones kept; in a large tenant that takes a while. |
| Location (`locationId`) | text | Return only workers whose primary job is at this location. Enter the Workday ID or the Location ID, e.g. `San_Francisco_site`. Both are part of each worker returned by List Workers. Workday has no such filter, so all workers are read and the matching ones kept. |
| Include Terminated Workers (`includeTerminatedWorkers`) | toggle | By default only active workers are returned. Turn on to include terminated workers as well. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/workday/core/FindWorkers?outPort=out&ignoreAuth=true`.

### Port `notFound`

| Field | Type | Description |
| --- | --- | --- |
| Search (`search`) | string | - |
| Email (`email`) | string | - |
| Supervisory Organization (`organizationId`) | string | - |
| Location (`locationId`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.workday.core.FindWorkers",
  "label": "Find Workers",
  "description": "Find workers by name or employee ID, work email, supervisory organization, location and status. Returns every matching worker with the current staffing information. Without any filter it returns all active workers.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:workday"
  },
  "quota": {
    "manager": "appmixer:workday",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "search": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "includeTerminatedWorkers": {
            "type": "boolean",
            "default": false
          },
          "outputType": {
            "type": "string",
            "default": "array"
          }
        }
      },
      "inspector": {
        "inputs": {
          "search": {
            "type": "text",
            "index": 1,
            "label": "Search",
            "tooltip": "Text to search for in worker names and employee IDs, e.g. <code>Logan</code> or <code>21001</code>. Not case-sensitive; several words separated by spaces match any of them."
          },
          "email": {
            "type": "text",
            "index": 2,
            "label": "Email",
            "tooltip": "Return only workers with this email address, e.g. <code>lmcneil@workday.net</code>."
          },
          "organizationId": {
            "type": "text",
            "index": 3,
            "label": "Supervisory Organization",
            "tooltip": "Return only workers whose primary job belongs to this supervisory organization. Select one or enter its Workday ID or reference ID, e.g. <code>SUPERVISORY_Human_Resources</code>. Workers of subordinate organizations are not included. Workday has no such filter, so all workers are read and the matching ones kept; in a large tenant that takes a while.",
            "source": {
              "url": "/component/appmixer/workday/core/ListSupervisoryOrganizations?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "messages": {
                  "in/outputType": "array"
                },
                "transform": "./ListSupervisoryOrganizations#toSelectArray"
              }
            }
          },
          "locationId": {
            "type": "text",
            "index": 4,
            "label": "Location",
            "tooltip": "Return only workers whose primary job is at this location. Enter the Workday ID or the Location ID, e.g. <code>San_Francisco_site</code>. Both are part of each worker returned by List Workers. Workday has no such filter, so all workers are read and the matching ones kept."
          },
          "includeTerminatedWorkers": {
            "type": "toggle",
            "index": 5,
            "label": "Include Terminated Workers",
            "defaultValue": false,
            "tooltip": "By default only active workers are returned. Turn on to include terminated workers as well."
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 6,
            "defaultValue": "array",
            "tooltip": "Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file.",
            "options": [
              {
                "label": "First Item Only",
                "value": "first"
              },
              {
                "label": "All items at once",
                "value": "array"
              },
              {
                "label": "One item at a time",
                "value": "object"
              },
              {
                "label": "Store to CSV file",
                "value": "file"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/workday/core/FindWorkers?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType"
          }
        }
      }
    },
    {
      "name": "notFound",
      "schema": {
        "type": "object",
        "properties": {
          "search": {
            "type": "string",
            "title": "Search",
            "example": "Logan"
          },
          "email": {
            "type": "string",
            "title": "Email",
            "example": "lmcneil@workday.net"
          },
          "organizationId": {
            "type": "string",
            "title": "Supervisory Organization",
            "example": "SUPERVISORY_Human_Resources"
          },
          "locationId": {
            "type": "string",
            "title": "Location",
            "example": "San_Francisco_site"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
