(Day 233) Sending notifications for suspicious transactions to customers

Ivan Ivanov · August 21, 2024

Hello :) Today is Day 233!

A quick summary of today:

  • grafana alert issues
  • setting up KakaoTalk alerts

This will be a quick one as it is midnight and I am really sleepy. I could not write this earlier as I was debugging issues with Grafana (at first), and then setting up my Kakao API.

As for the Grafana issues. We wanted to send alerts whenever a fraud transaction is detected. In Grafana I set up an alert dashboard where if all models predict a transaction is fraud, the transaction appears there

image

Part of the problem was that initially there was not a transaction in my database that was predicted to be fraud by all models so this dashboard kept not working even though I set up the code that queries the database to just return 1s - but this did not work, and it started working like magic at some point. Then I realised that I guess this dashboard requires data to be there.

Anyway, that was fixed.

Email notifications

I wanted to setup to send an email every time a transaction was labaled as fraud, but this required some smtp server. After some searching online I could not find a way to set it up. I found some websites, but for some reason they denied my account(?) which I did not understand.

Because I could not set up an email notif system, I set it up in Discord which worked after some setup. This was fine, but not really ideal for presentation in front of the Korean judges.

KakaoTalk notifications

Then my project partner suggested to use KakaoTalk to send notifications to the customers. This was a great suggestion as I could easily write this in python and add it to our pipeline. After some platform setting up, I started getting messages on my personal account.

image

The text is in Korean, but it is just basic information about the transaction and asking the customer to contact the bank if they do not recognise this suspicious transaction.

The bad thing was that because technically I am sending these to myself, I do not get notifications. So I started looking at how to add a push notification. To achieve that I needed to add a 2nd account (pseudo user, if you will) to the KB-alarm-bot - this is the name of the Kakao App for notifying customers, that sends messages. And now instead of sending messages to myself, a bot sends messages to me so I can get sound and in-app notifications.

image

At the end, I recorded a video. But today my project partner and I will do the final touches to make sure it looks great because this is the final and most important video:

Here is a link to youtube


That is all for today!

See you tomorrow :)