39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
// namespace App\Conversations;
|
|
namespace App\Controllers\Chatbot;
|
|
use App\Helpers\ChatbotHelper;
|
|
|
|
use BotMan\BotMan\Messages\Conversations\Conversation;
|
|
use BotMan\BotMan\Messages\Outgoing\Question;
|
|
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
|
|
|
|
|
|
class ReimbursementClaimStatusConversation extends Conversation
|
|
{
|
|
|
|
|
|
public function run()
|
|
{
|
|
$this->claimStatus();
|
|
}
|
|
|
|
protected function claimStatus()
|
|
{
|
|
$this->say("Fetching Status please wait ...");
|
|
|
|
$chat_session_info = get_chatbot_session_info();
|
|
$data = ChatbotHelper::getReimbursementClaimStatus($chat_session_info);
|
|
|
|
$this->bot->types();
|
|
if ($data){
|
|
$this->say("The claim status for the claim Number {$data['claim_number']} is currently in <strong>{$data['client_status']}</strong> status. <br> More Detailed Information is sent to your mail");
|
|
$this->bot->startConversation(new doYouWantToContinueConversation());
|
|
}else{
|
|
$this->say("No Claim Raised against the user.");
|
|
$this->bot->startConversation(new doYouWantToContinueConversation());
|
|
}
|
|
}
|
|
|
|
}
|