Courses let you deliver structured learning content (video, audio, or text lessons) to customers who have purchased access. Each course is organized into modules with lessons (contents). Enrollment is tied to a product purchase — when a customer buys the linked product, they are automatically enrolled.Documentation Index
Fetch the complete documentation index at: https://docs.elasticfunnels.io/llms.txt
Use this file to discover all available pages before exploring further.
How courses work
- You create a course in the ElasticFunnels dashboard with modules and lessons.
- You link a product to that course — purchasing the product grants enrollment.
- On your course pages,
getCourseForCustomer(slug)returnsis_assigned: truefor enrolled customers andfalsefor everyone else. - You gate content in the template: show the full course to enrolled customers, show an “Get access” CTA to others.
Setting up a course
1. Create the course
In the dashboard, go to Courses and create a new course. Add:- Title, slug, description, cover image, instructor name
- Category (optional — used for filtering on the course list page)
- Modules — each with a title and one or more lessons
- Lessons — each has a title, type (
video,audio, ortext), and a content URL or embed
2. Link a product to the course
In the course settings, select the product that grants access. When a customer purchases this product, an enrollment record is created automatically. You can link multiple products to the same course (e.g. a bundle and a standalone SKU both grant access to the same course).3. Create your course pages
You need at minimum two pages:| Page | Purpose |
|---|---|
| Course list | Show all available courses with enrollment status (assigned vs. not) |
| Course detail | Show a single course — full content if enrolled, “Get access” CTA if not |
Enrollment and is_assigned
Enrollment is created automatically by BrandCourseEnrollment when a purchase conversion is recorded for a product that is linked to a course.
The is_assigned flag is resolved per-customer when you call getCourseForCustomer({ slug }) or getCourses({ assignedOnly: false }). It is true if the currently logged-in customer has an enrollment record for the course.
started is true when the enrollment has any progress (at least one lesson completed or in progress).
Customers are automatically logged in after checkout, so a customer who just purchased will have
is_assigned: true the moment they land on the course page — no extra login step needed.Progress tracking
Progress is tracked server-side per customer, per lesson. All course functions that resolve enrollment (getCourseForCustomer, getCourses, getCoursesForCustomer) include the customer’s progress:
completed_content_ids— array of completed lesson IDsprogress_percent— 0–100is_completed—truewhen the course reaches 100%current_unfinished_lesson— object with module/lesson ids, titles, and resume URL when in progressresume_url— direct resume link when available
POST /api/course/courses/:courseId/lessons/:contentId/complete).
For dashboards and aggregate views, two additional functions are available:
getCompletedLessonsCount(opts?)— returns the total number of completed lessons (optionally filtered by course slug)getCourseProgress(opts?)— returns a structured summary with per-course and overall lesson counts
Course object structure
All course functions return objects with this shape:Related
Template Reference
Backend functions, course list, course detail, and access gating examples
Members Area
Auth wrapper pattern — protecting pages and reusing login logic
Backend Scripts
How backend scripts work on .ef pages
Backend Data Functions
Full reference for all data functions including getCourses