Tutorial 4: Users, User groups & Smart Searches

Dynamicweb features a pretty extensive system for managing Users of all kinds, be it admins, administrators, editors or customers.

In this tutorial, we are going to run through some of the most common user-related tasks:

  • Creating users and user groups
  • Using user smart searches to create dynamic user groups
  • Using the Extranet module to create and login users
  • Defining permissions on content to hide it from non-logged in users.
  • Importing users from an XML file

Additionally, users are used extensively in other parts of Dynamicweb, so you will be using the users and user groups you create here in future tutorials.

In Dynamicweb, users must be created inside a user group – so let’s start with creating a user group:

  • Click on Users in the area menu to open the user tree
  • Click the context menu button, then click New group (Figure 2.1)
Figure 2.1 New group for users
  • Name the group Editors
  • Save and close the user group

A user group called Editors will be generated in the menu – and the content pane will change to show a(n empty) user list.

To create a user inside the Editors group right-click the user group and click New user (Figure 2.2).

Figure 2.2 New user

This will open the user details view – for now, fill out the following:

  • User name and password
  • Name, first name and last name
  • A (real) Email – and don’t forget to check the Email Permission checkbox

Have a look at the other user details fields you can use if necessary – but leave them be for now.

Create a second user group called Customers, but leave it empty.

Now, we need a bit more than 1 user to make working with users (and the next couple of tutorials) interesting, so let’s add a few more.

Rather than creating them manually, however, we will be importing them.

  • Download the AccessUser.csv file
  • Upload it to the Files folder on your test solution
  • Right click the Customers user group and click Import Users
  • Select the AccessUser.csv file as your user input file
  • Check the Allow email communication checkbox
  • Click Import users in the toolbar

After a small wait, you should be notified that the import was successful – and the 9 test users will show up in the Customers-folder.

Figure 3.1 Import users

Exporting users is done in much the same way – and you can choose which fields you want to export.

Both import and export uses the Data Integration module, which is covered in detail in more advanced tutorials.

Now that you know how to create users and user groups, it’s time to check out something very neat; user smart searches.

A user smart search is best described as a kind of dynamic user group, containing all registered users on the solution which meet a certain set of criteria.

For instance, on this solution you have a single group containing all your customers – the one we just created and imported users to – but in many cases it makes sense to target only some of these users, for instance when it comes to email marketing. You don’t want to send the same newsletter to people in the US as you do to people in Denmark.

To create a user smart search:

  • Go to the Users area and locate the Smart searches node
  • Click the context menu button or right click the node, then click New smart search (Figure 4.1)
Figure 4.1 Smart Search

This opens the smart search configuration view in the content pane (Figure 4.2).

Figure 4.2 Smart Search Configuration
  • Name the smart search Users in Denmark
  • Add a rule stating that the user field ‘Country’ should equal ‘Denmark’
  • Save and close

Under the smart searches node, you should now see a smart search Users in Denmark with a number after it – this is the current number of users which match the criteria defining the smart search. Smart searches are recalculated periodically

Create three more smart searches:

  • Users in Sweden
  • Users in Norway
  • Users in the United States

Check out some of the other criteria you have available – you can create smart searches based on user behavior on the website, for instance, and their actions related to marketing emails – but leave them be for now. Smart searches are generally most useful when criteria are combined (e.g. Users in Denmark who’ve visited the store but not made a purchase), but we don’t need the added complexity right now.

In this tutorial you’ve learned:

  • How to create users and user groups manually
  • How to import users to a user group
  • How to create dynamic user groups with user smart searches

In the next tutorial, we will continue working with users – this time in the frontend:

  • Use the Extranet  module to register, login & display users and user information in frontend
  • Restrict frontend and backend content using permissions