Skip to main content

Architecture

Build a small, stateless middleware that reacts to Eduframe webhooks, reads the full record from the Admin API and upserts it into the LMS. The pattern works for Moodle, Blackboard, Brightspace or any LMS with an API.

The happy path​

The payload only contains the event name and the entity id. Always fetch the current record from the API before acting. That way a burst of updated events, or an event that arrives late, still results in the correct final state in the LMS.

Rules that keep the sync correct​

  • Idempotent writes. Every operation should be safe to run twice. Look up by Eduframe id before creating, and update instead of create when the record exists. Webhooks are delivered at least once, with up to three delivery attempts when your endpoint fails.
  • Order does not matter, but concurrency does. Events for the same record can arrive out of order. Because you fetch the current state from the API, applying the latest fetch always wins, as long as two workers never handle the same record at the same time. Process events for one record serially (a queue partitioned by entity id, or a lock per record), or compare the record's updated_at with what you last wrote and skip stale work. Do not apply state from the payload itself.
  • Dependencies first. An enrollment.created event needs the LMS course and the LMS user to exist. The user is not a problem: fetch it by student_id and create it in the LMS on the spot, as described in Sync users. The planned course is normally synced long before anyone enrolls, so if it is missing in the LMS an earlier sync failed. In that case create it on the spot as well. Do not count on Eduframe redelivering the event: you acknowledged it before the work started, so retries are your queue's job. Give the queue a retry with backoff and a dead-letter store for events that keep failing.
  • Respect rate limits. Back off on 429 and cache lookups. See Rate limits.

Where to run it​

Anything that can receive HTTPS and make outbound API calls works: a serverless function with a queue, a small container, or an integration platform such as Azure Logic Apps, Make or n8n. Keep secrets (the Eduframe API key, the webhook signing secret and the LMS credentials) in your platform's secret store.