TeamWox HelpPublic Component

Public Component

The "Service Desk" module is provided with a public component that allows integrating it with an external website. It allows the website visitors to communicate with the users of the TeamWox system by means of requests.

It is necessary to consider the integration of the "Service Desk" module with a website carefully. Simultaneous installation of the public component at multiple pages may cause the significant slowing down of the web resource operation.

The integration with a website is performed using a css file of styles and a javascript. These files must be called from the special HTML page, the example of which is given below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link href="http://www.yourwebsite.com/servicedesk/style.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript">
  var tw_servicedesk_params=
  {
   url:'https://team.yourdomain.com',
   sid:'user_id',
   container:'service_desk',
   user_name:'user_name',
   user_email:'user_email',
   user_company:'user_compamy',
   incidents_per_page:3,
   comments_per_page:5,
   filter_groups:[group_id],
   filter_categories:[category_id],
   filter_products:[product_id],
   logo:'logo_html_code',
  }
  </script>
  <script src="http://www.yourwebsite.com/servicedesk/script.js" type="text/javascript"></script>
</head>
<body>
<div id="service_desk"></div>
</body>
</html>

This page contains several constructions that must be obligatory used:

Links to CSS and JS Files

For working of the public component of the "Service Desk" module two files, "script.js" and "style.css", are necessary. You should download them by the links of the following type:

https://team.yourdomain.com/public/servicedesk/style.css

https://team.yourdomain.com/public/servicedesk/script.js

In them you should specify the address of your TeamWox system instead of "team.yourdomain.com". The downloaded files should be placed to the website the public component of the module will be integrated with. Further, the corresponding links to them should be specified in the HTML file, for example:

<link href="http://www.yourwebsite.com/servicedesk/style.css" type="text/css" rel="stylesheet" />
<script src="http://www.yourwebsite.com/servicedesk/script.js" type="text/javascript"></script>

If you know CSS and Javascript well enough, you can modify the appearance of the public component of the "Service Desk" module.

Container Identifier

The public component is inserted to a defined container at the HTML page. This can be any container. In the example given above it is the <div> tag:

<div id="service_desk"></div>

In this case the most important is to assign a unique identifier (id="service_desk" in the example) to a container, that further should be specified in one of the parameters below.

Parameters

The parameters are specified within the "var tw_servicedesk_params={...}" construction. Some of them are obligatory:

url:'address of TeamWox server'

The address of your TeamWox server is specified here within single quotes. For example, 'team.yourdomian.com'.

sid:'user identifier'

This field is one of the most important ones. It affects the access right of website users to the created requests. Using a special construction, a unique identifier must be substituted to its value for each website visitor.

For the registered website users you can use MD5 from a keyword and user's ID at the website as the value of this field.

For the anonymous visitor you can use MD5 from cookies.

If the division into groups is implemented at your website, you can organize the cooperation of users with the same requests by substituting the identifier of the group in this field. If a fixed value is set for the "sid" field then any user will be able to view all the created requests.

In this field you must specify the parameter that cannot be fitted. The usage of simple identifiers is inadmissible and can cause the unauthorized access to the requests. The visibility of requests to one or another user is determined exactly by the value of this field. The examples for each of the cases mentioned above are given at the separate section.

container:'[container identifier]'

In this parameter you should specify the identifier of the container, that will be used for displaying the interface of the public component of the "Service Desk" module.

user_name:'[user name]'

This parameter should be collected by the website. As the value of it you should specify the constructions that substitute the corresponding information of the website visitors.

The following group of parameters is not obligatory:

user_email:'user e-mail address'

E-mail address of the user.

The automatic binding of requests to organizations by e-mail address functions in the TeamWox system.

user_company:'name of user company'

Company name of the user.

E-mail address and company name should also be collected by the website. As the values of those fields you should specify the constructions that substitute the corresponding details of the website visitors.

incidents_per_page:number of requests per page

Here you should specify the number of requests that will be displayed at one page. If this parameter is not specified the default value is used (10).

comments_per_page:number of comments per page

In this parameter you should specify the number of comments to a request that will be displayed at one page. If this parameter is not specified the default value is used (10).

filter_groups:[list of identifiers of available groups]

Here in the square brackets you should specify the identifiers of groups separated by comma, that will be available to the users to choose when creating a request. Identifier of a group is displayed in the "Information" tab of the window of its parameters.

In order to make a group be publicly available you should enable the corresponding option for it in the settings.

filter_categories:[list of identifiers of available categories]

In this parameters in the square brackets you should specify the identifiers of categories created in group separated by comma, that will be available for users when creating requests. Identifier of a category is displayed in the "Categories" tab of the window of parameters of the group.

filter_products:[list of identifiers of available products]

In this parameter in the square brackets you should specify the identifiers of products created in group separated by comma that will be available for users when creating requests. Identifier of a product is displayed in the "Products" tab of the window of parameters of the group.

logo:'HTML code of window header'

Using this parameter you can change the standard header of the requests window to your own one. To do it you should specify your own HTML code of the header in this parameter. The simplest examples are:

<img src="yourwebsite.com/res/logo.png" />
<span style="font-size:14px; color: rgb(73, 194, 85);">Service Desk</span>

Additional examples of implementation of the public part of the "Service Desk" module in "PHP" and ".NET" are given at the separate sections. The example of ready page of the public component of the module is given in the "Public requests" section.

Currently there are two languages of the requests window implemented, Russian and English. They are automatically chosen depending on the language used in the operating system of the user. The interface translations are stored in the "script.js" file. If you have enough knowledge, you can add new translation to it on your own.


← Integration SID →