Skip to main content
In-built site notifications can be created in the following cases (there is an API notification type in brackets):
  1. When someone registers the user to a training (USER_REGISTERED_TO_TRAINING);
  2. One month before a certification expiration (ONE_MONTH_CERT_EXPIRATION);
  3. When a certification has expired (CERT_EXPIRED);
  4. When a user completes a training (TRAINING_COMPLETED);
  5. When a new badge is earned (BADGE_EARNED);
  6. For all community members (except the post author) when a new post is added (if the related setting is enabled for the community) (NEW_COMMUNITY_POST);
  7. When someone added a comment on the user’s post (POST_COMMENTED);
  8. When someone liked the user’s post or comment (POST_LIKED);
  9. When a new connection invitation is created (NEW_USER_INVITATION);
  10. When the user’s connection invitation is accepted (USER_INVITATION_ACCEPTED).

Notification API object

Notification object represents a single notification data:
ParameterTypeDescription
idIDRequired. The notification ID.
textStringRequired. The notification text.
typeNotificationTypeRequired. The type of the notification that can be used for the results filtering.
createdIntRequired. A timestamp when the notification was created.
statusNotificationStatusRequired. The notification status (read/unread). Can be used to filter the query results.
relatedEntityNotificationRelatedEntityAn entity that triggered the notification creation. Contains an API object that represents the entity.
cta[Cta]Contains the list of Call To Action objects available for the given notification.

Notification CTA

The list of available CTAs can differ depending on the notification type.
Action IDDescriptionCorresponding mutation/query
VIEW_LPAllows to view the learning path related to the notification.getLearningPath, example
VIEW_POSTAllows to view the post/comment related to the notification.getPost
ACCEPT_USER_INVITATIONAllows to accept the user invitation related to the notification and add the invitation initiator to the current user’s network.acceptUserInvitation
DECLINE_USER_INVITATIONAllows to decline the user invitation related to the notification.declineUserInvitation
VIEW_USER_CONTEXTView the related user context.getUserContext