nhance/app/Controllers/Chatbot/ReimbursementClaimProcessConversation.php
2025-02-04 15:51:39 +05:30

37 lines
949 B
PHP

<?php
// namespace App\Conversations;
namespace App\Controllers\Chatbot;
use BotMan\BotMan\Messages\Conversations\Conversation;
use BotMan\BotMan\Messages\Outgoing\Question;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
use App\Helpers\ChatbotHelper;
class ReimbursementClaimProcessConversation extends Conversation
{
public function run()
{
$this->bot->types(); // Typing indicator for the first message
sleep(0.5); // Delay
$this->claimProcess();
}
protected function claimProcess()
{
$res = ChatbotHelper::sendReimbursementProcessOverMail();
if($res == true)
{
$this->say("Reimbursement process shared over your registered mail...!");
}
else
{
$this->say("No email found in your profile / Please contact support team");
}
$this->bot->startConversation(new doYouWantToContinueConversation());
}
}