Skip to content

feat: add Workday integration solution - #235

Merged
jeff-schnitter merged 20 commits into
mainfrom
workday-integration-solution
Aug 14, 2026
Merged

feat: add Workday integration solution#235
jeff-schnitter merged 20 commits into
mainfrom
workday-integration-solution

Conversation

@jeff-schnitter

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new workday Cortex CLI solution that configures the Cortex Workday integration with a sample Pied Piper org hierarchy (from the TV show Silicon Valley)
  • Bundles 7 employees across 4 levels of hierarchy as a Workday RaaS-format JSON report, hosted via raw.githubusercontent.com
  • Setup script checks for existing Workday config (backs it up, deletes it), then POSTs the bundled configuration via the Cortex API
  • Also suppresses the "0 entities imported" message when no entities are imported, and cleans up "post-install setup script" wording to "setup script" across all solutions

Test plan

  • poetry run pytest tests/test_workday_setup.py tests/test_solutions_postinstall.py tests/test_setup_base.py tests/test_github_actions_setup.py -v — all 41 pass
  • cortex solutions install -s workday — installs with no entity import noise
  • cortex solutions post-install -s workday — configures Workday integration, shows CLI-equivalent command
  • Menu option "1 Data Model" shows the Pied Piper org hierarchy (not the install command)

🤖 Generated with Claude Code

jeff-schnitter and others added 9 commits August 14, 2026 10:34
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…isting config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eploy setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- git mv cortexapps_cli/solutions/workday-integration → workday
- Update solution_tag, backup_dir, and docstring in setup.py
- Update ownershipReportUrl in configuration.json
- Update CLI commands in README.md
- Add Silicon Valley attribution to README description text
- Update all workday-integration references in test_workday_setup.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix configuration.json: add teamId/teamName at root of reportMappingV2
  (required by Cortex API for ONE_EMPLOYEE_ONE_TEAM type)
- Add CLI-equivalent echo before API call in setup.py for transparency
- Reorder README: move Org Hierarchy before Quick Start so Data Model
  menu shows the hierarchy diagram instead of install commands
- Suppress "0 entities imported" line when no entities were imported
- Change "post-install setup script" -> "setup script" across all
  solution SETUP_DESCRIPTIONs and the fallback in solutions.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jeff-schnitter and others added 11 commits August 14, 2026 11:11
…port instructions

- Replace pied-piper-hierarchy.json with pied-piper-supervisory-org.json
  (uses childHierarchyColumn/parentHierarchyColumn for hierarchy linkage)
- Update configuration.json: supervisory org field mapping, point ownershipReportUrl
  to GitHub Pages for local testing (will switch to raw.githubusercontent.com after merge)
- Add _validate_integration() step that calls POST /api/v1/workday/configuration/validate
  and warns on failure without aborting
- Update post_steps() instructions: Catalog → All Entities → Import Entities → Workday
  → Sync Entities → Next Step
- Update tests for new data shape and validation step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alidate response

- Add mark_undone() to SolutionSetup base class so step state can be
  cleared when the underlying resource is deleted
- Call mark_undone("configure") after deleting existing Workday config,
  so the configure step isn't skipped on the next run
- Fix _validate_integration(): validate endpoint always returns HTTP 200;
  must check configurations[0].isValid in the JSON body and raise on false
- Update tests for all three fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The already_done("configure") cache can go stale if the Workday
integration is deleted outside of the setup script. The check step
now calls mark_undone("configure") on 404 (no integration on server),
ensuring the configure step always runs when there's nothing to skip.

Combined with the previous fix (mark_undone after user-confirmed delete),
all paths are now covered:
- No integration on server (404) → mark_undone → configure runs
- Integration found, user deletes → mark_undone → configure runs
- Integration found, user keeps → state unchanged → configure skips

Also: update README Data Model section with architecture flow diagram
showing Workday Report → Cortex Integration → Team Catalog alongside
the Pied Piper org hierarchy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
parent[fieldOnParentNode] must equal child[fieldOnChildNode] for
Cortex to link teams in a hierarchy. The columns were reversed:

  fieldOnParentNode = parentHierarchyColumn (parent's own SUP ID)
  fieldOnChildNode  = childHierarchyColumn  (child's pointer to parent SUP ID)

With the previous (wrong) values, Erlich's childHierarchyColumn (null)
never matched any child's parentHierarchyColumn, so only the root team
was imported.
…ormat

- Workteam_Group is now a nested array of objects (not flat fields)
- Root team uses parentTeamId: "NONE" (string, not null) matching cortex-cx
- Team_Managed only present for managers
- Managers_Email field added for reporting chain
- configuration.json updated to ONE_EMPLOYEE_MULTIPLE_TEAMS matching cortex-cx
- Tests updated for nested Workteam_Group structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jeff-schnitter
jeff-schnitter merged commit a5c84ac into main Aug 14, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant