Decoupling course enrollment from Magento
Why I finally wrote this down
A B2B learning catalog had grown Magento into the middle of every product detail and series page. Craft already held the presentation data. Magento still answered catalog questions the frontend no longer needed. Every extra round trip was another failure mode on start-activity flows.
A weekend refinement forced the question: what does enrollment actually require? The answer was smaller than the platform diagram suggested.
What enrollment really requires
Customer identity: name, email, stable user ID, and store context.
Course identifier: the LMS or import-source ID on the product (and on each child when the offer is a bundle or series).
A cart or start-activity path: that does not round-trip unused Magento catalog APIs.
On Craft, series entries already carried related products. Loading those relations before the series page meant we could enroll into each child without asking Magento for the parent bundle details.
Before vs after
Before: product and series pages called Magento for data Craft already owned.
After: those pages read Craft entries (and GraphQL or REST only where still required). Magento stayed optional for legacy SKUs and for customer objects that were still the stable identity system.
The longer-term simplification was obvious once the pages stopped calling Magento: stop authoring product data in Magento for this catalog, write straight into Craft, and shrink Magento-to-Craft and Magento-to-search syncs.
Migration checklist
Inventory every hidden Magento call on product pages, series pages, and enrollment start.
Move product presentation to Craft with explicit caching.
Point start-activity flows at a Craft cart or a thin BFF.
Keep Magento read-only for leftover traffic until it hits zero, then freeze writes.
Revisit identity: if a learning platform JWT can establish the same user, Magento login may become optional later. Do not block catalog decoupling on that decision.
Risks
Reporting assumptions: pipelines that assumed Magento order IDs need a new primary key story.
Dual price rules: pick one source of truth before cutover day.
SSO and login edges: test start-activity with login, register, and already-authenticated paths separately.
Series page fragility: related-product component errors make series pages look empty. Fail loudly in network responses during QA.
Failure modes I keep debugging
Catalog still authored in Magento "temporarily": sync debt never shrinks.
Hard cutover without a read-only drain period: leftover deep links 500 in production.
Enrollment payload missing child IDs on bundles: parent enrolls, children do not.
Identity still Magento while catalog is Craft: fine short term, but document which system owns the customer record.
Quick review before cutover
Can product and series pages render with Magento unreachable?
Does enrollment send identity + course IDs for every child in a series?
Which system owns price and which owns presentation?
Are SSO, login, and register paths tested against start-activity?