Sefket Posted November 24, 2010 Share Posted November 24, 2010 I am a Sales Representative of a Web Hosting Company, and there is one thing that I encountered that if it got fixed, it would be greatly appreciated. If someone needs Tech Support on Live Chat and a Tech Support person isn't present, I go into WHMCS Administration area, create a new ticket for them but then it only says I can make a ticket for only "Sales". Is it possible to fix this so I can submit tickets for Tech and Billing also? Thanks, Sefket 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted November 24, 2010 WHMCS CEO Share Posted November 24, 2010 You can create tickets in any department you are assigned to. So from the sounds of it, you just need to make sure that your admin account is assigned to all the departments that you have setup in WHMCS. To do this, go to Setup > Administrators and ensure all the checkboxes are ticked for departments in your admin profile. Matt 0 Quote Link to comment Share on other sites More sharing options...
-Karl- Posted November 24, 2010 Share Posted November 24, 2010 Matt, I really don't understand that. Sefket is working for me, he is a Sales Representative so I'm not assigning another department to him as he will not be in charge of these tickets. However, I would like him to be able to open a ticket on behalf of a client to a selected department so that I can then look at the issues. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted November 25, 2010 WHMCS CEO Share Posted November 25, 2010 Ok, in that case he could use the login as client link on the client summary page and submit it from the frontend on the users behalf to any available department. Matt 0 Quote Link to comment Share on other sites More sharing options...
-Karl- Posted November 25, 2010 Share Posted November 25, 2010 Thanks a lot Matt, really appreciate it. 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted November 26, 2010 Share Posted November 26, 2010 Karl; Another great solution to this problem would be working with the WHMCS API. Just for fun This does the exact same thing as logging in as a client and posting the ticket. Setup a WHMCS API account (as you should us a separate unused account to access the API). Create a password protected sub-domain/sub-directory such as supportticket.mydomain.com (this is only accessible by your workers through htaccess). Create the index page with the following changing the top settings. <?php $url = "http://www.yourdomain.com/whmcs/includes/api.php"; # URL to WHMCS API file $username = "Admin"; # Admin username goes here $password = "demo"; # Admin password goes here $postfields["username"] = $username; $postfields["password"] = md5($password); if ($_POST["submit"] == "sendTicket") { $postfields["action"] = "openticket"; $postfields["clientid"] = $_POST["client"]; $postfields["deptid"] = $_POST["department"]; $postfields["subject"] = $_POST["subject"]; $postfields["message"] = $_POST["message"]; $postfields["priority"] = $_POST["priority"]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! echo "Ticket Submitted"; exit; } else { # An error occured echo "The following error occured: ".$results["message"]; exit; } } else { $postfields["action"] = "getsupportdepartments"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $oXML = new SimpleXMLElement($data); if ($oXML->result=="success") { $departmentResults = $oXML; } else { # An error occured echo "The following error occured: ".$oXML->message; } $postfields["action"] = "getclients"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); echo $data; $oXML = new SimpleXMLElement($data); if ($oXML->result=="success") { $clientResults = $oXML; } else { # An error occured echo "The following error occured: ".$oXML->message; } } ?> <h1>Submit a ticket:</h1> <form method="post" action="test.php"> <input type="hidden" name="submit" value="sendTicket" /> <table> <tr> <td>Department:</td> <td><select name="department"> <?php foreach($departmentResults->departments->department as $department) { echo "<option value=\"".$department->id."\">".$department->name."</option>"; } ?> </select></td> </tr> <tr> <td>Client:</td> <td><select name="client"> <?php foreach($clientResults->clients->client as $client) { echo "<option value=\"".$client->id."\">".$client->id." - ".$client->firstname." ".$client->lastname."</option>"; } ?> </select></td> </tr> <tr> <td>Subject:</td> <td><input type="text" name="subject" /></td> </tr> <tr> <td>Priority:</td> <td><select name="priority"> <option value="Low">Low</option> <option value="Medium">Medium</option> <option value="High">High</option> </select></td> </tr> <tr> <td>Message:</td> <td><textarea name="message" rows="5" cols="50"></textarea></td> </tr> <tr> <td></td> <td align="right"><input type="submit" value="Submit" /></td> </tr> </table> </form> And you are good to go There you have it fun with the WHMCS API! WOO! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.