Some of the functionality described in this article is available as part of our Vermentino 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 lists of contacts within 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
- Before You Begin
- Field Mapping
- Integration Steps
- API Key and Constant Contact URLs
- Create Auth Provider
- Set Redirect URL in Constant Contact
- Create Remote Sites
- Create Named Credential
- Enable the Constant Contact Integration
- Enable Sync Jobs
- Enable Constant Contact Trigger
- Assign Constant Contact Permission Set
- Update Page Layouts
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.
- Only Email Address, First Name, Last Name and Opt-in Status are copied to Constant Contact when a new contact is created in Practifi.
- Any changes made to the Email Address, First Name, Last Name or Opt-in Status fields in Practifi are not automatically updated in Constant Contact.
- In the case of an update to the Email Address field in Practifi, the link between the contact in Practifi and the contact in Constant Contact is severed.
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 which 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:
- In Constant Contact, select the My Applications tab.
- On the My Applications page, click New Application.
- In the New Application window, enter a name for the application.
Please note: References to Constant Contact (e.g. CTCT) cannot be used.
- Click Save. This will create the API Key (“Key”) to be used in the following step.
- Click Generate Secret.
- In the popup 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:
- In Practifi, click the cog icon in the upper right-hand corner and select Setup.
- In the Quick Find search bar on the left-hand side, search for and select Auth. Providers.
- On the Auth. Providers page, click New.
- 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 which can create OAuth Providers on the Practifi site
- Click Save. Additional details will be shown.
- 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:
- Under Redirect URL, click Add another redirect URL or update the existing Redirect URL.
- 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
-
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.
Create Remote Site
Two Remote Sites need to be created:
- API Site
- Token Site
To create Remote Sites, do the following:
- In Salesforce Setup use the Quick Find search bar to search for and select Remote Site Settings.
- On the Remote Site Settings page, click New Remote Site.
- On the Remote Site Edit page, enter the following:
- Remote Site Name: CTCT_api
- Remote Site URL: https://api.cc.email
-
Active box: Checked
- Click Save & New.
- On the Remote Site Edit page, enter the following:
- Remote Site Name: CTCT_Auth
- Remote Site URL: https://idfed.constantcontact.com
-
Active box: Checked
- Click Save.
Create Named Credential
To create a named credential, do the following:
- In Salesforce Setup, use Quick Find search to search for and select Named Credentials.
- On the Named Credentials page, click the New drop-down and select New Legacy.
- 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
- 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 into Constant Contact first to establish the authentication.
- 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:
- In Salesforce Setup, use the Quick Find search bar to search for and select Custom Settings.
- On the Custom Settings page, click the Manage link next to CTCT Integration Settings.
- On the CTCT Integration Settings page, click Edit.
- 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
- 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:
- In Practifi, click the cog icon and select Developer Console. The Developer Console opens in a new tab.
- Click the Debug menu and select 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. 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:
- In Salesforce Setup, use the Quick Find search bar to search for and select Custom Settings.
- Click the Manage link next to Practifi Trigger Settings.
- On the Practifi Trigger Settings page, click Edit.
- 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.
- 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:
- In Salesforce Setup, use the Quick Find search bar to search for and select Permission Sets.
- On the Permission Sets page, click Practifi - Integration - Constant Contact.
- On the Practifi - Integration - Constant Contact page, click Manage Assignments.
- On the Current Assignments page, click Add Assignment.
-
Check the box(es) for the user(s) you want to assign the permission set to, then click Next.
- On the next screen, click Assign.
- 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:
- In Practifi, open a Client record and click on the name of a contact.
- While viewing the Contact record, click on the cog icon and select Edit Page.
- In the Lightning App Builder, click the Basics tab.
- In the Tabs component on the right, click Add Tab.
- Click on the new tab, which is labeled Details by default.
- 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.
- In the Custom Label field, type Constant Contact.
- Click + Add Filter.
- Under Filter Type, click Advanced.
- Under Field, click Select.
- In the Select Field window, click the caret and select Permissions.
- Click the caret and select Custom Permission.
- Begin typing constant and select practifi.Constant_Contact.
- Click Done to exit the Select Field window.
- Click Done to close the tab edit popup.
- Click More > Constant Contact to select the Constant Contact tab.
- From the Components panel, drag and drop a Practifi - Datatable (Record/Home Page) component into the Constant Contact tab.
- In the right side panel, click into the Config Name field and type Contact - Constant Contact - Interactions.
- Click Save.
- 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:
- In Practifi, open a Client record.
- Click the cog icon and select Edit Page.
- In the Lightning App Builder, scroll down to the Activities component.
- From the Components panel, drag and drop a Tabs component above the Activities component.
- Drag and drop the Activities component into the Related tab within the Tabs component.
- In the main editor window, click the Related tab.
- In the right side panel under Tabs, click the Related hyperlink.
- 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.
- In the Custom Label field, type Timeline.
- Click Done.
- In the right side panel under Tabs, click the Details hyperlink.
- Click the Tab Label drop-down and select Custom.
- In the Custom Label field, type Constant Contact.
- Click Done.
Customize the Constant Contact Tab
Next, add another Tabs component within the Constant Contact tab:
- In the main editor window, click the Constant Contact tab you just relabeled.
- From the Components panel, drag and drop another Tabs component into the Constant Contact tab.
- In the right side panel under Tabs, click the Related hyperlink.
- Click the Tab Label drop-down and select Custom.
- In the Custom Label field, type Membership.
- Click Done.
- In the right side panel under Tabs, click the Details hyperlink.
- Click the Tab Label drop-down and select Custom.
- In the Custom Label field, type Activity.
- Click Done.
- From the Components panel, drag and drop a Practifi - Datatable - Record/Home Page component into the Membership tab.
-
In the right side panel, click into the Config Name field and type Household-Constant Contact-List Membership.
- From the Components panel, drag and drop another Practifi - Datatable - Record/Home Page component into the Activity tab.
-
In the right side panel, click into the Config Name field and type Household-Organization - Constant Contact - Interactions.
- At the top of the Lightning App Builder, click Save.
- 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.
Comments
Article is closed for comments.