Introduction

Enzo Server
  Installation
  Quick Start
  Core Features
    Async Calls
    ConnectionStrings
    Edge Cache
    HTTP Access
    Scheduling
    Views
  Advanced Capabilities
    Change Data Capture
  Administration
    Configuration Settings
    Logins & ACL
    Auditing
    Current Executions
    Linked Server
    SSL

  User Guides
     Sharding
     Sharding Overview

     SharePoint

   Adapters
    All Adapters


  SDK
    Overview
    Installation
    DevHost
    Create A Simple Adapter
    Handler Columns

    Advanced SDK Concepts
      Handler Decorators
      Dynamic Columns
      Table & Table Enumerators
      Virtual Tables



ConstantContact Adapter








This adapter provides access to the ConstantContact API through SQL commands, including Contact Lists and Campaigns.


This adapter requires a subscription to the ContantContact platform.



OAuth Configuration

This adapter requires OAuth to be configured.

show steps 
  • Obtain an API Key and API Secret from ConstantContact and save in a Config Setting in Enzo
    In this initial step, you must configure ConstantContact so that you can obtain an API Key and API Secret. Once you have this information, create a new Config Setting in Enzo Manager with this information, and save the config. Mark it as the default setting to make things easier.
  • Execute GetAuthUrl to obtain the correct URL and paste it in a browser to authenticate
    Start SQL Server Management Studio (SSMS), connect to Enzo directly, and execute the GetAuthUrl method. The GetAuthUrl method returns a URL that you can copy and paste in a browser; this URL is constructed dynamically. Once the authentication flow is completed, you will get a blank webpage; the URL bar on the browser will contain a return code. Copy the complete URL provided before going to the next step.
  • Copy the ResponseCode provided and execute the GetTokens command passing the Response Code
    The GetTokens method requires the complete URL provided in the previous step. This will extract the response code and return an Access Token. Note that the URL is only valid for a period of time. Copy the AccessToken in memory.
  • Copy the AccessToken and RefreshToken provided by the previous call and save them into the same Config Setting
    These tokens must be saved in the Config Setting previously created.

Configuration Settings



Name Description Default
Boolean _isDefault Make this the default configuration. Defaults to true if configName is already the default.
String APIKey The API Key used for authentication of ConstantContact api
String APISecret The API Secret used for authentication of ConstantContact api
String accessToken The accessToken used for authentication of ConstantContact api
String refreshToken The refreshToken used for authentication of ConstantContact api when expire accessToken

Handlers



CreateCampaign
campaigns
Create a campaign details 

Arguments

Name Description Default
name R
subject R
fromName R
fromEmail R
replyToEmail R
htmlContent R
textContent R
city
state
stateCode
country
countryCode
address
organizationName
isPermissionReminderEnabled
permissionReminderText
isViewAsWebpageEnabled
viewAsWebPageText
viewAsWebPageLinkText
letterFormat HTML
postalCode
preHeader
formatType 5

SQL Call

exec ConstantContact.CreateCampaign
insert into ConstantContact.campaigns(name,subject,fromName,fromEmail,replyToEmail,emailContent,textContent,city,state,country,address,organizationName,postalCode) values('test','test subject','test user','test@gmail.com','test1@gmail.com','This is Test content','This is test content','test city','MA','US','test address','test org','01444')


Http Call

/bsc/constantcontact/createcampaign

Output Columns

This call does not return data.

CreateContact
contacts
Create a contact details 

Arguments

Name Description Default
addressType R
city
state
country
street
postalCode
email R
listIds R
firstName
lastName
phone R
jobTitle
companyName
createSource Contact
birthdayMonth
birthdayDay
anniversary

SQL Call

exec ConstantContact.CreateContact @addressType='home', @email='test005@gmail.com',@listIds='1f53e032-a633-11ea-8339-d4ae527b6fcc',@phone='8899776655',@createSource='contact'
insert into ConstantContact.contacts(addressType,email,listIds,phone) values('home','test@gmail.com','2e4950f4-af07-11ea-8862-d4ae527599c4','9988776655')


Http Call

/bsc/constantcontact/createcontact

Output Columns

This call does not return data.

CreateContactList
contactlist
Create a Contact List details 

Arguments

Name Description Default
name R
favorite True
description

SQL Call

exec ConstantContact.CreateContactList @name='test',@favorite=false,@description='test description'
insert into ConstantContact.contactlist(name,favorite,description) values('test',false,'this is test description')


Http Call

/bsc/constantcontact/createcontactlist

Output Columns

This call does not return data.

DeleteCampaign
campaigns
Delete a Campaign details 

Arguments

Name Description Default
id R

SQL Call

exec ConstantContact.DeleteCampaign '1'
delete from ConstantContact.campaigns where id='1'


Http Call

/bsc/constantcontact/deletecampaign

Output Columns

This call does not return data.

DeleteContact
contacts
Delete a contact details 

Arguments

Name Description Default
id R

SQL Call

exec ConstantContact.DeleteContact '1'
delete from ConstantContact.contacts where id='1'


Http Call

/bsc/constantcontact/deletecontact

Output Columns

This call does not return data.

DeleteContactList
contactlist
Delete a contact list details 

Arguments

Name Description Default
id R

SQL Call

exec ConstantContact.DeleteContactList '1'
delete from ConstantContact.contactlist where id='1'


Http Call

/bsc/constantcontact/deletecontactlist

Output Columns

This call does not return data.

getAuthUrl
Get auth url details 

Arguments


SQL Call

EXEC ConstantContact.getAuthUrl


Http Call

/bsc/constantcontact/getauthurl

Output Columns

String authURL
GetContactList
contactlist
Get all contact lists details 

Arguments


SQL Call

exec ConstantContact.GetContactList
select * from ConstantContact.contactlist


Http Call

/bsc/constantcontact/getcontactlist

Output Columns

String id
String name
Boolean favorite
DateTime createdDate
DateTime modifiedDate
getRefreshTokens
Get refresh token details 

Arguments

Name Description Default
refreshToken R

SQL Call

EXEC ConstantContact.getRefreshTokens ''


Http Call

/bsc/constantcontact/getrefreshtokens

Output Columns

String accessToken
String refreshToken
String tokenType
GetSingleCampaign
Get single campaign details 

Arguments

Name Description Default
id R

SQL Call

exec ConstantContact.GetSingleCampaign


Http Call

/bsc/constantcontact/getsinglecampaign

Output Columns

String id
String name
String status
String type
DateTime createdAt
DateTime updatedAt
String campaignActivityIds
getTokens
Get authentication token details 

Arguments

Name Description Default
codeResponse R

SQL Call

EXEC ConstantContact.getTokens 'https://localhost/?code=9a21hlWJ&scope=full%7Cyw854.infusionsoft.com&state='


Http Call

/bsc/constantcontact/gettokens

Output Columns

String code
String accessToken
String refreshToken
String tokenType
ListAllCampaigns
campaigns
List all campaigns details 

Arguments

Name Description Default
topn

SQL Call

exec ConstantContact.ListAllCampaigns
select * from ConstantContact.campaigns


Http Call

/bsc/constantcontact/listallcampaigns

Output Columns

String id
String name
String status
String type
DateTime createdAt
DateTime updatedAt
ListAllContacts
contacts
List all contacts details 

Arguments

Name Description Default
topn

SQL Call

exec ConstantContact.ListAllContacts
select * from ConstantContact.contacts


Http Call

/bsc/constantcontact/listallcontacts

Output Columns

String contactId
String emailAddress
String permissionToSend
DateTime emailCreatedAt
DateTime emailUpdatedAt
String confirmStatus
String firstName
String lastName
String updateSource
String createSource
DateTime createdAt
DateTime updatedAt
UpdateCampaign
campaigns
Update a campaign details 

Arguments

Name Description Default
id R
activityId R
subject R
fromName R
fromEmail R
replyToEmail R
htmlContent R
textContent R
city
state
stateCode R
country
countryCode R
address
organizationName
isPermissionReminderEnabled
permissionReminderText
isViewAsWebpageEnabled
viewAsWebPageText
viewAsWebPageLinkText
letterFormat HTML
postalCode
preHeader
formatType 5

SQL Call

exec ConstantContact.UpdateCampaign  '11233','Test Campaign 3','This is test campaign','Herve','hroggero@bluesyntaxconsulting.com','hroggero@bluesyntaxconsulting.com','This is test content forHTML','This is test content from text',@city='test city',@state='MA',@country='US',@address='test address',@organizationName='Test Org',@postalCode='01444'
update ConstantContact.campaigns set name='test',subject='test subject',fromName='test user',fromEmail='test@gmail.com',replyToEmail='test@gmail.com',emailContent='this is test email content',textContent='this is test text content',city='test city',state='MA',country='US',address='test address',organizationName='test org',postalCode='01444' where id=134667


Http Call

/bsc/constantcontact/updatecampaign

Output Columns

This call does not return data.

UpdateContact
contacts
Update a contact details 

Arguments

Name Description Default
id R
addressType R
city
state
country
street
postalCode
email R
listIds R
firstName
lastName
phone R
jobTitle
companyName
updateSource Contact
birthdayMonth
birthdayDay
anniversary

SQL Call

exec ConstantContact.UpdateContact '2e4950f4-af07-11ea-8862-d4ae527599c4',@addressType='home', @email='test009@gmail.com',@listIds='1f53e032-a633-11ea-8339-d4ae527b6fcc',@phone='8899776655'
update ConstantContact.contacts set addressType='home',phone='8899776677', email='test@gmail.com',listIds='1f53e032-a633-11ea-8339-d4ae527b6fcc' where id='2e4950f4-af07-11ea-8862-d4ae527599c4'


Http Call

/bsc/constantcontact/updatecontact

Output Columns

This call does not return data.

UpdateContactList
contactlist
Update a Contact List details 

Arguments

Name Description Default
id R
name R
favorite True
description

SQL Call

exec ConstantContact.UpdateContactList @id='111',@name='test',@favorite=true,@description='test description'
udpate ConstantContact.contactlist set name='test',@favorite=true,description='this is test description' where id='121212'


Http Call

/bsc/constantcontact/updatecontactlist

Output Columns

This call does not return data.