Overview
When an important business event occurs, such as a new hire becoming eligible for benefits, Clasp creates a notification object. If the notification is “Clasp managed”, Clasp will immediately send an email. Otherwise, Clasp will only emit a webhook informing you of the new Notification and will not send an email. Please reach out to Clasp to configure which notification types are Clasp managed vs Partner managed.Notification Object
Each notification has the following structure:Field Descriptions
id: Unique identifier for the notificationnotification_type: Which type of notification this is. For example,welcomeis created for new hires andenrollment_submittedafter a member submits their enrollmentrelated_object_type: The type of object this notification is about (e.g.member,enrollment,open_enrollment_window)related_object_id: ID of the object this notification is aboutpayload: Commonly used information for notifications of this type that can be populated into your communicationsowner: Who is responsible for delivering this notification (partnerorclasp)created_at: Timestamp when the notification was created
Notification Types
| Notification Type | Created When | Related Object Type |
|---|---|---|
welcome | A new hire should be welcomed and invited to enroll | member |
newly_eligible | A member becomes eligible for benefits | member |
member_terminated | A member is terminated | member |
dependent_age_out | A member’s dependent is about to age out of coverage | member |
enrollment_submitted | A member submits their enrollment | enrollment |
enrollment_approved | A member’s enrollment is approved | enrollment |
open_enrollment_kickoff | An open enrollment window opens | open_enrollment_window |
open_enrollment_reminder | A member has not yet completed open enrollment | open_enrollment_window |
Receiving Notifications via Webhooks
Notifications work together with webhooks. When a notification is created, Clasp sends a webhook event withobject_type set to notification and the notification’s ID:
- Fetch the notification content with
GET /notifications/{object_id} - Check the
ownerfield. If the owner isclasp, Clasp will have initiated an email already. - Leverage the
notification_type,related_object_type, andrelated_object_idto identify what type of communications are required and for whom. - Use the
payloadfor notification specific data that is snapshotted at the time of the notification being created.