Back to selected workKembali ke karya terpilih
Reporting automationOtomatisasi laporan

WhatsApp Sales Monitoring BotBot Monitoring Sales WhatsApp

Scheduled sales and margin reports for 9 divisions that replaced a repetitive 10-minute manual step and reached staff on WhatsApp.Laporan sales dan margin terjadwal untuk 9 divisi yang menggantikan proses manual berulang selama 10 menit dan dikirim melalui WhatsApp.

Project at a glanceRingkasan project

My rolePeran saya
Reporting automation developmentPengembangan otomatisasi laporan
UsersPengguna
Indogrosir staff receiving operational reportsStaf Indogrosir penerima laporan operasional
Project statusStatus project
Automation running on a local serverOtomatisasi berjalan pada server lokal
My contributionKontribusi pribadi
SQL reporting logic, WhatsApp delivery, and scheduled automation.Logika laporan SQL, pengiriman WhatsApp, dan otomatisasi terjadwal.
Sales report delivered by the WhatsApp monitoring bot

A scheduled sales and margin summary delivered directly to the operational WhatsApp group.Ringkasan sales dan margin terjadwal yang dikirim langsung ke grup WhatsApp operasional.

Jump to screenshotsLangsung ke screenshot bukti
OutcomeHasil
9 divisions receive the reportsLaporan menjangkau 9 divisi
OutcomeHasil
10-minute reporting step automatedProses laporan 10 menit diotomatisasi
OutcomeHasil
Less dependency on reporting-team shiftsMengurangi ketergantungan pada shift tim report
OutcomeHasil
Sales and margin updates sent on scheduleUpdate sales dan margin dikirim terjadwal

The initial problemMasalah awal

Each sales and margin update required a repetitive manual process that took around 10 minutes. The information also needed to reach the operational team on a predictable schedule.Setiap pembaruan sales dan margin membutuhkan proses manual berulang sekitar 10 menit. Informasi tersebut juga harus diterima tim operasional berdasarkan jadwal yang konsisten.

Manual delivery created unnecessary effort and made proactive threshold alerts harder to maintain.Pengiriman manual menambah pekerjaan yang tidak perlu dan membuat alert ambang batas secara proaktif lebih sulit dipertahankan.

Role and responsibilitiesPeran dan tanggung jawab

I designed the reporting flow, wrote the database queries and formatting logic, connected WhatsApp delivery, configured the schedule, and prepared the bot to run continuously on a local server.Saya merancang alur laporan, menulis query database dan logika format, menghubungkan pengiriman WhatsApp, mengonfigurasi jadwal, dan menyiapkan bot agar berjalan terus pada server lokal.

Project constraintsBatasan project

  • The bot handled restricted operational information, so the deployment remained within the local environment.Bot menangani informasi operasional dengan akses terbatas sehingga deployment tetap berada di lingkungan lokal.
  • WhatsApp sessions and scheduled jobs needed to recover predictably after a process or server restart.Sesi WhatsApp dan pekerjaan terjadwal harus dapat pulih secara terprediksi setelah proses atau server dimulai ulang.
  • Report formatting had to remain readable on a phone and concise enough for a group conversation.Format laporan harus tetap mudah dibaca melalui ponsel dan cukup ringkas untuk percakapan grup.

How the system worksCara kerja sistem

A direct path from the first input to the operational result.Alur langsung dari input pertama hingga hasil operasional.

Trigger the scheduleJalankan jadwal

Cron Job starts the reporting process at the required time.Cron Job memulai proses laporan pada waktu yang ditentukan.

Query operational dataAmbil data operasional

Node.js queries PostgreSQL for the required sales, margin, and threshold information.Node.js menjalankan query PostgreSQL untuk mengambil informasi sales, margin, dan ambang batas.

Format the messageFormat pesan

TypeScript logic turns the query result into a concise mobile-friendly report.Logika TypeScript mengubah hasil query menjadi laporan ringkas yang mudah dibaca melalui ponsel.

Deliver and keep runningKirim dan jaga tetap berjalan

Baileys sends the report to WhatsApp while PM2 keeps the local process available.Baileys mengirim laporan ke WhatsApp, sedangkan PM2 menjaga proses lokal tetap tersedia.

Technical decisionsKeputusan teknis

The stack was selected around the workflow, deployment environment, and maintenance needs.Tech stack dipilih berdasarkan workflow, lingkungan deployment, dan kebutuhan pemeliharaan.

Typed reporting logicLogika laporan bertipe

TypeScript makes report structures and database results easier to validate as the automation grows.TypeScript membuat struktur laporan dan hasil database lebih mudah divalidasi ketika otomatisasi berkembang.

Baileys for WhatsApp deliveryBaileys untuk pengiriman WhatsApp

Baileys connects the automated process with the channel already used by the operational team.Baileys menghubungkan proses otomatis dengan kanal yang telah digunakan oleh tim operasional.

Local process supervisionPengawasan proses lokal

PM2 supervises the Node.js process, while qrcode-terminal supports session setup without adding a separate interface.PM2 mengawasi proses Node.js, sedangkan qrcode-terminal mendukung konfigurasi sesi tanpa menambah antarmuka terpisah.

Node.jsTypeScriptBaileysPostgreSQLqrcode-terminalPM2Local ServerCron Job

Screens and evidenceScreenshot dan bukti

Each image documents a real part of the interface or delivery.Setiap gambar mendokumentasikan bagian nyata dari antarmuka atau proses delivery.

Open any image to inspect the full-size screen.Buka gambar untuk melihat tampilan dalam ukuran penuh.

Sales report delivered by the WhatsApp monitoring bot

A scheduled sales and margin summary delivered directly to the operational WhatsApp group.Ringkasan sales dan margin terjadwal yang dikirim langsung ke grup WhatsApp operasional.

Back to case studyKembali ke studi kasus

Results and outcomesHasil dan dampak

The recurring 10-minute reporting step became a scheduled delivery that includes sales, margin, and threshold information in WhatsApp.Proses laporan berulang selama 10 menit berubah menjadi pengiriman terjadwal yang mencakup informasi sales, margin, dan ambang batas melalui WhatsApp.

OutcomeHasil

9 divisions receive the reportsLaporan menjangkau 9 divisi

OutcomeHasil

10-minute reporting step automatedProses laporan 10 menit diotomatisasi

OutcomeHasil

Less dependency on reporting-team shiftsMengurangi ketergantungan pada shift tim report

OutcomeHasil

Sales and margin updates sent on scheduleUpdate sales dan margin dikirim terjadwal

What I learnedHal yang dipelajari

Automation is only dependable when restart behavior, session recovery, and logging are treated as part of the feature.Otomatisasi hanya dapat diandalkan ketika perilaku restart, pemulihan sesi, dan logging diperlakukan sebagai bagian dari fitur.

Operational messages need a stable format so teams can scan the same values quickly every day.Pesan operasional membutuhkan format yang konsisten agar tim dapat memindai nilai yang sama dengan cepat setiap hari.

Threshold alerts are most useful when they identify the condition clearly and give the recipient enough context to respond.Alert ambang batas paling berguna ketika kondisi dijelaskan dengan jelas dan penerima memperoleh konteks yang cukup untuk merespons.

Need software that fits your business?Membutuhkan software yang sesuai dengan bisnis Anda?

Tell me about the workflow, inventory process, reporting task, web application, or customer-facing website you need to improve.Ceritakan workflow, proses inventaris, pekerjaan laporan, aplikasi web, atau website untuk pelanggan yang ingin Anda perbaiki.

Discuss your software projectDiskusikan project software Anda