我正在嘗試通過 PHP 和來自 OTRS 的 REST 通用接口創建票證(https://doc.otrs.com/doc/manual/admin/6.0/en/html/genericinterface.html#id-1.6.12.10.7.2) .我可以創建工單和文章。但 OTRS 歷史記錄看起來不像是外發電子郵件,而是用戶正在向隊列發送票證。而且也沒有郵件發送給客戶:-(。但是我喜歡有一個外發的電子郵件票證和票證的待處理狀態。這是我的 PHP 代碼<?phpheader("Content-type: application/json; charset=utf-8");require __DIR__ . '/vendor/autoload.php';use GuzzleHttp\Client;$client = new Client(['base_uri' => 'http://test-otrs.company.local/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/']);$arrTicket = array( "Title" => 'some ticket title', "Queue" => 'testqueue', "Lock" => 'unlock', "Type" => 'Unclassified', "State" => 'new', "Priority" => '3 normal', "Owner" => 'username', "CustomerUser" => '[email protected]');$arrArticle = array( "CommunicationChannel" => 'Email', "SenderType" => 'agent', "To" => '[email protected]', "Subject" => 'some subject', "Body" => 'some body', "ContentType" => 'text/plain; charset=utf8');$response = $client->post('Ticket', ['json' => array("UserLogin" => "username", "Password" => "testtesttest", "Ticket" => $arrTicket, "Article" => $arrArticle)]);if ($response->getBody()) { echo $response->getBody(); }
OTRS:通過 Web 服務創建外發電子郵件票
慕田峪7331174
2022-12-11 10:13:24