Documentation / Product / Integrations / Dotdigital

Dotdigital: Import Contacts & Activity

By importing your Dotdigital contacts and their activity into Lytics, you'll be able to apply Lytics powerful insights to your email and multichannel campaigns.

Integration Details

This integration uses the Dotdigital APIs to import user data. Once the import is started the job will:

  1. Request all address books in the Dotdigital account.
  2. Iterate through the address books and for each:
    1. Get all subscribed contacts in that address book since the last import.
    2. Get all unsubscribed contacts from that address book since the last import.
  3. Get all suppressed contacts from the account since the last import.
  4. Get all campaigns with activity since the last import.
  5. Iterate through the campaigns and for each:
    1. If we haven't received send information on the campaign before, get the campaign's activity.
    2. Get campaign's open activity since last import.
    3. Get campaign's click activity since last import.
    4. Get campaign's bounces and unsubscribes since last import.
  6. Schedule next import.

Data will be imported to the dotmailer_contacts and dotmailer_activity streams.


The following fields are included in the default mapping of the dotmailer_contacts stream:

NOTE: Dotmailer rebranded to Dotdigital in January 2019. Due to backwards compatiblity issues old field and stream names still use dotmailer.

Source FieldLytics User FieldDescriptionType
emailemail unique idEmailstring
iddm_contact_id unique idDotmailer Contact IDstring
account_iddm_accountidDotmailer Account IDs[]string
address_booksdm_address_booksDotmailer address-book membership[]string
account_id, address_book_id, address_book_statusdm_addressbook_statusStatus by Dotmailer Addressbook IDmap[string]string
epochms()dm_addressbook_status_tsDate of Last Addressbook Status Updatedate
emailTypedm_email_typeDotmailer Email Typestring
optInTypedm_opt_in_typeDotmailer Opt-In Typestring
statusdm_statusDotmailer Statusstring
unsubscribed_address_booksdm_unsubscribed_address_booksDotmailer unsubscribed address-books[]string
emailemaildomainEmail Domainstring
FIRSTNAMEfirst_nameFirst Namestring
LASTNAMElast_nameLast Namestring

The following fields are included in the default mapping of the dotmailer_activity stream:

Source FieldLytics User FieldDescriptionType
contactIddm_contact_id unique idDotmailer Contact IDstring
emailemail unique idstring
campaign_iddm_campaign_idsDotmailer Campaign IDs[]string
campaign_namedm_campaign_namesDotmailer Campaigns[]string
campaign_namedm_campaigns_clickedDotmailer Campaigns Clicked[]string
campaign_namedm_campaigns_opendedDotmailer Campaigns Opened[]string
campaign_namedm_campaigns_sentDotmailer Campaigns Recieved[]string
valuect(event)dm_clickctDotmailer Click Countint
valuect(event)dm_email_eventDotmailer Email Eventsmap[string]intsum
urldm_email_urlDotmailer URLstring
min(epochms())dm_first_hardbounce_tsDotmailer First Hard Bouncedate
min(epochms())dm_first_softbounce_tsDotmailer First Soft Bouncedate
min(epochms())dm_firstopen_tsDotmailer First Opendate
min(epochms())dm_firstclick_tsDotmailer First Clickdate
valuect(event)dm_hardbounce_ctDotmailer Hard Bounce Countint
valuect(hourofday)dm_hourlyopenDotmailer Hourly Eventsmap[string]intsum
valuect(hourofweek)dm_hourofweekDotmailer Hour of Week Eventsmap[string]intsum
keyworddm_keywordDotmailer Email Keyword[]string
max(epochms())dm_last_hardbounce_tsDotmailer Last Hard Bouncedate
max(epochms())dm_last_softbounce_tsDotmailer Last Soft Bouncedate
max(epochms())dm_lastclick_tsDotmailer Last Clickdate
max(epochms())dm_lastopen_tsDotmailer Last Opendate
valuect(yymm())dm_monthlyDotmailer Opens By Monthmap[string]intsum
valuect(event)dm_openctDotmailer Open Countint
epochms()dm_send_tsDotmailer Last Send Timedate
valuect(event)dm_sendctDotmailer Send Countint
valuect(event)dm_softbounce_ctDotmailer Soft Bounce Countint
max(epochms())dm_unsub_tsDotmailer Unsubscribe Datenumber
emaildomain(email)emaildomainEmail Domainstring
valuect(hash(urlmain(url)))hashedurlsHashed URLs Visitedmap[string]intsum
ipAddressip_addressMost Recent IP Addressstring
max(epochms())last_active_tsLast Activedate
mailClientmail_clientMail Clientstring
mailClientVersionmail_client_versionMail Client Versionstring


Follow these steps to set up an import of contacts and activity job for Dotdigital. If you are new to creating jobs in Lytics, see the Jobs Dashboard documentation for more information.

  1. Select Dotdigital from the list of providers.
  2. Select the Import Audiences and Activity Data from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Select Keep Updated to continuously import audiences and activity data.
  7. (Optional) Toggle Show Advanced Options.
    1. Select Email Field to configure the field that contains the contact's email.
    2. Select Address Book Status Field to configure the field that contains the address book status. This is used to mark users that have unsubscribed from the account as unsubscribed from their address books. This field must be a map[string]string in the format of [accountID]_[addressBookId]:[status].
    3. Select Fields to Import to configure the fields to import for each contact from dotdigital.
    4. Enter Work Tracking Slug to track the work. This should be a unique value.
    5. Enter Activity Backfill Start Date to pull in a set of activity by date. This is set in conjunction with Activity Backfill End Date. If this is left empty, a default of 90 days of activity data will be imported. If this is set, the import will only pull in activity data; no contacts will be imported
    6. Enter Activity Backfill End Date to pull in a set of activity by date. This is set in conjunction with Activity Backfill Start Date.
  8. Click Start Import. Dotdigital Import Configuration