PHP在微信开发中如何先自动回复然后在转入多客服

PHP在微信开发中如何先自动回复然后在转入多客服,就像:

if(substr($keyword,0,6)=="留言")
{  
     $msgType = "text";            
 $contentStr = "您的留言我们将记录在案!";
 $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);
echo $resultStr;//输出文本
  $result = $this->transmitService($postObj);//转入多客服
     return $result; 
    }

新手,请各位大神指教

https://blog.csdn.net/znb769525443/article/details/47108413