Overview

Service to sending push notifications to FE application. Provider for push notifications is Ably

API

HTTP

(Swagger) All endpoints are deprecated and cannot be used to sending push notifications. They were created long time ago when wasn’t defined architecture of Ably channels we use now. This endpoints were used primarily for testing purposes.

Kafka

Service listens to topic commons.send-push-notifications.command.v2 and consumes SendPushNotificationCommandV2. After receiving Kafka message, service puts data in proper format and sends it to Ably channel.

Implementation Details

Service publishes push notifications into Ably channels which are in format customer:<customerId> . So every message is addressed to one particular customer. Ably consumes push notification like JSON in this format:

{
  "push" : {
    "notification" : {
      "title": "sample title",
      "body": "sample body"
    }
    "data": <metadata> 
  }
}

Metadata is object containing key-value pairs and is used for sending additional information into FE application (e.g. deepling).

Usage

Push notification aren’t intended to be sent directly. Instead create template for required message in output-manager. Then just set channel of POST request of generated endpoint to PUSH (or ignore it, since PUSH is default option).