If the Notification service is not directly connected to an SMTP / SMS server and you want to use an external system for sending the notifications, you can use the notification plugin just to forward the notifications to your custom implementation.
Yu will need the name of the kafka topics defined at the following environment variables:
KAFKA_TOPIC_NOTIFICATION_INTERNAL_IN
- topic used to trigger the request to send a notificationKAFKA_TOPIC_NOTIFICATION_EXTERNAL_OUT
- the notification will be forwarded on this topic to be handled by an external systemKAFKA_TOPIC_NOTIFICATION_INTERNAL_OUT
- topic used for sending replies after sending the notificationYou can check the defined topics by going to FlowX Designer > Platform Status > notification-plugin-mngt > kafkaTopicsHealthCheckIndicator > details > configuration > topic > notification.
Let’s pick a simple use case. Imagine we need to send a new welcome letter when we onboard a new customer. You must follow the next steps:
Make sure that the Forward on Kafka checkbox is ticked, so the notification will be forwarded to an external adapter.
Configure the data model for the template.
To configure a document template, first, you need to define some information stored in the Body:
KAFKA_TOPIC_NOTIFICATION_INTERNAL_IN
.Forward on Kafka option will forward the notification to an external adapter, make sure the needed Kafka topic for forwarding is defined/overwritten using the following environment variable: KAFKA_TOPIC_EXTERNAL_OUT
.
Response example at KAFKA_TOPIC_NOTIFICATION_INTERNAL_OUT
: