Data Portability
The Data Portability app is an app which allows you to do two things:
- Create data definitions in the backend which contain configurations for extracting user-related data
- Render those data definitions in frontend, and allow users to download the data
As can be inferred from this, the app consists of two parts:
- A configurable app for creating data definitions
- A paragraph app for rendering data definitions in frontend
These are both described below.
Data Definitions
A data definition is, well, a definition of the data you want to make available for download. A data definition consists of one or more data groups, which in turn contain data item types (Figure 2.1).
All of this is a fairly complicated way of saying that you use providers to extract data about a user and their activity, and that you can group the data together when it makes sense.
To create a data definition:
- Go to Apps > Data Portability
- Right-click the Data Definitions node and click New data definition (Figure 2.2)
- Enter a Name and Save
- Right-click the newly created data definition instance and click Add data group
- Enter a Name and Save
A data definition can contain of as many data groups as necessary – each data group can be viewed as a rough grouping of related data, e.g. Content data such as comments, form submits, and forum messages. This data is retrieved by data item types using a data-specific provider.
Data Item Types & Providers
A data item type is a configuration which uses a provider to extract data associated with the user from the solution.
To create a data item type:
- Click on the data group
- In the content pane, click add in the toolbar
- Name the data item type and select a provider (Figure 3.1)
- Save
Dynamicweb ships with a set of data providers which can extract various types of data related to a user:
Provider |
Data extracted |
CommentDataProvider |
Comments on pages, products, etc. which have been added to the Comment table in the database |
FavoriteListDataProvider |
Favorite lists |
FormSubmitDataProvider |
Form data submitted using the Forms for Editors app |
ForumMessageDataProvider |
Forum posts |
OrderDataProvider |
Orders & Carts with their orderlines |
PaymentCardDataProvider |
Saved credit card information |
SessionDataProvider |
User sessions |
SqlDataProvider |
See below |
UserAddressDataProvider |
Secondary addresses associated with the user |
UserDataProvider |
Standard user fields |
UserExternalLoginDataProvider |
External login data, e.g. Facebook or Twitter logins associated with the user |
Should the preconfigured providers not be adequate, you can use the SqlDataProvider to extract data from other parts of the system (Figure 3.2).
This provider must be configured:
- Select a database table to extract data from
- Select one or more columns to include in the download – if nothing is selected, all columns will be included
- Select the column name containing the UserId to extract data based on