Caused by

Result object

The new cohort trigger returns information about a new cohort and its creator, as well as potential licensing information.

Example object

{ 
	"event": { 
		"type": "cohort.created", 
		"sent_time": "2020-10-11T9:32:18.165187" 
	}, 
	"id": 94658,
	"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": "bsmith@example.com", 
			"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" 
	}, 
	"creator_registration": { 
		"id": 94658, 
		"role": "Teacher",
		"path": {
			"points": {
				"percent_of_max": 0, 
				"max_possible": 100, 
				"earned": 0
			},
			"steps": {
				"total_available_steps": 10,
				"total_required_steps": 8,
				"total_optional_steps": 2,
				"completed_steps": 0,
				"completed_required_steps": 40,
				"completed_optional_steps": 0,
        "total_steps_pending_review": 0
			}
		}
	}, 
	"license": {
		"id": 5603,
    "seat_count": 10,
		"expiration_dtime": "2020-12-11T9:32:18.165187",
    "payment": { 
			"id": 95011, 
			"amount": 5.0, 
			"discount_code": "DISCOUNT_CODE_HERE", 
			"discount_amount": 10.0 
		}, 
		"used_school_subscription": {
			"id": 871,
			"school_plan": { 
				"id": 7, 
				"amount": 27, 
				"name": "Monthly Plan", 
				"image": "",
				"giftable_cycles": 0
			}, 
			"subscription": {
				"id": 14519, 
				"subscription_plan": { 
					"id": 7, 
					"amount": 27, 
					"interval": "Monthly", 
					"trial_period_days": 0 
				}, 
				"trial_end_dtime": null, 
				"canceled_dtime": null, 
				"cycle_start_dtime": "2020-10-05T10:52:58Z", 
				"cycle_end_dtime": "2020-11-05T10:52:58Z", 
				"card_last_4": "5678", 
				"paused_until_dtime": null, 
				"is_canceled_at_cycle_end": false, 
				"is_delinquent": false, 
				"cancellation_reason": 0 
			}
		}
	},
	"licensed_from_cohort": { 
		"id": 8601, 
		"name": "Source Cohort for License",
		"created_by": { 
			"id": 52123,
			"username": "beth_smith", 
			"first_name": "Beth", 
			"last_name": "Smith", 
			"email": "bsmith@example.com", 
			"membership": { 
				"membership_type": "Admin", 
				"is_school_admin": true, 
				"can_manage_school": true, 
				"can_create_course": true
			}
		}
	}
}