Table of Contents
Data Management Admin Tool
Use the data management tool to manage subscribers with publication lists.
Access to the Flying Cork x UPMC back end data management tool is currently granted via email.
Manage Publication Lists
Visit the data management tool (via the access URL provided in an email) and navigate to Manage Newsletters and Categories > Publication Lists.
The file below creates the functionality to add, edit, delete, and display publication lists within the back end data management tool. Data manually populated into the back end then gets pulled into the front end of the UPMC Dynamic Preference Center.
- File path: UPMC BU > My Landing Pages > Profile Center > Dynamic Preference center > Back End > AJAX Manage Preference Publications - Edit Landing Page
The data from this section gets recorded in a data extension called Available_Publication, located here:
Add Publication List
Click “Add New Publication List” to add a new publication list. These additions will immediately be reflected in the preference center.
- Publication List ID: The ID of the publication list. This ID can be found by going to the location of the publication list in marketing cloud, clicking on the publication list name, and then clicking "export." Copy the ID and click "cancel." Paste the ID into this field. This is a "read only" field meaning it cannot be edited later.
- Publication List Friendly Name: The name of the publication list. This should be a "friendly name" as it may be visually displayed.
- Friendly Description: The description of the publication list. This should be a "friendly description" as it may be visually displayed. This should be no longer than 110 characters.
- Small Thumbnail Img URL: The URL of the small thumbnail image. Image is provided by the client and dimensions should be 100x100. Upload the image into content builder and paste the URL into this field. If an image is not provided, use this placeholder: https://image.notify.upmc.com/lib/fe9213727564007a7c/m/3/8c63266e-acc2-4498-86af-5449c155ef20.gif.
- Large Thumbnail Img URL: The URL of the large thumbnail image. Image is provided by the client and dimensions should be 510x292. Upload the image into content builder and paste the URL into this field. If an image is not provided, use this placeholder: https://image.notify.upmc.com/lib/fe9213727564007a7c/m/3/7bfa687b-11e3-4b1c-85f7-5adf5c9e9ba0.gif.
- Business Unit: The business unit in which the publication list lives. Add the business unit account ID here. To find the business unit account ID, open salesforce marketing cloud and view the drop down menu in the top righthand corner of your screen where business unit is chosen. Hover over each business unit name to see the account ID. This is the number you will add to this field. For example, the account ID for the Cancer business unit is 7231712.
- Publication List Type: Enter "shared" or "one to one." Click here for more information.
- Journey Association: The name of the journey that the publication list is associated with.
- Comments: This is a field where the admin can include any additional comments about the publication list.
Edit/Delete Publication List
Click the “Edit” button to the right of the publication list to make changes to that particular publication list.
When publication list data is edited using the data management tool, the record in the Available_Publication data extension will also be updated, and changes are immediately reflected in the preference center…if applicable.
Click the “Delete” button to the right of the publication list to delete it.
When publication list data is deleted using the data management tool, the record in the Available_Publication data extension will also be deleted, and the publication list will no longer be available in the preference center…if applicable.
Preference Center Interface
On Page Load
The Available_Subscriptions DE can also contain publication lists. We can also process these records and check the data_extension_name field in for “PublicationList” using IndexOf. Then if a match is found, we run a lookup on that publication list using the visitor’s stored email address to see if they’re subscribed.
Initialize/Populate Subscriptions
sortByTitle(). Once the newsletters are sorted, we call the
initializeSubscriptions()function, and we loop through the de_title_pairs object to populate the page with the newsletters’ DOM objects
Filtering Newsletters
We run the filterNewsletters() function onChange, which will:
- Create a new array, called divsToHide, containing all of the newsletter DOM objects
- Grab the value (which would be the category) from the dropdown
- Set all newsletters to display none, then loop back through the divsToHide array and set any newsletters matching the category pulled from the dropdown to display inline block.
Checking Publication List from Journey Email (Showing a Journey in the First Position)
We only want to show a visitor the journey publication when they come from an email in that journey; and we want to make sure that journey appears first under My Subscriptions.
Once someone visits the preference center, we check the query string for “data_extension_name” and “publication_list_id“. If one is found, we pull that value and set @first_position_de. (Note: All journeys use publication lists and NOT data extensions. This is due to limitations of removing users from data extensions and how SFMC processes journeys.)
If the field “publication_list_id” is detected, we prefix the ID that we pull with “PublicationList_”, which should give us something like PublicationList_1234. Then we use that value to set the @first_position_de variable.
Then we loop through DynamicPreferenceCenterData and populate the visitor’s current subscriptions with the
AddToMySubscriptions()
function. For every deName passed into that function, we compare it against the @first_postion_de variable. If it matches, we build the HTML for the subscription like we’d normally do, but inside of the div with the ID of “my-first-position“, which is located before all other subscriptions in that list and ensuring that it’s the first item seen under the My Subscriptions section.
Relevant Functions
sortByTitle(array)We have to use a bubble sort to alphabatize all the data extensions and publication lists because Internet Explorer doesn’t allow us to make use of the .sort() function.
initializeSubscriptions()This is the core function that populates the page on load. We use the
sortByTitle()
function to alphabatize the array of objects, de_title_pairs. Once sorted we loop through the array and call the
AddToMySubscriptions(),
AddToFeaturedSubscriptions(), and
AddToAllSubscriptions()functions passing the DE name / publication list ID
AddToAllSubscriptions(deName)Creates a DOM object in the All Subscriptions section and adds an event listener to the toggle switch. If the current deName passed into the function matches the first_position_de it will add a DOM object in the all-first-position div.
AddToMySubscriptions(deName)Creates a DOM object in the My Subscriptions section and adds an event listener to the toggle switch. If the current deName passed into the function matches the first_position_de it will add a DOM object in the my-first-position div.
The data extension name is passed in as deName and we use that to look up the title, description, image url, etc. in the PreferenceCenterData.DataExtensions object.
AddToFeaturedSubscriptions(deName)Creates a DOM object in the Featured Subscriptions section and adds an event listener to the toggle switch.
The data extension name is passed in as deName and we use that to look up the title, description, image url, etc. in the PreferenceCenterData.DataExtensions object.
Preference Center Data Processing
When subscribing, the parameters are action = updateSub, subscribed != false, and PublicationList + the ListID. It will make the email in that list have a status of “Active”
When unsubscribing, the parameters are action = updateSub, subscribed = false, and PublicationList + the ListID. It will make the email in that list have a status of “Unsubscribed”
Use the data management tool to add, edit, and delete all available UPMC newsletters.
Access to the Flying Cork x UPMC back end data management tool is currently granted via email.