# Dotdigital

{% hint style="success" %}
**Available for:** Preference Management Platform (PMP)

**Premium Feature:** Dotdigital
{% endhint %}

Didomi allows you to update your Dotdigital contact attributes with the preferences collected through your preference management platform (PMP).

{% hint style="info" %}
Alternatively, the Dotdigital integration can be performed directly from the Didomi console for the Preference Management Platform (PMP).&#x20;
{% endhint %}

## Implementation

### Connection

Didomi connects to Dotdigital on your behalf through an API user that you can create by following [these steps](https://developer.dotdigital.com/docs#setting-up-your-api-user). You can then configure a username and password in the Didomi integration.

### Options

* **Upsert mode**: You can choose allowing Didomi to create contacts on Dotdigital, by setting `upsert_mode` to true. Otherwise, when a consent is collected but the `organization_user_id` value does not match with any contact in Dotdigital, the consent update will not be propagated to Dotdigital.
* **Bidirectional flow**: Please note that the bidirectional flow is not supported at the moment.

### Mapping

Didomi uses the entity contact of Dotdigital and sends the attributes property when updating a contact, hence consent events are mapped to the contact attributes.

{% hint style="warning" %}
**Note**: In order to ensure that events are received, Didomi will retry at least five times in the span of five minutes before moving on when your endpoint is down.
{% endhint %}

## Configuration

Didomi needs the following configuration items to set up the connection with Dotdigital:

| Property        | Description                                                                                                                                       | Required                           |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **Username**    | Your Dotdigital API username                                                                                                                      | Yes                                |
| **Password**    | Your Dotdigital API user password                                                                                                                 | Yes                                |
| Endpoint URL    | Make sure you add the regional API endpoint as described [here](https://developer.dotdigital.com/docs/api-conventions#region-specific-end-points) | Yes                                |
| **Upsert mode** | By setting upsert\_mode to true you allow Didomi to create contacts in Dotdigital                                                                 | <p>No<br>Default value = false</p> |
| **Mappings**    | List of properties to match between Didomi and Dotdigital                                                                                         | Yes                                |

### Example

```json
{
    "type_id": "dotdigital",
    "authentication": {
        "url": "your_api_url",
        "username": "your_api_username",
        "password": "your_api_user_password"
    },
    "properties": {},
    "mappings": [
        {
	    "id": "dotdigital_contact_attribute",
	    "value": "consents_purposes_newsletter_enabled"
        }
    ],
    "upsert_mode": true
}
```
