Enabling the Constant Contact Integration

Follow
The functionality described in this article is available as part of our Fiano release and will not be available if your Practifi instance is not upgraded to this release. 
Please note: This content is intended for Practifi System Administrators and is technical in nature. The steps described in this article may not be able to be completed without System Administrator permissions. Please discuss your integration installation plans with your Practifi Customer Support Team for their assistance.

Overview

Our integration with Constant Contact allows users to create contact lists in Practifi and send them to Constant Contact for use in email campaigns. Updates to contact details in Practifi are synced back to Constant Contact. Users can also see the engagement their contacts have had during campaigns within Practifi as a new form of interaction. This article walks you through the steps to enable the Constant Contact integration in your Practifi instance.

Understanding the Constant Contact Integration

This integration positions Practifi and Constant Contact in the following roles:

Practifi Constant Contact
The source of truth about contacts within Practifi Client records Holds distribution lists of contact emails
Holds the most information about the contact Launches and tracks campaigns
Adds contacts to Constant Contact distribution lists Sends emails
Captures engagement activity for a contact Logs contact engagement activity
Passes back opt-out requests from contacts Respects do not email/opt-out requests

 

You should also understand the following about Practifi's integration with Constant Contact:

  • No contact field information is copied from Constant Contact to Practifi.
    • Constant Contact will not create orphan Contact records in Practifi.
    • The common contacts between both systems are linked by the Constant Contact ID stored in Practifi.
  • Updates to Email Address, First Name, Last Name, or Opt-in Status in Practifi are sent to Constant Contact immediately upon saving, with no job required.
  • Updates to the Email Address field in Practifi do not sever the link between the contact in Practifi and Constant Contact; the connection remains intact.

Before You Begin

To configure this integration, your firm must have a Constant Contact account. This account will authorize the connection between Practifi and the Constant Contact system.

There is no Salesforce AppExchange app to install for this integration; all the code is found in Practifi and can be enabled by following the steps detailed in this article.

Please note: As of the Vermentino release, we have reduced the Sync Tracking Activities Batch Size to 1 from the default value of 5. This was done to avoid an Apex CPU time limit error and prevent further failures in the nightly Constant Contact sync.


Field Mapping

Contact Mapping

The following are the fields that are mapped from Practifi to a Constant Contact contact record.

Practifi Field Direction Constant Contact 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 Interactions. The activity type is displayed in Practifi with the following descriptions:

Constant Contact Track Activity Type Description Practifi UI Description
em_sends Send activities Sent
em_opens Email open tracking activities Opened
em_clicks Link click-through tracking activities Clicked
em_bounces Bounce tracking activities Bounced
em_optouts Opt-out tracking activities Opted Out
em_forwards Forward to a friend tracking activities Forwarded

Integration Steps

Enabling the Constant Contact integration with Practifi requires a system administrator to set up the following configurations:

Configuration System
API Key and Constant Contact URLs Constant Contact
Create Auth Provider Salesforce Setup
Update Redirect URL Constant Contact
Create Remote Sites Salesforce Setup
Create Named Credential
Enable Constant Contact Integration
Enable Sync Jobs
Enable Practifi Triggers
Assign Permission Sets
Update Page Layouts

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 into 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, you should switch to the V3 API configuration section at https://v3.developer.constantcontact.com/ and log in with the primary user account.

Generate API Key and Secret

To generate the API Key and Secret in Constant Contact, do the following:

  1. In Constant Contact, select the My Applications tab.


     
  2. On the My Applications page, click New Application.


     
  3. In the New Application window, enter a name for the application.

    Please note: References to Constant Contact (e.g., CTCT) cannot be used.

  4. Click Save. This will create the API Key ("Key") to be used in the following step.


     
  5. Click Generate Secret.


     
  6. In the pop-up window, click the copy icon to copy the Secret for use in the next step.

    Please note: This is the only time the Secret will be visible; otherwise, a new Secret has to be created for the Application.



     


Create Auth Provider

To create a new Auth Provider, do the following:

  1. In Practifi, click the cog icon in the upper right-hand corner and select Setup.
  2. In the Quick Find search bar on the left-hand side, search for and select Auth. Providers.
  3. On the Auth. Providers page, click New.


     
  4. On the Auth. Provider Edit screen, make the following selections:
    • Provider Type: Open ID Connect
    • Name: CTCT
    • URL Suffix: CTCT
    • Consumer Key: API Key from Constant Contact
    • Consumer Secret: Secret from Constant Contact
    • Authorize Endpoint URL: https://authz.constantcontact.com/oauth2/default/v1/authorize
    • Token Endpoint URL: https://authz.constantcontact.com/oauth2/default/v1/token
    • Use Proof Key for Code Exchange (PKCE) Extension: Checked
    • Default Scopes: contact_data campaign_data offline_access
    • Send Access Token in Header: Checked
    • Include Consumer Secret in SOAP API Responses: Checked
    • Execute Registration As: Username of an account that can create OAuth Providers on the Practifi site


       
  5. Click Save. Additional details will be shown.
  6. In the Salesforce Configuration section, copy the value in the Callback URL field for use in Constant Contact.


     

Set Redirect URL in Constant Contact

After creating an Auth. Provider, you must add the Callback URL to your Constant Contact account. Do the following:

  1. Under Redirect URL, click Add another redirect URL or update the existing Redirect URL.


     
  2. 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

  3. Click Save to return to the list of applications. The unique ID of the Practifi connection will be shown.


Create Remote Site

Two Remote Sites need to be created:

  • API Site
  • Token Site

To create Remote Sites, do the following:

  1. In Salesforce Setup, use the Quick Find search bar to search for and select Remote Site Settings.


     
  2. On the Remote Site Settings page, click New Remote Site.


     
  3. On the Remote Site Edit page, enter the following:
  4. Click Save & New.
  5. On the Remote Site Edit page, enter the following:
  6. Click Save.

Create Named Credential

To create a named credential, do the following:

  1. In Salesforce Setup, use Quick Find search to search for and select Named Credentials.
  2. On the Named Credentials page, click the New drop-down and select New Legacy.


     
  3. On the New Named Credential screen, enter the following information:
    • Label: CTCT
    • Name: CTCT
    • URL: https://api.cc.email
    • Identity Type: Named Principal
    • Authentication Protocol: OAuth 2.0
    • Authentication Provider: Name of Auth. Provider set up previously
    • Scope: contact_data campaign_data offline_access
    • Start Authentication Flow on Save: Checked

  4. Click Save. If you are logged into Constant Contact when setting up the application, the authentication will occur immediately. If not, you will be prompted to log in to Constant Contact first to establish the authentication.
  5. When prompted, click Allow to give Practifi permission to access your Constant Contact account.


     

When completed, the named credential will show a status of Authenticated.

 


Enable the Constant Contact Integration

Next, update the CTCT Integration Settings. Do the following:

  1. In Salesforce Setup, use the Quick Find search bar to search for and select Custom Settings.


     
  2. On the Custom Settings page, click the Manage link next to CTCT Integration Settings.


     
  3. On the CTCT Integration Settings page, click Edit.


     
  4. On the Edit CTCT Integration Settings page, update the following:
    • API Version: v3
    • Named_Credentials: Name of the Named Credential created previously
    • Check all boxes

  5. Click Save.

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)

To schedule sync jobs, do the following:

  1. In Practifi, click the cog icon and select Developer Console. The Developer Console opens in a new tab.


     
  2. Click the Debug menu and select Open Execute Anonymous Window.


     
  3. 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. This is used to populate the Lists dropdown on the UI.

// Create Sync List Jobs at 00:30

practifi.CTCTIntegrationInvocable ctct = new practifi.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 that share the same email address by copying over the Constant Contact ID to Practifi.

// Create Sync Contact Jobs at 01:00

practifi.CTCTIntegrationInvocable ctct = new practifi.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

practifi.CTCTIntegrationInvocable ctct = new practifi.CTCTIntegrationInvocable('syncactivities'); String sch = '00 00 02 * * ?'; String jobID = System.schedule('CTCT sync activity', sch, ctct);

This will add the job and its date and time schedule to the list of Scheduled Jobs in Salesforce.


Enable Constant Contact Trigger

There is a Constant Contact trigger setting that syncs the creation of new contacts and updates to existing contacts from Practifi to Constant Contact.

To enable this trigger setting, do the following:

  1. In Salesforce Setup, use the Quick Find search bar to search for and select Custom Settings.


     
  2. Click the Manage link next to Practifi Trigger Settings.


     
  3. On the Practifi Trigger Settings page, click Edit.


     
  4. On the Practifi Trigger Settings Edit page, scroll down and check the CTCT Contact List Membership box.

    Please note: You can use <CTRL> + F or <Command> + F to search for this item in the list.



     

  5. Scroll up and click Save.

Assign Constant Contact Permission Set

To assign the Constant Contact Permission Set to users in your Practifi organization, do the following:

  1. In Salesforce Setup, use the Quick Find search bar to search for and select Permission Sets.


     
  2. On the Permission Sets page, click Practifi - Integration - Constant Contact.


     
  3. On the Practifi - Integration - Constant Contact page, click Manage Assignments.


     
  4. On the Current Assignments page, click Add Assignment.


     
  5. Check the box(es) for the user(s) you want to assign the permission set to, then click Next.


     
  6. On the next screen, click Assign.
  7. Click Done.

Update Page Layouts

Contact Record Page Layout

Adding a Constant Contact tab component to the Contact record page layout allows users to see a table with a contact's activities from Constant Contact campaigns. To add the Constant Contact tab to a Contact record, do the following:

  1. In Practifi, open a Client record and click on the name of a contact.


     
  2. While viewing the Contact record, click on the cog icon and select Edit Page.


     
  3. In the Lightning App Builder, click the Basics tab.


     
  4. In the Tabs component on the right, click Add Tab.


     
  5. Click on the new tab, which is labeled Details by default.


     
  6. Click the Tab Label drop-down and select Custom.

    Please note: You might have to scroll to the top of the list to see this option.

  7. In the Custom Label field, type Constant Contact.
  8. Click + Add Filter.


     
  9. Under Filter Type, click Advanced.


     
  10. Under Field, click Select.


     
  11. In the Select Field window, click the caret and select Permissions.


     
  12. Click the caret and select Custom Permission.


     
  13. Begin typing constant and select practifi.Constant_Contact.


     
  14. Click Done to exit the Select Field window.
  15. Click Done to close the tab edit popup.


     
  16. Click More > Constant Contact to select the Constant Contact tab.


     
  17. From the Components panel, drag and drop a Practifi - Datatable (Record/Home Page) component into the Constant Contact tab. 


     
  18. In the right side panel, click into the Config Name field and type Contact - Constant Contact - Interactions.


     
  19. Click Save.
  20. Click the Back arrow to exit the Lightning App Builder. The Constant Contact tab now appears on the Contact record.


     

Client Record Page Layout

Adding a custom Tabs component to the Activities section of a Client record allows users to see what campaigns clients have been added to, as well as the activities from those campaigns.

Move the Activities Timeline to Its Own Tab

First, add a Tabs component to the Activities section:

  1. In Practifi, open a Client record.
  2. Click the cog icon and select Edit Page.


     
  3. In the Lightning App Builder, scroll down to the Activities component.


     
  4. From the Components panel, drag and drop a Tabs component above the Activities component.


     
  5. Drag and drop the Activities component into the Related tab within the Tabs component.


     
  6. In the main editor window, click the Related tab.
  7. In the right side panel under Tabs, click the Related hyperlink.
  8. Click the Tab Label drop-down and select Custom.

    Please note: You might have to scroll to the top of the list to see this option.

  9. In the Custom Label field, type Timeline.
  10. Click Done.


     
  11. In the right side panel under Tabs, click the Details hyperlink.
  12. Click the Tab Label drop-down and select Custom.
  13. In the Custom Label field, type Constant Contact.
  14. Click Done.


     

Customize the Constant Contact Tab

Next, add another Tabs component within the Constant Contact tab:

  1. In the main editor window, click the Constant Contact tab you just relabeled.
  2. From the Components panel, drag and drop another Tabs component into the Constant Contact tab.


     
  3. In the right side panel under Tabs, click the Related hyperlink.
  4. Click the Tab Label drop-down and select Custom.
  5. In the Custom Label field, type Membership.
  6. Click Done.


     
  7. In the right side panel under Tabs, click the Details hyperlink.
  8. Click the Tab Label drop-down and select Custom.
  9. In the Custom Label field, type Activity.
  10. Click Done.


     
  11. From the Components panel, drag and drop a Practifi - Datatable - Record/Home Page component into the Membership tab.


     
  12. In the right side panel, click into the Config Name field and type Household-Constant Contact-List Membership.


     
  13. From the Components panel, drag and drop another Practifi - Datatable - Record/Home Page component into the Activity tab.


     
  14. In the right side panel, click into the Config Name field and type Household-Organization - Constant Contact - Interactions.


     
  15. At the top of the Lightning App Builder, click Save.
  16. Click the Back arrow to exit the Lightning App Builder.

In the record side panel, click the Activities navigation icon. The Constant Contact tab now appears in the Activities section.


 


Configuring the Sync Activities to Event Setting

The Sync Activities to Event setting controls whether Constant Contact email tracking activities, such as sends, opens, and clicks, create Event records in Practifi. This setting is disabled by default and must be explicitly enabled at the organization level.

When enabled, each Constant Contact tracking activity creates a properly populated Event record with a descriptive subject (for example, "CTCT: Open - Q1 Newsletter"), a link to the related Contact and Account, and an Activity Subtype of CTCT. The CTCT Activity Subtype allows these events to be excluded from Lookup Rollup Summary calculations. If a contact both received and opened the same campaign email, the Event reflects the open as the stronger engagement signal. Any existing blank Event records created by prior sync activity will be automatically corrected in the next sync cycle.

When the setting is disabled, activities still sync to the CTCT Contact Activity object, but no Event records are created.

To enable the Sync Activities to Event setting, do the following:

  1. In Salesforce Setup, use the Quick Find search bar to search for and select Custom Settings.
  2. On the Custom Settings page, click the Manage link next to CTCT Integration Settings.

  3. On the CTCT Integration Settings page, click Edit.
  4. Check the Sync Activities to Event box.

  5. Click Save.

Please note: This setting is recommended only for organizations where advisors actively use the Activity Timeline to track email engagement. High-volume organizations should evaluate the impact on timeline performance before enabling. Enabling the setting creates Event records for all existing CTCT activities on the next sync cycle, not just new ones going forward, which could result in a significant number of Event records being created at once.

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.