Integration Summary
Our integration with Constant Contact allows Lists of Contact from Practifi to be created and sent to Constant Contact, to be used in Campaigns launched and managed by Constant Contact. Updates to Contact details in Practifi are synched back to Constant Contact. Users can also see the engagement their Contacts have had during Campaigns, directly from within Practifi as a new form of Interaction.
This implementation positions each of Practifi and Constant Contact in the following roles:
- Practifi
- The source of truth about Contacts within Practifi clients
- Holds the most information about the Contact
- Adds Contacts to Constant Contact distribution Lists
- Captures engagement Activity for a Contact
- Passes back Opt-Out requests from Contacts
- Constant Contact
- Holds distribution Lists of contact Emails
- Launches and tracks Campaigns
- Sends emails
- Logs Contact engagement Activity
- Respects Do Not Email/Opt-Out requests
In this implementation:
- No contact field information is copied from Constant Contact to Practifi
- No orphan Contacts are created in Practifi from Constant Contact.
- The common Contacts between both systems are linked by their Constant Contact ID, stored in Practifi
- Only Email Address, First Name, Last Name, and Opt-in status, are copied to Constant Contact when creating a new contact from Practifi
- An update to First Name, Last Name, and Opt-in status in Practifi does not update the corresponding in Constant Contact fields.
- The current Constant Contact API does not support the following Email Campaigns:
-
Automated Emails (Birthdays and Anniversaries Emails/Email Series/Welcome Emails/Resend Emails to Non-Openers).
- Emails sent using Subject Lines A/B test.
-
Before You Begin
The customer must have an account with Constant Contact which will be used to authorize the connection between Practifi and the Constant Contact system. Moreover, in order to make the Constant Contact to Practifi data sync working smoothly for a large data volume, all client firms using this integration should consider reaching out to the Constant Contact team to upgrade their API key to be on the Partner Rate Plan as per the following Constant Contact recommendation:
In case others are viewing this post in the future, our standard API Key limits for our v2 API are 10,000 calls per day and 4 calls per second. Members of our partner program are given 250,000 calls per day and up to 20 calls per second. To associate your API Key to your partnership, please email webservices@constantcontact.com, CC your account manager, and include your Partner name as well as your API Key.
There is no Salesforce AppExchange app to install - all the code is in Practifi, and is enabled by actions at Step 5, below.
Field Mapping
Contact Mapping
The following are the fields that are mapped from Practifi to a Constant Contact contact record.
Practifi UI field |
Direction |
Constant Contact UI field |
Event |
Preferred Email |
🠞 Daily |
Email Address |
Contact from Practifi, not already in Constant Contact, and added to a List |
First Name |
🠞 Daily |
First Name |
Contact from Practifi, not already in Constant Contact, and added to a List |
Last Name |
🠞 Daily |
Last Name |
Contact from Practifi, not already in Constant Contact, and added to a List |
Do Not Email |
🠞Daily
🠞Trigger |
Subscribed/Unsubscribed setting |
Set with Contact’s Do Not Email setting if Contact from Practifi is not already in Constant Contact, and added to a List Set if Contact’s Do Not Email is changed in Practifi (either opt-in or opt-out) for the Contact |
Engagement Activity Mapping
Marketing campaign engagement activities recorded in Constant Contact are available within Practifi as an Interaction. The activity type is displayed in Practifi with the following descriptions.
Enabling the Integration
Enabling the Constant Contact integration with Practifi requires setting the following configurations:
Configuration |
Where |
1. API Key and Constant Contact URLs |
Constant Contact |
2. Create Auth Provider |
Salesforce Settings |
3. Create Named Credential |
Salesforce Settings |
4. Create Remote Site |
Salesforce Settings |
5. Enable Constant Contact Integration |
Salesforce Settings |
6. Schedule Sync Jobs |
Salesforce Settings |
7. Enable Practifi Triggers |
Salesforce Settings |
8. Add Picklist Value |
Salesforce Settings |
9. Add Launcher Item |
Practifi Settings |
10. Activate Menu Item |
Practifi Settings |
11. Enable Fact Find |
Practifi Settings |
1. API Key and Constant Contact URLs
Constant Contact Requirements
The integration requires one user account to be designated as the account through which the integration with Practifi operates. This account is capable of logging in to the Constant Contact website (www.constantcontact.com) for the creation of Campaigns, Email layouts, adjustment of list memberships, and the launching of email Campaigns.
From this Constant Contact account, the user needs to switch to the V3 API configuration section at https://v3.developer.constantcontact.com/ and log on with the primary user account.
In Constant Contact
Select the My Applications menu option.
Click New Application
Supply the name of the application (in the example which follows, Practifi_Tempranillo). Note that references to Constant Contact (eg CTCT) cannot be used. Click Save.
This will create the API Key (“Key”). This will be needed in a following step.
Click on Generate Secret, and copy this Secret (“Secret”) for the next step. Note the warning that the following panel is the only time the Secret will be visible, else a new Secret has to be created for the Application.
2. Create Auth Provider
Go to Salesforce Setup under the user’s avatar/picture icon in the top right
Go to the Quick Find/Search bar, search for and click on Auth. Providers
Click on New
Complete the details on the new Auth Provider panel, as follows:
Supply the following:
- Provider Type: Open ID Connect
- Name: Suggest CTCT Prod
- URL Suffix: accept the default
- Consumer Key: "Key" from above
- Consumer Secret: "Secret" from above
- Authorize Endpoint URL: https://authz.constantcontact.com/oauth2/default/v1/authorize
- Token Endpoint URL: https://authz.constantcontact.com/oauth2/default/v1/token
- Default Scope: contact_data campaign_data
- Send Access Token in Header: Ticked
- Include Consumer Secret in API Responses: Ticked
- Execute Registration As: The user name of an account that can create OAuth Providers on the Practifi site
On clicking Save, and additional details will be shown
Copy the Callback URL string back into Constant Contact
Back in Constant Contact
Add (using the Add another redirect URL link), or update the Redirect URL now that the Auth Provider has been set up.
Add additional details for the name and logo of the integration to appear elsewhere in Constant Contact.
- App logo: https://www.practifi.com/wp-content/uploads/2020/01/Practifi-Logo-Example_Light-Background.jpg
Click Save, to return to the list of Applications. The unique ID of the Practifi connection will be shown.
3. Create Named Credential
In Salesforce Setup, go to the Quick Find/Search bar, search for and click on Named Credentials
Click on New Named Credential
Supply the following:
- Label: Suggest CTCT
- Name: Suggest CTCT
- URL: https://api.cc.email
- Identity Type: Named Principal
- Authentication Protocol: OAuth 2.0
- Authentication Provider: Name-part of Named Credential (set up above)
- Scope: contact_data campaign_data offline_access
- Start Authentication Flow on Save: Ticked
As the user is likely to be logged on to Constant Contact at this time (setting up the Application) the authentication will take place immediately. Else, a user of Constant Contact will be asked to log on to Constant Contact first to establish the authentication.
Click Allow
4. Create Remote Sites
Two Remote Sites need to be created:
- API Site
- Token Site
In Salesforce Setup, go to the Quick Find/Search bar, search for and click on Remote Site
Click on New Remote Site
Set up the API Remote Site
Supply the following:
- Remote Site Name: Suggest CTCT_api
- Remote Site URL: https://api.cc.email
Set up Token Remote Site
Supply the following:
- Remote Site Name: Suggest CTCT_Auth
- Remote Site URL: https://idfed.constantcontact.com
5. Enable Constant Contact Integration
In Practifi, click the avatar in the top-right corner to view the Settings menu and select Salesforce Setup.
In Salesforce Setup, go to the Quick Find/Search bar, search for and click on Custom Settings.
Click Manage next to CTCT Integration Settings.
Supply the following
- API Version: v3
- Named_Credentials: Name-part of Named Credential (set up above)
- Tick all the options
6. Enable Sync Jobs
Scheduling of data synchronization jobs is needed for three types of data.
- Constant Contact Lists (the groupings of Contacts which are then included in Campaigns)
- Constant Contact Contacts (checking to see where there is a match by email address of a Constant Contact Contact, and one in Practifi)
- Constant Contact Activities (downloading the engagement Activities of Contacts into the Interactions tab in Practifi)
In Salesforce, go to the user’s dropdown and select Developer Console.
Under Debug, open an Open Execute Anonymous Window
Paste in the following fragments of code into the window and execute. Do each one separately.
Constant Contact Lists
Copy the List of Email Lists from Constant Contact to Practfi. Used to populate the Lists dropdown on the UI.
// Create Sync List Jobs at 00:30
cloupra.CTCTIntegrationInvocable ctct = new cloupra.CTCTIntegrationInvocable('synccontactlists');
String sch = '00 30 00 * * ?';
String jobID = System.schedule('CTCT sync contact list', sch, ctct);
Constant Contact Contacts
Link Contacts in Constant Contact with those Practifi Contacts which share the same email address, by copying over the Constant Contact ID to Practifi.
// Create Sync Contact Jobs at 01:00
cloupra.CTCTIntegrationInvocable ctct = new cloupra.CTCTIntegrationInvocable('synccontacts');
String sch = '00 00 01 * * ?';
String jobID = System.schedule('CTCT sync contact', sch, ctct);
Constant Contact Activities
Copy into Practifi the email engagement Activity of each Contact logged in Constant Contact.
// Create Sync Activities Jobs at 02:00
cloupra.CTCTIntegrationInvocable ctct = new cloupra.CTCTIntegrationInvocable('syncactivities');
String sch = '00 00 02 * * ?';
String jobID = System.schedule('CTCT sync activity', sch, ctct);
This will add the job and their date and time schedule, to the list of Scheduled Jobs in Salesforce.
Manually Initiating Synchronization
Presently, under the Settings > Config panel, three buttons have been placed for manually initiating the synch jobs for the Constant Contact integration. Click the button for Synch Constant Contact Contacts.
[These buttons will be moved shortly to a new tab under Settings, just for Constant Contact.]
This step initiates the respective scheduled jobs listed above. This will be useful if updates are made within Constant Contact (like new List names are created, or ongoing Campaign activity needs to be brought into Practifi immediately). Check under Salesforce > Apex Jobs to ensure the job completed cleanly.
7. Enable Practifi Triggers
Activate the Constant Contact trigger setting, which syncs changes to, and new Contacts in, Practifi with Constant Contact.
In Salesforce Setup, go to the Quick Find/Search bar, search for and click on Custom Settings.
Click Manage next to Practifi Trigger Settings.
Click Edit. Scroll to the end of the list of settings, and tick the trigger for CTCT Contact List Membership, and Save.
8. Add Picklist Value
Go to the Quick Find/Search bar, search for and click on Picklist Value Sets
Click on Menu Item Tabs (not Edit)
Check if the word constantcontact is not there. If not, click on New
Add the word constantcontact, lower case, to the field, and click Save.
9. Add Launcher Item
The Constant Contact integration does not rely on a Data Management tab or tabs on the left side context. Constant Contact Activity information appears under Interactions. It does require an addition to the Launcher dropdown list.
From Practifi, go to the User menu in the top-right corner and select Settings.
Select the Menu Items page.
Change to wizard context
Complete the new row as follows
- Applies to: Organization
- Label: Bulk Create Constant Contact Memberships
- Code: LCBULKCTCTM
- Icon: fa-bolt
- Order: 40.00 (TBA)
- Type: Item
- URL: /apex/practifi?context=wizard&tab=constantcontact&action=view
- Apply to Contexts: Select most relevant, if not all
- Target: Self
- Trigger State Change: Enable
- Active: Enable
10. Add Menu Item
Switch to Sidebar and filter to wizard context
Complete the new row as follows
- Applies to: Organization
- Context: wizard
- Code: SBWIZCTCTBLK
- Tab: constantcontact
- Label: Bulk Create Constant Contact Memberships
- Icon: fa-check-square
- Order: 5.00 (TBA)
- Sidebar?: Unticked
- Default: Unticked
- Header Page: bulkwizard_header
- View Page: wizard_bulk_ctct_membership
- Edit Page: <none>
- Add Page: <none>
11. Enable Fact Find
Move to the Config tab under Settings
Verify that Fact Find has been enabled, to ensure the Other Options dropdown list appears
Activation Notes
Initial Synching
Run the Synch Contact job before the first use of the integration. This will link Contacts in Constant Contact with those for which there is a match in Practifi for the same contact, as matched by Email address. The ConstantContactID is internally added to the Practifi Contact.
Presently, under the Settings > Config panel, three buttons have been placed for manually initiating the synch jobs for the Constant Contact integration. Click the button for Synch Constant Contact Contacts.
[This button will be moved shortly to a new tab under Settings, just for Constant Contact.]
This step initiates the cloupra.CTCTIntegrationInvocable('synccontacts') job. Check under Salesforce > Apex Jobs to ensure the job completed cleanly. This could need to run for some time for the initial sync to take place.
Problem Diagnosis
In the event that synching does not seem to be taking place correctly between Constant Contact and Practifi, check the Logs tab under Data Management > Logs, and filter for CTCT as the External System. This panel will list all the API calls submitted to the CTCT system, along with what the reply was.
Comments
Please sign in to leave a comment.