Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Technical integration

This article shows you how to integrate the data subject right request widget into a web page

Purpose

The data subject right request widget automatically collects data subject right requests of various types (deletions, modifications, rectifications...) from a page of your site.

The widget is part of the Dastra JavaScript SDK.

Prerequisites

To set up the data subject right request widget, you need a public API key: read API key management or go directly to the API key management page.

Setting up the widget in the dedicated interface

To start with, you need to set up the widget in the list of forms: in the Requests menu, click Forms.

List of forms with the Create form button
The list of forms

Always copy the code from the application: the address of the script depends on the hosting region of your organization (cdn-bleu.dastra.eu instead of cdn.dastra.eu on Bleu).

Here is a simple example of how to integrate the widget (in popup mode with an open button):

Forcing the language of the form

By default, the browser language is used. If the language is not available in the widget translations, the default language is selected automatically. You can force the language of the widget by adding the data-lang property to the div where the form is displayed.

In this example, Italian is selected by default (if available)

Prefilling the form fields

You can prefill the form fields from the authentication context of the user. Prefilled fields are displayed read-only (greyed out) to the user.

Available standard fields:

The refId property is the unique identifier of the person in your system (customer ID, session ID...). It is displayed, read-only, only if the Reference of the requester field is one of the active fields of the form.

Custom fields:

Sending parameters using page mode

You can also pass these parameters in the query string: prefix the parameter name with dsr_.

Closing the widget by clicking outside the window

If your widget uses the Modal layout, the window does not close when the user clicks outside it. This is by design: the risk of losing the data the user has typed is too high.

If you still want the widget to close when the user clicks outside the window, use the following code:

Embedding several widgets in one page

By default, Dastra does not support several widgets in the same page.

You can still do it with two calls to loadCustomerSubjectForm, one per widget, with distinct selectors and widget IDs.

To set the initial fields of a widget in this setup, use the form.initialData property in onLoad:

Last updated

Was this helpful?