Jump to content

Submitting support tickets


Sefket

Recommended Posts

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

Link to comment
Share on other sites

  • WHMCS CEO

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :lol: There you have it fun with the WHMCS API! WOO!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated