# Create subscription list

### Overview

In this destination service, DinMo will subscribe or unsubscribe profiles to email marketing, SMS marketing, or both.

{% hint style="info" %}
Previously, user consent could be added with any profile update/create request, like in `Events`. Now, user consent is configured at the `Subscription List` level.\
More info in the [official Klaviyo documentation](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api#subscribe-a-profile-via-api).
{% endhint %}

To do so, you will need to go through these steps:

* Creating a Klaviyo destination. Refer to the [corresponding section](#destination-setup) for more info.
* Create a user segment made up of users who need to opt in to specific communication channels (e-mail, SMS, or both). Refer to this [step-by-step tutorial](https://docs.dinmo.io/guides/get-started-with-dinmo/create-and-activate-segments-on-dinmo/create-your-first-segment) to learn how to build segments without SQL in DinMo
* Activating the segment to the Klaviyo destination to start sending data.

Each time the activation will be running:

* Any new user entering your DinMo segment will be added to your Klaviyo list, and will be opt-in to the specific channel (e-mail, SMS, or both)
* Any user leaving your DinMo segment will be removed from your Klaviyo list, and so will be opt-out to the specific channel (e-mail, SMS, or both)

Note that only users who have an email linked to a Klaviyo contact will be present in your Klaviyo list. In this service, DinMo will not create new contacts in Klaviyo. If you need to create a new contact, please refer to this [destination service](https://docs.dinmo.io/integrations/destination-platforms/klaviyo/broken-reference).

### Destination setup <a href="#destination-setup" id="destination-setup"></a>

To start subscribing or unsubscribing profiles, you are first required to create a Klaviyo destination with the corresponding destination service.

{% hint style="info" %}
Learn how to create such a destination in our [step-by-step tutorial](https://docs.dinmo.io/guides/get-started-with-dinmo/initial-configuration-of-dinmo/create-a-destination)
{% endhint %}

#### Optional: Setup default activation settings

At the end of the destination creation, you will be proposed to setup Default Activation Settings. This step is optional, but is highly recommended to facilitate the activation process.

By configuring default settings, subscribing and unsubscribing profiles will just take one click. Without default settings, you will be required to go through the [configuration](https://docs.dinmo.io/integrations/destination-platforms/klaviyo/export-contact-lists#activation-configuration) each time you activate a new segment.

{% hint style="info" %}
Note that even if you setup default settings, you will still be able to adjust activation settings for each of your activations if you wish to.
{% endhint %}

To configure your default activation settings:

* Select the underlying *Users Model*
* Decide whether to subscribe/unsubscribe people to **email, SMS or both**.

{% hint style="warning" %}
To subscribe users to SMS, it is required to first setup SMS in Klaviyo.\
[Learn more in the Klaviyo documentation](https://help.klaviyo.com/hc/en-us/articles/4404274419355)
{% endhint %}

* **Choose whether or not to import consent history**. In that case, you'll need to map the "Consent At" field.

{% hint style="info" %}
If you select it, Klaviyo will not send a confirmation email to the users (skips the [double opt-in](#double-opt-in-vs.-single-opt-i)). It should be used when importing profiles that have given consent in the past (for example if you are migrating data). In that case, you will need to map the "Consent At" field, that represents the moment the profile consented to be subscribed to marketing communication
{% endhint %}

* **Map your different model fields** to link your columns to standard fields to facilitate activating your data on Klaviyo. Be sure to map the phone number if you've selected SMS and email if you've selected email.

#### Double opt-in vs. single opt-in

{% hint style="danger" %}
Double opt-in can trigger confirmation messages to the end user when subscribing them via the Klaviyo API. **This may be an unwanted behavior**.
{% endhint %}

By default, DinMo will create a list set to double opt-in. \`

If this is not the behavior you want, you must:

* Create a new list in Klaviyo which is called *"DinMo Subscription List",* **before creating the activation in DinMo**
* Set the opt-in process at "Single opt-in" in the settings of that list (see screenshot below)

<figure><img src="https://3204318043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxzBTp1t4OfqV67nXkVse%2Fuploads%2FeqlrSMjIDQNXGAjOC5rr%2Fimage.png?alt=media&#x26;token=d78f32d3-a7e9-4637-9d1a-cf0afcde6e56" alt=""><figcaption><p>Klavio - at the list level: select single or double opt-in</p></figcaption></figure>

### Activation configuration

Once the destination has been setup, and your DinMo segment created, you can create an activation to start sending data to Klaviyo right away. The segment will be exported as a contact list in Klaviyo.

{% hint style="info" %}
Learn how to activate a segment in our [step-by-step tutorial](https://docs.dinmo.io/guides/get-started-with-dinmo/create-and-activate-segments-on-dinmo/activate-your-first-segment)
{% endhint %}

#### Activation Name and Description

In this section, the name you enter will be the name given to the list created in Klaviyo.

By default, and if you activate your segment using the default activation settings, the name of the list will be DinMo Subscription List.

#### Scheduling <a href="#fields-mapping" id="fields-mapping"></a>

In this section, specify how often the list should be updated in Klaviyo. Every time the list is updated:

* Any new user having entered your DinMo segment since the last update will be added to your list, if and only if this user is already an existing Klaviyo contact. They will be opt-in to the specific channel (e-mail, SMS, or both)
* Any user having left your DinMo segment since the last update will be removed from your list. They will be opt-out to the specific channel (e-mail, SMS, or both)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dinmo.io/integrations/destination-platforms/klaviyo/create-subscription-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
