Feature: Implement multi-stage Conversation Flow Engine with TestFlow

This commit is contained in:
Hamza-Ayed
2026-05-22 05:11:35 +03:00
parent b82a02f6fa
commit 7ec4d9becb
11 changed files with 737 additions and 0 deletions

View File

@@ -299,6 +299,11 @@ class WhatsAppController extends BaseController
private function triggerAutoReply(array $session, array $msgData)
{
try {
// Hook the Conversation Flow Engine to intercept messages for active or new flows
if (\App\Core\Flows\ConversationFlowEngine::processMessage($session, $msgData)) {
return;
}
$rule = \App\Models\ChatbotRule::findActiveForRule($session['company_id'], $session['id']);
if (!$rule || !$rule['is_active']) {
return;