Triggering Client Actions from Active Pages

From support-works
Revision as of 08:51, 10 April 2015 by Rickyf (talk | contribs) (Created page with "{{Template:Basic Cover |title=Triggering Client Actions from Active Pages |type=FAQ |htl=Y }} {{Template:Basic Status |status=Published |version=1.0 |authors=HTL QA |applicab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



Status: Published
Version: 1.0
Authors: HTL QA
Applies to: Supportworks ESP up to Version 7.4.1

Triggering Client Actions from Active Pages

It is possible to create, on your active pages, hyperlinks that trigger Supportworks client actions, such as popping up a data-entry form or launching a Log Call or Call Details form. Examples of already-created hyperlinks are readily visible on your existing active pages. Such a hyperlink would contain a URL that includes a suitable command to the Supportworks server. The Supportworks server would then tell the Supportworks client to perform the action given by the command. The following is an example of a hyperlink you could use:

<a href="hsl:editrecord?table=userdb&key=<?echo $userdb_keysearch;?>">Edit Customer Record</a>

Within this particular hyperlink, the relevant server command is hsl:editrecord, and Edit Customer Record is the link's displayed label. The command parameters will be different for each server command. To create the hyperlink on an active page, you have to insert it at a suitable point in the PHP script that generates the active page.

Below is a list of the server commands you can call from an active page via a hyperlink. (Note that these commands will not work if you are using the Mozilla Gecko Layout Engine as the embedded Web browser for active pages.)

hsl:mycalls

This will switch the Supportworks client window to the specified tab of the specified Service Desk (Helpdesk) view, showing the calls, subject to the specified filter, that are assigned to the analyst currently logged into that client instance. The view is specified by its folder name as configured in the data dictionary (rather than by its displayed title). If no view is specified, the first folder found whose type is "helpdesk" will be used. If no tab is specified, or if its value is out of range or invalid, then the first tab (0) will be used. If no filter is specified, or the filter is not found, then the [No Filter] option will be used.

<a href="hsl:mycalls?view=Helpdesk View&tab=1&filter=Open Calls">View My Calls List</a>

hsl:kbsearch

This command will perform a KnowledgeBase search and return results in the KnowledgeBase view for documents in which matches were found against the search= parameter value passed in the hyperlink. Typically, you would use it for an active page that, for example, displays call details and you want the analyst to be able to do a KnowledgeBase search on something they submit from an edit field on that page. The search= parameter can consist of any PHP (or other) code that will return the analyst's input to the server command. In the example below, a string variable from the page's PHP script is used to provide that value.

<a href="hsl:kbsearch?search=<? echo $users_kb_query;?>">Search KnowledgeBase</a>

hsl:mail

This command will switch the client window to the specified system mailbox. If the logged-on user does not have permission to view the mailbox, a message will be displayed. Note that the parameter mailbox= accepts the underlying mailbox name rather than its display name and, for a shared mailbox, this requires an underscore prefix (_).

<a href="hsl:mail?mailbox=_helpdesk">View the Helpdesk Mailbox</a>

hsl:sqlsearch

This command will perform an SQL query database search. When the command is run, the Database Searches view is displayed, showing the results of the query submitted. In the command, you can optionally include a limit= parameter that allows you to limit the number of rows returned. Note that, if the query runs off one table, the associated active page will be displayed for the selected record, just as in a database entity view.

<a href="hsl:sqlsearch?query=select callref,owner,suppgroup,callclass,status from opencall&limit=100">View 100 Calls</a>

hsl:editrecord

The hsl:editrecord command allows analysts to open a record in a given table for editing. For example, the following hyperlink tells Supportworks to display the data-entry form for the table userdb and populate it with data from the record whose key value equals the value stored in the variable $userdb_keysearch:

<a href="hsl:editrecord?table=userdb&key=<?echo $userdb_keysearch;?>">Edit Customer Record</a>

As well as specifying the table and the key for the record to be accessed, you can also specify in the command which object on the data-entry form to set the initial focus on (e.g. which field to place the cursor in). This is done by including a formobj= parameter. Furthermore, if you intend to set the focus on a particular tab, you can specify this by using a formobj= parameter to indicate the tab control object, followed by a tab= parameter to indicate the actual tab item.

In the following example, when an analyst opens the customer record, the Attributes tab will be selected (assuming you have a tab control called "tab1" and a tab item whose tab label is "Attributes"):

<a href="hsl:editrecord?table=userdb&key=<?echo $userdb_keysearch;?>&formobj=tab1&tab=Attributes">Edit Customer Record</a>

hsl:awrecord

Assuming that you have Assetworks Discovery or a third-party asset discovery system installed, this command will launch the Hornbill Information Browser window, showing data for the identified computer. The value of the computerid= parameter would be the name by which the computer is known within the discovery system.

<a href="hsl:awrecord?computerid=123456">View Assetworks Information</a>

hsl:calldetails

Given a call reference value, this command will open up the Call Details form for the opencall record concerned.

<a href="hsl:calldetails?callref=12">View Call 12</a>

hsl:logcall

This command will launch a class-selection pop-up dialogue that allows analysts to start off the process of logging a call. In the script, you can pass in parameters that specify the customer for which to log the call (cust_id=) and the asset to associate with the call (asset_id=). Note that, if you pass in a customer or asset identifier that does not exist in swdata, then a prompt to create a new record would be given.

You will find that this type of link on an active page, where the database-entity view search was against the Customer table, is useful for analysts. It means that they can search for a customer and log a call easily, with associated records automatically being resolved when the Log Call form opens.

<a href="hsl:logcall?asset_id=1234&cust_id=<?echo $userdb_keysearch;?>">Log Call For Customer</a>

hsl:reactivatecall

This command will, given a call reference, reactivate a call that has been closed or cancelled. Once reactivated, the call will re-appear in the Service Desk (Helpdesk) view, in the context of the support group and analyst that the call was last assigned to.

<a href="hsl:reactivatecall?callref=12">Reactivate Call 12</a>

hsl:updatecall

This command will, given a call reference, display the standard Update Call form, so that the analyst can update the call concerned.

<a href="hsl:updatecall?callref=12">Update Call 12</a>

hsl:acceptcall

This command will, given a call reference, display the standard Accept Call form, so that the analyst can accept the call concerned.

<a href="hsl:acceptcall?callref=12">Accept Call 12</a>

hsl:transfercall

This command will, given a call reference, display the Assign Call tree, so that the analyst can assign the call concerned to another analyst.

<a href="hsl:transfercall?callref=12">Assign Call 12</a>

hsl:holdcall

This command will, given a call reference, display the standard Place Call On Hold form, so that the analyst can place the call concerned on hold.

<a href="hsl:holdcall?callref=12">Hold Call 12</a>

hsl:closecall

This command will, given a call reference, display the standard Resolve/Close Call form, so that the analyst can resolve or close the call concerned.

<a href="hsl:closecall?callref=12">Resolve/Close Call 12</a>

hsl:cancelcall

This command will, given a call reference, display the standard Cancel Call form, so that the analyst can cancel the call concerned.

<a href="hsl:cancelcall?callref=12">Cancel Call 12</a>

hsl:switchcontext

This command will switch the Service Desk (Helpdesk) view context to the group and/or analyst identified in the command. In the example below, the Service Desk view would be displayed in the context of the analyst whose ID is "billy".

<a href="hsl:switchcontext?group=support&analyst=billy">View Billy's Calls</a>

hsl:hotissue

This command, given an issue reference, will open a hot or known issue for viewing/editing. Note that hot/known issues are a feature of certain legacy applications, and have been superseded by Problems and Known Errors.

<a href="hsl:hotissue?issueref=123234">View Issue 123234</a>

hsl:mailto

This command will open an e-mail message window and populate the To field with the address and name specified as the command's parameter values.

<?
 $fullname = $userdb_firstname . " " . $userdb_surname;
?>
<a href="hsl:mailto?address=<? echo $userdb_email;?>&name=<? echo $fullname;?>">Email Customer</a>

Note that the PHP code preceding the actual hyperlink shown above ensures that the customer's full name is presented to the command.

hsl:tapidial

This command will attempt to dial the specified telephone number using TAPI. Note that this will only work if the analyst has a TAPI device installed on their machine.

<a href="hsl:tapidial?number=02085828282">Call Hornbill</a>

hsl:printme

This command will print the active page from which it is executed. The default print options will be used.

<a href="hsl:printme">Print Page</a>

hsl:analystproperties

This command will display the standard Analyst Properties dialogue for the analyst identified in the command.

<a href="HSL:analystproperties?id=admin">View Admin's Properties</a>

hsl:hslib

This command will run the Hornbill Information Browser at the specified relative URL to display inventory details for a specified asset. The relative URL parameter will be appended to the root URL of the HTTP server (which is http://&[app.server]/) to make up the full path. This gives access to any URL on the server. Note that a preceding "/" is not necessary in the relative URL path.

<a href="hsl:hslib?computerid=<? echo $equipmnt_equipid; ?>?relativeurl=sw/itg/Centennial/viewer">View Inventory Details</a>

hsl:callpanelfunction

This command will call a Javascript function on one of the two panels (left or right) of the Supportworks client. Additional parameters can be supplied as param=value pairs.

<a href="hsl:callpanelfunction?panel=left&function=myFunc&param1=value1">Update</a>