D
Modul

Pesan Follow Up

Template pesan follow-up otomatis sebelum & sesudah penjualan. Setting global per store, beda dengan followup per AI Agent.

Modul Pesan Follow Up mengonfigurasi template pesan otomatis sebelum dan sesudah penjualan. Setting global per store, dipakai oleh semua agent.

File kunci

FileBarisPeran
app/Http/Controllers/SettingController.php:46-310Render & update followup (versi baru)
app/Http/Controllers/SettingController.php:365-411update_followup() & update_product_followup() (versi lama)
app/Helpers/FollowUpFileHelper.phpKonversi file followup

Model

Tidak ada model Followup — tersimpan sebagai field embed di Setting document:

  • followup_before_sales (baru) — array keyed by type (call_to_order, upselling, dll)
  • followup_after_sales (baru) — array keyed by type (complete_order, cancel_order, delivery, dll)
  • followUp (lama) — struktur beda, di-update lewat update_followup & update_product_followup

Controller method utama

MethodFungsi
followup()Render Setting/FollowUp/Index + konversi via FollowUpFileHelper
updateFollowUp()Update satu type followup + handle image S3
update_followup()Versi lama — update field followUp di setting
update_product_followup()Update followUp di Product (bisa batch productId='all')

Route

MethodPathFungsi
GET/setting/followup-textHalaman followup
PATCH/api/setting/update-followup/{id}Update (baru)
POST/api/setting/update_followupUpdate (lama)
POST/api/setting/update_product_followupUpdate product followup

Frontend

FileCatatan
Setting/FollowUp/Index.vueWrapper
Setting/FollowUp/BeforeSales.vueSebelum penjualan
Setting/FollowUp/AfterSales.vueSetelah penjualan
Setting/FollowUp/Before/{7 file}.vueStub per kategori (11 baris each)
Setting/FollowUp/After/{7 file}.vueStub per kategori
Setting/FollowUpText.vue (1.687 baris)Orphan — versi lama

Temuan

  • Dua sistem followup paralel — baru (followup_before_sales/_after_sales) vs lama (followUp). Keduanya masih aktif
  • update_product_followup bisa batch update semua produk (productId='all') — bahaya bila salah kirim
  • update_followup mass-assign dari request tanpa validasi — bisa simpan struktur arbitrary
  • FollowUpText.vue (1.687 baris) orphan — controller render FollowUp/Index