Education cloud academic calendar generate

From forcedotcom/sf-skills · View interactive version

Education cloud academic calendar generate is an AI agent skill from the GitHub repository forcedotcom/sf-skills. Use this skill to set up, create, or generate an academic calendar for Education Cloud orgs. Creates Academic Year, Academic Terms (semester/quarter/trimester), Academic Sessions, registration windows, and add/drop deadlines from natural language or documents. Validates date ranges and handles overl

How to use this skill

Skill file

Education Cloud Academic Calendar Generation

Create the foundational academic calendar infrastructure for Education Cloud orgs, parsing calendar data from documents or natural language and generating validated Academic Year, Term, and Session records with proper date ranges and institutional linkage.

Scope


Execution Model

All Salesforce operations use relative-path REST calls. Do not use CLI or shell commands to reach Salesforce (sf, sfdx, curl); the execution environment may not provide them. This does not apply to the skill's own local validation script (scripts/validate_calendar_dates.py, see step 4) — that runs locally and never touches the org.


Required Inputs

Gather or infer before proceeding:

If the user provides a calendar document (PDF, CSV, spreadsheet), parse it to extract all dates. If the user provides natural language, ask for specific dates before proceeding.

Note: AcademicYear, AcademicTerm, and AcademicSession have no Account reference field — calendar records are not linked to a Business Account. Linkage is Year → Term (AcademicYearId) and Term → Session (AcademicTermId) only.

Defaults unless specified:


Execution Transport

  1. Resolve API version: GET /services/data/ (unversioned) via headless-360 dispatch. Response is a map of endpoint paths already resolved to the org's current max version (e.g. "limits": "/services/data/v69.0/limits") — not an array with a version field. Extract the version from any returned path (regex v\d+\.\d+) and use it as <ver> for every call below.
  2. Probe transport health: GET /services/data/<ver>/limits via headless-360 dispatch. 2xx → route all calls through it. On absent/4xx/5xx → probe other available transports (other Salesforce MCP, authenticated sf CLI, custom MCP) with the same read, use first healthy, announce it. None healthy → stop, ask user to connect one; never fabricate.

Workflow

All steps are sequential. Do not skip or reorder. If blocked, stop and ask for missing context.

  1. Verify foundation prerequisites — Follow references/foundation_prerequisites.md: org edition, Lightning Experience, Education Cloud license, running user's EDU access, Education Cloud Foundation enabled (self-heal via confirm-then-enable if off). Do not proceed to Step 1 until all checks pass.
  1. Confirm calendar system
  1. Gather calendar data
  1. Verify object and field schema

GET /services/data/<ver>/sobjects/AcademicYear/describe, .../AcademicTerm/describe, .../AcademicSession/describe

  1. Validate date ranges

```bash

python3 scripts/validate_calendar_dates.py <<'EOF'

{"academicYear": {...}, "terms": [...], "sessions": [...]}

EOF

```

  1. Detect duplicate terms
  1. Display proposed calendar structure and confirm
  1. Create Academic Year record

```http

POST /services/data/<ver>/sobjects/AcademicYear

{"Name": "Academic Year 2025-2026"}

```

  1. Create Academic Term records

```http

POST /services/data/<ver>/sobjects/AcademicTerm

{"Name": "Fall 2025", "Season": "Fall", "StartDate": "2025-08-18", "EndDate": "2025-12-12",

"AcademicYearId": "<academicYearId>",

"RegistrationOpenDate": "2025-04-01", "RegistrationCloseDate": "2025-08-17"}

```

  1. Create Academic Session records

```http

POST /services/data/<ver>/sobjects/AcademicSession

{"Name": "Summer Session 1", "ClassStartDate": "2026-05-26", "ClassEndDate": "2026-07-03",

"AddDropDeadline": "2026-06-11", "AcademicTermId": "<termId>"}

```

  1. Generate completion summary

On-Demand Verification

Available at any time after step 10, not a required workflow step — use only when the user asks to spot-check a record or view a calendar range.


Rules / Constraints

| Constraint | Rationale |

|-----------|-----------|

| Verify object + field API names via describe before writing | Prevents a failed POST on an unverified field; Season picklist values must match AcademicTerm.Season's picklistValues |

| Term end date must be after start date | Platform validation will reject invalid date ranges |

| Registration window must open before term starts | Students cannot register after classes begin |

| Add/drop deadline (on AcademicSession) after or equal to term start | Deadline before classes start is logically invalid; AcademicTerm has no add/drop field |

| Academic Year must span all its child terms | Term dates outside year range cause reporting issues |

| Overlapping sessions within same term are allowed | Common pattern for Summer sessions (e.g., Session 1: May-Jul, Session 2: Jun-Aug) |

| Term names should match calendar system convention | Fall/Spring/Summer for semester, Fall/Winter/Spring/Summer for quarter |

| Resolve API version dynamically, don't hardcode | Org's max API version changes over time; a stale hardcoded version drifts from the org's current one |

| Check for duplicate terms via SOQL /query before creating, pass q via queryParams not inlined in the URL | /query is routable via headless-360, but only with queryParams — inlining ?q= 404s (confirmed by live test); term Name is not unique-constrained so duplicates do not error on insert; a failed duplicate-check read must block creation, not be skipped |


Gotchas

| Issue | Resolution |

|-------|------------|

| User provides relative dates ("next Fall") | Convert to absolute dates before inserting (e.g., "next Fall" → "Fall 2026" with specific dates) |

| Overlapping sessions flagged as error | Confirm with user — overlaps are intentional in many institutions (e.g., Summer Session 1 and 2 overlap by 1 week) |

| Duplicate term with different dates | Ask user whether to update existing or skip — do not auto-update without confirmation |

| Registration window after term start | This is invalid — ask user to provide correct registration open date |

| Academic Year end date before last term end date | Extend Academic Year to cover all terms, or adjust term dates |

| Input carries a term-level add/drop date but no session subdivisions | AcademicTerm has no add/drop field — surface the term-vs-session placement to the user or propose a session per term to carry the date; never write it onto AcademicTerm and never silently drop it |

| User provides 3-part year range (2025-2026-2027) | Clarify with user — Academic Year spans exactly 2 years (e.g., 2025-2026) |

| Session without parent term | Every session must link to a term — if user provides session dates without term, ask which term it belongs to |


Output Expectations

Deliverables:

Terms link to the parent Academic Year (AcademicYearId); sessions link to the parent Term (AcademicTermId). These objects have no Account reference field.


Cross-Skill Integration

| Need | Delegate to |

|------|-------------|

| Institutional hierarchy (Accounts, campuses) | No dedicated skill yet — set up manually |

| Course scheduling and offerings | Course offering generation skills |


Reference File Index

| File | When to read |

|------|-------------|

| references/foundation_prerequisites.md | Step 0 — org edition, Lightning Experience, EDU license, permission set assignment, Education Cloud Foundation enablement; run before Step 1 on every standalone invocation |

| references/calendar-systems.md | When user's calendar system is unclear or non-standard |

| references/date-validation.md | When validating complex date overlaps or multi-session terms |

| examples/semester-calendar.json | To verify output structure for semester system |

| examples/quarter-calendar.json | To verify output structure for quarter system |

| examples/sample-output.md | To see filled-in renderings of the proposed-structure display, completion summary, and calendar-view table |

| scripts/validate_calendar_dates.py | Invoked in step 4 to validate date ranges and compute RegistrationCloseDate deterministically |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.