1
Get Ticket URL using PHP
Idea shared by Leo Novelli - 10/21/2014 at 1:38 PM
Proposed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>SmarterTrack :: Get Ticket URL</title>
</head>

<body>

<form action="#" method="post">
  Enter Ticket Number: <input type="text" name="ticket" maxlength="17" />
  <input type="submit" value="go" />
</form>

<?php

if (isset($_POST['ticket'])) {

	// User and Server Variables
	$user='STusername';
	$pswd='STpassword';
	$wsdl = "http://support.mycompany.com/Services2/svcTickets.asmx?wsdl";

	// Soap Request
	$ticket=$_POST['ticket'];
	$param=array('authUserName'=>$user, 'authPassword'=>$pswd, 'ticketNumber'=>$ticket);
	$smartclient = new soapclient($wsdl, $param);
	$list=$smartclient->GetTicketURL($param);
	
	// Soap Response
	$list=$list->GetTicketURLResult;
	$url=$list->RequestResult;
	
	// Display URL 
	print "$url";
}

?>

</body>
</html>
SmarterTrack use to have the ability for someone to view any ticket simply by entering their email address and ticket number.  Sometimes we have customers that are not registered with SmarterTrack who send us support requests.  Some of the responses direct our customers to previous tickets they had sent us and we responded to that have already been closed.  In the past we would supply them with the URL to view tickets, the email address they used to create the ticket and the ticket number.  Now that this is no longer available we wanted to be able to do the same thing without forcing the customer to register within SmarterTrack.  SmarterTrack now was the ability to create a custom URL which will allow someone to view a previous ticket using a web service and SOAP.  Unfortunately this capability is not part of the user interface.  Therefore I created a quick and dirty PHP script to get the Ticket URL of any ticket that you can then send to your customer.
 
 

Reply to Thread