SDMSDM Documentation
PluginsTransform Plugins

Class Consolidation

Merge multiple classes into consolidated groups

Class Consolidation

Class consolidation solves a common problem: your SIS creates separate class sections (Math 1A, Math 1B, Math 1C) but you want them as a single class in Apple School Manager. This transform intelligently merges classes based on patterns you define, combining all students and teachers while respecting ASM's 15-instructor limit.

Overview

  • Plugin ID: transform-consolidation
  • Input: OneRoster data with multiple class sections
  • Output: OneRoster data with consolidated classes
  • Best For: Schools with multiple sections per subject

Why Consolidate Classes?

Common Scenarios

  1. SIS creates separate sections - Your SIS tracks "Math 1A", "Math 1B", "Math 1C" separately, but in ASM you want one "Math Grade 1" class
  2. Multiple teachers per subject - You want all teachers for a subject in one class
  3. Simplified class management - Fewer classes in ASM means easier administration

What Consolidation Does

  • Combines multiple classes into one based on a grouping key
  • Merges all student enrollments into the consolidated class
  • Merges all teacher enrollments (with overflow handling for ASM's 15-instructor limit)
  • Preserves all original data - consolidation is non-destructive

Extraction Method: Metadata JSON Path

Use this method when your SIS stores grouping information in class metadata fields.

Consolidation Settings - Metadata

When to Use

  • Your SIS exports a metadata field with consolidation keys
  • You have control over what metadata your SIS exports
  • The grouping information isn't easily extractable from class names

Configuration

FieldDescriptionExample
Metadata FieldName of the metadata fieldgrades, customData
JSON PathPath to the consolidation key$.consolidation_key, $[0]

Example: Metadata with Consolidation Key

Source Data (before consolidation):

Class IDTitleMetadataStudentsTeachers
c-001Math 1A{"consolidation_key": "math-g1"}252
c-002Math 1B{"consolidation_key": "math-g1"}232
c-003Math 1C{"consolidation_key": "math-g1"}241
c-004English 1A{"consolidation_key": "eng-g1"}261
c-005English 1B{"consolidation_key": "eng-g1"}221

Configuration:

  • Metadata Field: metadata
  • JSON Path: $.consolidation_key

Result (after consolidation):

Class IDTitleStudentsTeachers
math-g1Math Grade 172 (combined)5
eng-g1English Grade 148 (combined)2

All original enrollments are preserved and combined into the consolidated classes.


Extraction Method: Class/Course Name

Use this method when the grouping key can be extracted from class or course names using a regular expression.

Consolidation Settings - Class/Course Name

When to Use

  • Class names follow a predictable pattern (e.g., "Math 1A", "Math 1B")
  • You want to extract subject or grade from the name
  • You don't have metadata fields available

Configuration

FieldDescriptionExample
Source FieldWhich field to extract fromtitle, courseTitle, code
Regex PatternPattern with capture group^([A-Za-z]+)\s*\d, ^(.+)-\d+$

The regex must include a capture group (parentheses) to extract the consolidation key. The captured value becomes the grouping key.

Example: Extract Subject from Class Title

Source Data (before consolidation):

Class IDTitleCourseStudentsTeachers
c-001Math 1AMathematics252
c-002Math 1BMathematics232
c-003Math 1CMathematics241
c-004English 1AEnglish Language261
c-005English 1BEnglish Language221
c-006Science 2AGeneral Science202
c-007Science 2BGeneral Science221

Configuration:

  • Source Field: title
  • Regex Pattern: ^([A-Za-z]+)\s*\d (captures letters before the first digit)

How the regex works:

  • ^ - Start of string
  • ([A-Za-z]+) - Capture group: one or more letters (the subject name)
  • \s* - Optional whitespace
  • \d - A digit (the grade/section number)

Extraction results:

Original TitleCaptured Key
Math 1AMath
Math 1BMath
English 1AEnglish
Science 2AScience

Result (after consolidation):

Class IDTitleStudentsTeachers
MathMath725
EnglishEnglish482
ScienceScience423

ASM Overflow Handling

Apple School Manager limits classes to 15 instructors. When a consolidated class has more than 15 teachers, SDM automatically creates overflow classes.

How Overflow Works

  1. Primary class created with first 15 instructors and all students
  2. Overflow classes created for remaining instructors: "Math-2", "Math-3"
  3. Students remain in the primary class only
  4. All instructors are distributed across overflow classes

Example: Overflow Handling

Before consolidation: 5 Math classes with 4 teachers each = 20 teachers total

After consolidation:

ClassInstructorsStudents
Math15125 (all)
Math-250

Configuration Options

FieldDescriptionRequired
Methodmetadata or fieldYes
Metadata FieldField name for metadata methodIf metadata
JSON PathPath within metadataIf metadata
Source Fieldtitle, courseTitle, or codeIf field
Regex PatternPattern with capture groupIf field
LocaleLanguage for generated class namesNo

Best Practices

  1. Test with preview first - Always generate a preview to verify consolidation results before publishing
  2. Document your patterns - Note why specific regex patterns were chosen for future reference
  3. Verify instructor counts - Check that consolidated classes don't exceed 15 instructors (or overflow classes are created)
  4. Use specific patterns - More specific regex patterns reduce unintended matches
  5. Consider edge cases - What happens if a class name doesn't match your pattern?

Classes that don't match your consolidation pattern are passed through unchanged.

On this page