This page provides the list of events and associated payload for internal events (via RabbitMQ/AWS MQ) and external events (via EventBridge) for the Notification microservice.

External Events via EventBridge

The following events contain the entity changed in the event message payload.

List of Events

S.No.API callCall detailEvent TypeIdentifier
1.POSTCreateActionnotificationservice/action/createresponse_action.id
2.POSTCreateEventnotificationservice/event/createresponse_event.id
3.DELETEDeleteActionnotificationservice/action/deleterequest_id
4.DELETEDeleteEventnotificationservice/event/deleterequest_id
5.POSTSendNotificationsnotificationservice/notifications/sendresponse_notification.name
6.PATCHUpdateActionnotificationservice/action/updateresponse_action.id
7.PATCHUpdateEventnotificationservice/event/updateresponse_event.id

Payload

CreateAction

Event Type: notificationservice/action/create


{
  "version": "0",
  "id": "d02b9c9f-8ec1-4465-22db-df2608ac4f87",
  "detail-type": "notificationservice/action/create",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:40:05Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42453",
    "timestamp": 1709786405347,
    "payload": {
      "action": {
        "id": 42453,
        "collectionId": 775,
        "name": "Send Reset Email",
        "status": "ACTIVE",
        "description": "Used to Send Reset Email",
        "eventId": 42297,
        "configName": "SendEmailConfig",
        "template": "d-1257a7b8169f4d84aa3393cb4437cbcf",
        "updatedTime": 1709786405337,
        "createdTime": 1709786405337
      }
    },
    "collectionId": "775",
    "eventType": "notificationservice/action/create",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

CreateEvent

Event Type: notificationservice/event/create


{
  "version": "0",
  "id": "24db0910-b6b4-7f06-7188-97ae94fe4b32",
  "detail-type": "notificationservice/event/create",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:39:27Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42129",
    "timestamp": 1709786367875,
    "payload": {
      "event": {
        "id": 42129,
        "collectionId": 772,
        "name": "ExternalEvents1709786366982",
        "description": "Events description",
        "status": "ACTIVE",
        "updatedTime": 1709786367854,
        "createdTime": 1709786367854
      }
    },
    "collectionId": "772",
    "eventType": "notificationservice/event/create",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

DeleteAction

Event Type: notificationservice/action/delete


{
  "version": "0",
  "id": "4e5090b2-c63b-9066-2a4a-a03a2ada932a",
  "detail-type": "notificationservice/action/delete",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:40:20Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42509",
    "timestamp": 1709786420327,
    "payload": {
      "responseCode": "NOACDEL0000",
      "responseMessage": "Action is deleted successfully",
      "timeStamp": "1709786420325"
    },
    "collectionId": "776",
    "eventType": "notificationservice/action/delete",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

DeleteEvent

Event Type: notificationservice/event/delete


{
  "version": "0",
  "id": "fd3ca8ac-7a78-732d-e42b-e99428f0a0eb",
  "detail-type": "notificationservice/event/delete",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:39:49Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42241",
    "timestamp": 1709786389988,
    "payload": {
      "responseCode": "NOEVDEL0000",
      "responseMessage": "Event is deleted successfully",
      "timeStamp": "1709786389986"
    },
    "collectionId": "774",
    "eventType": "notificationservice/event/delete",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

SendNotifications

Event Type: notificationservice/notifications/send


{
  "version": "0",
  "id": "91357c58-0b8c-57ec-0f79-038258af943a",
  "detail-type": "notificationservice/notifications/send",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:39:55Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "USER_INVITEUSER",
    "timestamp": 1709786395165,
    "payload": {
      "notification": {
        "name": "USER_INVITEUSER",
        "recipients": [
          {
            "email": "externalevents1709786394020@gmail.com",
            "pushId": "hj7sdf67sqc9",
            "phone": "409-685-4167",
            "locale": "en_US",
            "macros": {
              "FNAME": "John"
            }
          }
        ]
      }
    },
    "collectionId": "772",
    "eventType": "notificationservice/notifications/send",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

UpdateAction

Event Type:  notificationservice/action/update


{
  "version": "0",
  "id": "69f8c9bf-5741-50a6-c65b-4b9ce3ceb6fb",
  "detail-type": "notificationservice/action/update",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:40:09Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42453",
    "timestamp": 1709786409670,
    "payload": {
      "action": {
        "id": 42453,
        "collectionId": 775,
        "name": "Send Reset Email",
        "status": "INACTIVE",
        "description": "Used to Send Reset Email",
        "eventId": 42297,
        "configName": "SendEmailConfig",
        "template": "d-1257a7b8169f4d84aa3393cb4437cbcf",
        "updatedTime": 1709786409660,
        "createdTime": 1709786405000
      }
    },
    "collectionId": "775",
    "eventType": "notificationservice/action/update",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

UpdateEvent

Event Type: notificationservice/event/update


{
  "version": "0",
  "id": "9448e038-9c1a-7e6a-2db6-33a4f44d2fa6",
  "detail-type": "notificationservice/event/update",
  "source": "notificationservice",
  "account": "277827593990",
  "time": "2024-03-07T04:39:40Z",
  "region": "us-east-1",
  "resources": [
    
  ],
  "detail": {
    "id": "42129",
    "timestamp": 1709786380289,
    "payload": {
      "event": {
        "id": 42129,
        "collectionId": 772,
        "name": "ExternalEvents1709786379551",
        "description": "Events description1709786379551",
        "status": "ACTIVE",
        "updatedTime": 1709786380278,
        "createdTime": 1709786368000
      }
    },
    "collectionId": "772",
    "eventType": "notificationservice/event/update",
    "userId": "1",
    "actOnBehalfOfUser": 0,
    "roles": [
      "ROLE_SUPER_ADMIN"
    ],
    "channel": "CSR"
  }
}

Internal Events via RabbitMQ/AWS MQ

The following events communicate with the internal microservices.

List of Events

SL.#NAMEDESCRIPTIONPUBLISH LOCATIONROUTING KEYDURABILITYPAYLOAD TYPE
1Notification QueueNotification service can subscribe to the notification queue to which the other services can send the events. When an event is triggered (for example, when a user is created), it is pushed into the notification queue. Notification service listens to that event message. Based on the payload data, which contains collection ID and event name, either sendEmail or sendSms action will be triggered.NAtrueNotificationQueue

Payload Model

NotificationQueue

PROPERTYTYPEDESCRIPTIONEXAMPLE
notification[].nameStringHolds the name of the notification.USER_INVITEUSER
notification[].recipients[].bccs[].emailStringRefers to the recipient's email address for the email notification.xyz@xyz.com
notification[].recipients[].bccs[].nameStringIndicates the name of the recipient.xyz
notification[].recipients[].ccs[].emailStringRefers to the recipient's email address for the email notification.xyz@xyz.com
notification[].recipients[].ccs[].nameStringIndicates the name of the recipient.xyz
notification[].recipients[].tos[].emailStringRefers to the recipient's email address for the email notification.xyz@xyz.com
notification[].recipients[].tos[].nameStringIndicates the name of the recipient.xyz
notification[].recipients[].phoneStringRefers to the recipient's phone number for the SMS notification. An SMS will be sent to this phone number.9876543210
notification[].recipients[].pushIdStringIndicates the push ID of iOS, which is used to create pop-up messages in the application.hj7sdf67sqc9
notification[].recipients[].macrosHashMapContains a list of macro name and value pairs. The given values will be replaced for the macro names in the email template.




Revision History
2024-05-22 | AN – Added external events for 8.17.4 release.
2019-06-10 | PLK – Minor copyedits.
2019-05-17 | AM – Updated to a new table tool.
2019-04-11 | AN – Content updated for April 2019 release.
2019-01-23 | PLK – Content uploaded.