How Can We Help?

Advanced Users Configuration

 
Users configuration has been described in details in the base guide: Users Configuration

To go inside the users configuration, use the menu: System > Permission > Users

 

We can find some grids that divides the users based on their type.
It is possibile to create new grids, we will see how to create a new grid to display only users of a certain company.

 



 

Configure a Grid with users of a company

To configure a new grid click the button “arrow” that shows all the grids in the system and select the item New Grid.

 

We can see the popup to insert the name of the grid.

 

Insert the name of the grid. The new grid is created with the default settings.

 

Go inside the grid configuration by clicking on the button to modify the grid.

 

We can see the form to edit that grid. Select the visibile fields and drop them in the middle of the screen under the column “Visibile fields”. The fields we don’t want to display must be dragged&dropped on the left side of the screen.

 

Now the grid will display all the users and the fields under Available Columns.
To filter the users by a company (in our example we will filter the company INTODEEP), first of all we have to know the ID of that company.
To do that open another tab in the browser and access the Company menu: System > Company. Write down the ID of the company.

 

Now, come back to the grid configuration and in the field Prepared Collection write the following PHP code:
[php]$this->getCollection()->addFieldToFilter(‘company_id’, [‘eq’ => 3]);[/php]

Dove:

  • $this is the current object: the grid.
  • getCollection() is the collection of elements in the grid.
  • addFieldToFilter() we can add with this function a filter to the collection.
  • company_id is the field with the ID of the company.
  • [‘eq’ => 3] expression to tell Deepser that we want only the users with ‘company_id’ = 3, where 3 is the ID of our company.

Now we can see the grid is filtered by our company.

 

In this section, what we have seen for the grids configuration is enough, but grids can be highly customized.
The details of the grids customization is here: Custom Grids.

 



 

Users fields details

User fields have already been discussed here: Users Configuration.
Following we list all the fields with a detailed description:

 

Field Meaning
Avatar Icon with the user avatar. If not set, it will be chosen randomly from the system.
Username Username used by a user to access the software. It is the field that uniquely identifies the user.
Username is thus used for the login to Deepser. If we create manually a user, we can choose the username we want.

Obviously, user name must be unique otherwise the system will block the creation of a user with a username already in use.
If we insert users with the LDAP integration the username will be the LDAP attribute we chose when configuring the integration, but Deepser prepend a number and a backslash (\) to identify the ID of the LDAP directory from which we are importing the user.
In case of LDAP users, the login screen of Deepser will change, adding a select-box to choose the domain. This select-box is thus mandatory for the users with an LDAP account.
A user manually inserted has, for example, this username: admin or name.surname, or rather the email of the user.
A user imported from LDAP will have, for example, this username: 1\name or 1\name.surname.
Looking at the ID of the LDAP directory we can easily find from which LDAP source the user has been imported.

Firstname First name of the user
Lastname Last name of the user
Email Email of the user to receive notifications. Email is a very important field if we activate the email integration: Deepser send all the emails to users according to this value.
Password Password to log into the system. Password is encrypted in the database. If a user is an LDAP user the password will not be saved in the database, but the system will try to authenticate directly to the LDAP server.
Password Confirmation This field is used to change the user password. If we want to change the user password we must fill in this field and save the user form.
Role The field to define the role of the user. It is a mandatory field. Users imported from LDAP couldn’t have this field filled in. So make sure this field has the right value for every user.
Is Active It tells if an user is active in the system. Non-active users are not displayed in the select-boxes of Deepser modules, cannot receive emails and cannot log into the system.
Startup Page Page to which the user is redirected after the login. This field contains a list of all the system pages.
Language Language of the user. Deepser has a native support to many languages. It is possibile to translate the software using this short guide: Translate Deepser
Timezone Timezone of the user. Timezone is applied when displaying the dates on the interface. Infact, in the Deepser DataBase all dates are stored referring to the system timezone: UTC. This setting allows the system to manage all the dates with consistency and not to have problem with the variaton of dates based on the location of a user.
Company Company of the user. All users can be part of one (and only one) company. Companies are explained in that guide: Company Guide.
Companies can be grouped in a 2 level structure: one company is the Parent and can have multiple sub-companies. That way we can manage the visibility of the requests allowing, for example, a corporate manager to see all the sub-company requests and allowing a director of a sub-company to see only data of his smaller organization.
Is Supervisor If the user is a supervisor he can see data of all users of the company (and sub-companies). This field is very important to determine which data cha see a user within his organization. If the user is a supervisor and can access the back-end (Administrator, Agent, Key-User) he can see all data of his Company and sub-companies. This is true if the user has the field Company Visibility set to Limit Data to Company. On the contrary, the user can see all data in the system.
If we talk about a user with type “User” (an end user/customer), this user can only see the data regarding his requests (and no other). But, if the user is configured as supervisor can see all the Service Operations of his Company (and sub-companies if present).
Company Visibility A user with this field set can see only data of his company (and sub-companies). If a user access the back-end this field is very useful to limit the visibility. Think, for example, to an operator that can only manage requests from his brach. If we create a company specifically for the branch and limit the data of the user to that branch, the operator will not see any other company data.
Talking about a user of type “User” this field is always ignored, because the user can only see his records and if the field Is Supervisor is set to true, then he can also see the data of his company.

 



 

Users Creation

We have already seen in this guide how to insert manually a user into Deepser.
It is possibile to insert users also by the LDAP integration (Active Directory, OpenLDAP, etc.). This method is strongly recommended to companies that use LDAP systems.

User creation through LDAP is described by this guide: LDAP Configuration.
We will see in the next section another interesting (and useful, in some cases) way to import users by email integration.

 



 

Create users by email

Email integration is a powerful feature of Deepser. It allows to insert into the system any kind of entity with a simple and fast configuration.
Usually, email integration is used to create Service Operations that represents the requests made by the customers via email.
It is possibile, using a dedicated mailbox, also to create users in the system.
Think about an automatic system implemented on an external application that sends formatted emails every time a user registers to the company site (or e-commerce).
By creating users that way we can provide automatically an account to the support portal Deepser.
To configure a mailbox select the grid IN from the menu System > Tools > Email > Mailbox.

 

Follow the settings of the screenshot above, changing host, user and password with the data of your mailbox.
The most important configuration to create users is then the System Data Tab.
Using this setting we can tell the system that every email read by that mailbox will generate an entity inside Deepser and we can also tell the data to fill the fields of that record.

 

Note: the field Outgoing Mailbox is not relevant for this guide, it is usually set to define the mailbox used to answer by the Service module.

 
The following data are the entry point to link an email to an entity of Deepser.
The field “Model” is the entity (the table of the database) of Deepser.
The Model Field and the Prefix will be used together to parse the email subject.
In few words, the field Prefix is a string used to tell Deepser: “Hey, after this string you will find a unique field of the record”. That unique field is the Model Field.
Deepser uses an internal algorithm and knows that has to read that specific field and if the value is inside the DB that record will be updated. If not, a new record will be created.
To better understand, let’s give an example.

 
In the system we have a user with username user.name.
We configure the IN email integration with: Model = DeepAdmin – User; Model Field = Username and Prefix: USR#, like in the example showed on the screenshot.
Now, an email is read from the mailbox. The subject of the email is New User: USR#user.name . Deepser understands that has to search the user entity and find a user with: username = user.name. This user exists, so Deepser will not create a new user but will update the existing user.
Then, an email with subject New User: USR#alva.edison . Deepser understands that has to search a user with: username = alva.edison. This user is not in the system, so Deepser will create a new user through an insert event.
 

Where can we define update or insert events?
In the tab System/Data we can see a filed called Insert and a field called Update.
This fields contain the code run after every email has been read by email integration.
To create a new user write in the field “Insert” this PHP code:
[php]
$mailSubject = $this->getMessage()->getSubject();
$mailBody = $this->getMessage()->getBodyText();

$row_data = explode(‘^’, $mailBody);

$userName = $row_data[0];
$firstaname = $row_data[1];
$lastname = $row_data[2];

$this->getModel()
->setUsername($userName)
->setFirstname($firstaname)
->setLastname($lastname)
->save();
[/php]

We are telling Deepser there is an email with a specific format that contains the data of a new user (we have to decide the format prior to implement the integration).
Now let’s schedule the job to read the mailbox.
In the tab Advanced set the value of the field Cron Expression

 

Now, we are telling Deepser to create a job, schduled every minute to read the mailbox.
Send a new email to the mailbox and let’s see what happens.

 

If everything is set the right way, a new user will be created in Deepser.

 

Previous Roles Configuration
Next Company Configuration
Table of Contents