For Developers

Implementation Details

How the Integration Works

Edlink connects to iSAMS using the Batch API: a streaming XML POST to /api/batch/1.0/xml.ashx. Each sync step requests one (or a small set of) Batch method(s), parses the XML response, and transforms records into Edlink models.

Authentication uses OAuth 2.0 client_credentials against /auth/connect/token (default scope apiv1). Every Batch call sends both:

  • Authorization: Bearer <access_token>
  • ?apiKey=<client_id> (the OAuth client ID)

Configuration on the Edlink source:

FieldPurpose
urliSAMS host (or full xml.ashx URL — both forms are accepted)
client_idOAuth client ID; also used as the Batch apiKey query parameter
client_secretOAuth client secret
scopeOptional; defaults to apiv1 for Batch
timezoneIANA timezone (or fixed offset) used when interpreting naive iSAMS datetimes for terms, timetable week allocations, and period bounds

Official iSAMS Batch documentation: iSAMS Batch API.

Entity Mapping

iSAMS Entity / SourceEdlink Model
Synthesized from team/sourceDistrict
Synthesized (single school)School
Term (School_GetSchoolTerms)Session
Building (Estate_GetAllBuildingsAndClassrooms)Facility
Classroom (nested under Building)Room
Department (Teaching_GetDepartmentsAndSubjects)Department
Subject (nested under Teaching department)Subject
Teaching set (Teaching_GetTeachingSets)Class
Staff member (HumanResources_GetCurrentStaff)Person (Teacher or Staff)
Pupil (Pupil_GetCurrentPupils)Person (Student)
Contact (ContactAdvanced_GetContacts)Person (Guardian)
Contact ↔ Pupil linkAgent
Pupil timetable Set periods (Timetable_GetPupilTimetables)Enrollment (Student)
Teaching-set teacher IDs (Teaching_GetTeachingSets)Enrollment (Teacher)
Period (Timetable_GetTimetableStructure)Period
Year (School_GetAllYears)Lookup only (grade-level mapping for teaching sets)
Week allocation (Timetable_GetTimetableWeekAllocations)Lookup only (binds structure weeks to calendar dates / terms)
Contact type (ControlPanel_GetContactTypeGlobalList)Lookup only (guardian parental-responsibility defaults)
  • District / School: One district and one school are created from the Edlink team name and fixed external IDs (isams_district / isams_school), not from a multi-campus iSAMS org tree.
  • People: Staff roles are derived from iSAMS role titles plus the TeachingStaff bit (for example Teacher, Teaching Assistant, Administrator, or Staff). Teaching staff (TeachingStaff=1) map to role Teacher; other staff map to Staff. Pupils map to Student. Contacts map to Guardian. Person external_id values use iSAMS @PersonId where present; enrollments remap entity @Id values through sync lookups.
  • Agents: Guardian–student relationships are created from nested pupil links on contacts. Contacts with effective parental responsibility Yes receive the LegalGuardian agent flag.
  • Classes: Teaching sets are the class source. There is no separate Course entity on this path. Room / period / session stamps and class lifecycle state come from pupil timetable Set periods plus term disposition.
  • Enrollments: Student enrollments are grouped from Timetable_GetPupilTimetables Set periods (PeriodType=Set with @SetId). Teacher enrollments are derived from teachers on teaching sets after staff are loaded; period/@TeacherId rows feed teacher enrollment state. State is Active / Upcoming / Completed / Inactive from the related academic terms.
  • Periods: Bell-schedule periods come from Timetable_GetTimetableStructure. Class↔period linkage and session disposition use pupil timetable Set periods plus Timetable_GetTimetableWeekAllocations (not Curriculum blocks).

Batch Methods Used for Rostering

These methods are expected to be allocated on the Batch API client (and are checked during source validation via ISAMS_BATCH_ROSTERING_METHODS):

MethodUsed for
Timetable_GetTimetableWeekAllocationsISO week → structure-week calendar bounds for term disposition
Timetable_GetPupilTimetablesStudent enrollments; class room/period/session links
School_GetAllYearsYear / grade lookups for teaching sets
School_GetSchoolTermsSessions; class/enrollment lifecycle state
Estate_GetAllBuildingsAndClassroomsFacilities and rooms
Teaching_GetDepartmentsAndSubjectsDepartments with nested subjects
Teaching_GetTeachingSetsClasses; teacher IDs for teacher enrollments
HumanResources_GetCurrentStaffStaff / teachers
Pupil_GetCurrentPupilsStudents
ContactAdvanced_GetContactsGuardians and agents
Timetable_GetTimetableStructurePeriods (optional in sync: missing allocation → warning)
ControlPanel_GetContactTypeGlobalListContact-type defaults for guardians (optional in sync: missing → warning)

Curriculum Manager methods (Curriculum_GetDepartments, Curriculum_GetSubjects, Curriculum_GetCourses, Curriculum_GetClasses, Curriculum_GetClassStudents, Curriculum_GetCycles, Curriculum_GetTypes, Curriculum_GetBlocks, …) are not used by the current rostering sync and are not required for onboarding validation.

Some contact methods require filter XML in the Batch request body (for example ContactAdvanced_GetContacts). Edlink supplies those filters during sync. Teaching and Timetable rostering methods above are requested unfiltered.

Additional Notes

  • Streaming responses: Roster XML can be large; Edlink streams and SAX-parses responses rather than buffering the full document.
  • Errors: iSAMS application errors often return an XML <Message> envelope (e.g. MethodsNotAllocatedToKeyException, InvalidApiKey, ServiceThrottled) rather than only HTTP status text.
  • REST API: An older REST OAuth path (scope restapi) may exist in code for compatibility but is not what the rostering sync uses.
  • Historical / former pupils: Syncing historical data is not supported.

Custom Field Mapping

Custom field mapping is not supported.

The following fields can be custom-mapped in our dashboard UI: