# Using the integration for Workday

{% hint style="info" %}
Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor's documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
{% endhint %}

This article explains how to use the integration for Workday with Cortex. For configuration instructions, see [Configuring the integration for Workday](/ingesting-data-into-cortex/integrations/workday.md).

{% hint style="info" %}
Cortex conducts a background sync of Workday identities every day at 9 a.m. UTC.
{% endhint %}

## Connecting an entity to Workday

### Discovery

By default, Cortex matches entities to Workday teams using the [Cortex tag](/ingesting-data-into-cortex/entities-overview/entities.md#cortex-tag). For example, an entity with the tag `platform-infra` maps to a Workday team named `platform-infra`. If your Workday team names don't align with your Cortex tags, override the mapping in the entity descriptor.

{% hint style="info" %}
Team names are case-sensitive and must exactly match the `teamDisplayName` or `teamName` field in your Workday report.
{% endhint %}

### Automatically import teams

You can choose to automatically import discovered teams and team relationships from Workday into Cortex. Before enabling auto import, make sure your Workday report includes the `managerEmail` field to ensure that team relationships are imported.

1. From the main sidebar, click your avatar in the bottom-left corner.
2. Click **Settings**.
3. In the Settings menu, locate the **Workspace** section, then expand **Entities**.
4. Select **Teams**.
5. In the Team settings section, toggle on **Auto import Workday teams**.<br>

   <div align="left" data-with-frame="true"><figure><img src="/files/dCrD0AgBiaEotsnLCZXR" alt="The &#x27;Auto import Workday teams&#x27; option." width="375"><figcaption></figcaption></figure></div>
6. At the top of the page, select the **Identity providers** tab.<br>

   <div align="left" data-with-frame="true"><figure><img src="/files/5XEGbK4wILfwQqSrm3zb" alt="The &#x27;Identity providers&#x27; tab." width="375"><figcaption></figcaption></figure></div>
7. Locate Workday, then toggle on the **Enabled** option.

The next automatic import occurs when the background entities sync runs at 9 a.m. UTC.

{% hint style="info" %}
If a Workday team you're importing shares a tag with an existing Cortex entity, Cortex appends `-team` to the imported team's tag to avoid a collision.

For example, if the tag `payments` already exists in Cortex when you import a Payments team from Workday, Cortex imports the team's tag as `payments-team`.
{% endhint %}

#### **Triggering a sync manually**

You can sync teams manually at any time. Note that performing a manual sync does not create new teams, but it does update membership and hierarchy relationships for existing Workday-managed teams.

1. From the main sidebar, select **Integrations**.
2. Locate Workday, then click **Settings**.
3. In the **Sync team for Workday** section, click **Sync teams**.\ <br>

   <div align="left" data-with-frame="true"><figure><img src="/files/PQqVScC0ApHmI3RDQqa6" alt="The &#x27;Sync teams&#x27; option." width="375"><figcaption></figcaption></figure></div>

### Connecting via an entity descriptor

For any entity type, use the entity descriptor to assign Workday teams as owners by referencing the team's Cortex tag. Assigned teams then appear as owners on the entity's page in Cortex, linking it to the team members and hierarchy imported from Workday.

```yaml
x-cortex-owners:
  - type: group
    name: workday-team-tag
    provider: CORTEX
    description: This is a description for this owner.
```

<table><thead><tr><th width="154.82421875">Field</th><th width="467.16796875">Description</th><th align="center">Required?</th></tr></thead><tbody><tr><td><code>type</code></td><td>Ownership type (in this example, <code>group</code>).</td><td align="center"><i class="fa-check">:check:</i></td></tr><tr><td><code>name</code></td><td>The <a href="/pages/7yhTO4ww5IUAY2GDnu84#unique-identifiers-for-entities">Cortex tag</a> linked to the auto-created Workday team.</td><td align="center"><i class="fa-check">:check:</i></td></tr><tr><td><code>provider</code></td><td>The source of the team (in this example, a Cortex-created team).</td><td align="center"><i class="fa-check">:check:</i></td></tr><tr><td><code>description</code></td><td>Description for the owner.</td><td align="center"><i class="fa-x">:x:</i></td></tr></tbody></table>

## Using the Workday integration

#### Entity pages

Once you set up the integration, Cortex imports and structures your team hierarchy automatically. Imported Workday teams display the description ***Automatically created by Cortex***.

Each team's details page lists detected members under the **Members** tab. If your Workday report includes the `role` field, Cortex displays each member's role in a badge next to their name.

### Creating Scorecard rules and writing CQL queries with the Workday integration

See examples below.

<details>

<summary>All ownership details</summary>

A special built-in type that supports a null check or a count check, used to enforce ownership of entities.

**Definition:** `ownership: Ownership | Null`

**Example**

An initial level in a security Scorecard might include a rule to ensure an entity has at least one team as an owner:

```
ownership.teams().length > 0
```

</details>

<details>

<summary>All owner details</summary>

List of owners, including team members and individual users, for each entity.

**Definition:** `ownership.allOwners()`

**Example**

The Scorecard might include a rule to ensure that entity owners all have an email set:

```
ownership.allOwners().all((member) => member.email != null)
```

</details>

<details>

<summary>Team details</summary>

List of teams for each entity.

**Definition:** `ownership.teams(): List<Team>`

**Example**

The Scorecard might include a rule to ensure that an entity owners all have a description and are not archived:

```
ownership.teams().all(team => team.description != null and team.isArchived == false)
```

</details>

## Viewing Workday integration logs <a href="#still-need-help" id="still-need-help"></a>

{% hint style="info" %}
This feature is available in Cortex cloud.
{% endhint %}

While viewing an integration's settings page, select the **Logs** tab to view error logs from the last 7 days. You can filter the logs list by configuration and by operation (for example, you could filter to view errors surfaced only via Scorecards).

<div align="left" data-with-frame="true"><figure><img src="/files/x8JmoPqXZTJ7YHeFJpOA" alt="The &#x27;Logs&#x27; tab on an integration&#x27;s settings page shows error information over the past 7 days."><figcaption></figcaption></figure></div>

Click into a row to get more information, including time stamp, status code, full error, and request path.

## Known limitations

Cortex does not support hierarchies with cycles.

For example, if **Employee A** is on the platform team and **Employee B** is on the frontend team, and both report to **Manager C** on the engineering team, the hierarchy is valid. But if **Manager C** also reports to someone on the platform team, that creates a cycle between the platform and engineering teams which Cortex cannot resolve.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortex.io/ingesting-data-into-cortex/integrations/workday/using-the-integration-for-workday.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
