E-mail Module:API

From ExtractValue Wiki

Jump to: navigation, search

The API of the E-mail Module connects Centricity to an E-mail Service Provider (ESP). Currently, the ESP of choice is Mailchimp.

Contents

Objectives

  • Syncing Database Changes from Centricity to Mailchimp
  • Retrieving campaign results from Mailchimp

Pre-requisites

Version 1.0: Database Syncs

DB Setup

Table: opt_outs

  • network_id - on which network
  • user_id - who
  • newsletter_id - what newsletter does this concern
  • opt_out - boolean (0,1)

Centricity-to-Mailchimp Database Sync

  • When a User is created in Centricity AND has opted in, also add to Mailchimp
    • Add all the fields listed above

Mailchimp-to-Centricity Database Sync (Unsubscribes)

  • If a User unsubscribes in Mailchimp, then this should be noted in the User table
    • Add another field to the User table to track of the opt-out status ( promotion = 0/1 )
  • will add to the opt out table
  • make sure that opt outs are for specific newsletters and networks

Version 2.0: DB setup

Table: campaign

These are the necessary fields:

  • ESP name - e.g., Mailchimp, Constant Contact, Streamsend, etc.
  • ESP campaign id
  • Centricity campaign id
  • Campaign name
  • c_time
  • send_time
  • objecttype - what page
  • object id
  • Store Mailchimp fields:
string id Campaign Id (used for all other campaign functions)
integer web_id The Campaign id used in our web app, allows you to create a link directly to it
string title Title of the campaign
string type The type of campaign this is (regular, plaintext, absplit, rss, etc.)
date create_time Creation time for the campaign
date send_time Send time for the campaign
integer emails_sent Number of emails email was sent to
string status Status of the given campaign (sent,scheduled,etc.)
string from_name From name of the given campaign
string from_email Reply-to email of the given campaign
string subject Subject of the given campaign
string to_email Custom To: email string using merge variables
string archive_url Archive link for the given campaign
boolean inline_css Whether or not the campaigns content auto-css-lined

Table: campaign_user

  • campaign_id - which campaign was sent
  • user_id - who received the campaign

Version 2.0: Campaign Reports

Get Campaigns

  1. Use campaigns to retrieve campaign IDs for a given list

Get Campaign AIM

Our objective is to retrieve reports on who opened emails and create an activity entry.

  1. Track clicks. Create activity feed entry.
  2. Track opens Create activity feed entry.

Get Campaign Stats

Out objective is to remove bad email addresses and spam reporters, and unsubscribers

  1. mark user::user status as deleted if they are returned as campaignHardBounces
  2. mark optout::opt out as 1 (deleted) if they are returned as campaignUnsubscribes for a given network
  3. Track soft bounces using campaignSoftBounces. DO NOT create activity feed entry.

Version 3.0: Tools for Tracking

Table: campaign_group

  • campaign_id - what campaign is related to what group
  • group_id - what groups are the campaigns about

Table: campaign_objects

  • campaign_id - what campaign is related to what object
  • objecttype - what type of object is referenced or advertised in the campaign
  • object_id - what is the id of the object

Category Tree

Personal tools