Caused by

Result object

The new student class registration trigger returns information about a User’s registration to a new group, payment metadata, and other related fields.

Example object

{ 
	"event": { 
		"type": "registration.succeeded", 
		"sent_time": "2019-10-30T15:36:10.062347" 
	}, 
	"id": 94658, 
	"user": { 
		"id": 52047,
		"username": "john_doe", 
		"first_name": "John", 
		"last_name": "Doe", 
		"email": "[email protected]", 
		"membership": { 
			"membership_type": "Student", 
			"is_school_admin": false, 
			"can_manage_school": false, 
			"can_create_course": false,
			"consent_dtime": "2019-11-05T21:31:00.762135+00:00",
			"consent_snapshot": "Email me feature updates, examples, and interesting news."
		}
	}, 
	"school": { 
		"id": 828, 
		"name": "Online Academy" 
	}, 
	"cohort": { 
		"id": 14607, 
		"name": "My Group",
		"created_by": { 
			"id": 52123,
			"username": "beth_smith", 
			"first_name": "Beth", 
			"last_name": "Smith", 
			"email": "[email protected]", 
			"membership": { 
				"membership_type": "Admin", 
				"is_school_admin": true, 
				"can_manage_school": true, 
				"can_create_course": true
			}
		}
	}, 
	"resource": { 
		"id": 2791, 
		"name": "Algebra 1",
    "resource_type": "course"
	}, 
	"registration": { 
		"id": 94658, 
		"role": "Student",
		"path": {
			"points": {
				"percent_of_max": 31.428571428571427, 
				"max_possible": 350, 
				"earned": 110
			},
			"steps": {
				"total_available_steps": 10,
				"total_required_steps": 8,
				"total_optional_steps": 2,
				"completed_steps": 5,
				"completed_required_steps": 4,
				"completed_optional_steps": 1,
        "total_steps_pending_review": 1
			}
		}
	}, 
	"payment": { 
		"id": 95011, 
		"amount": 0, 
		"discount_code": "DISCOUNT_CODE_HERE", 
		"discount_amount": 590.1 
	}, 
	"meta": { 
		"is_users_first_registration": true 
	}
}