Archive > Preference Center > Available Newsletters

Table of Contents

Data Management Admin Tool

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.

Manage Available Newsletters

Visit the data management tool (via the access URL provided in an email) and navigate to Manage Newsletters and Categories > Available Newsletters.

The file below creates the functionality to add, edit, delete, and display all available newsletters 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. 

The data from this section gets recorded in a data extension called Available_Subscriptions, located here:

Shared Items > Shared Data Extensions > Preferences_Dynamic > Available_Subscriptions.
Add Newsletter

Click “Add Newsletter” to add a new newsletter. If the newsletter has an “active” status, these additions will immediately be reflected in the preference center.

Edit/Delete Newsletter

Click the “Edit” button to the right of the newsletter to make changes to that particular newsletter.
When newsletter data is edited using the data management tool, the record in the Available_Subscriptions data extension will also be updated, and changes are immediately reflected in the preference center.

Click the “Delete” button to the right of the newsletter to delete it. 
When newsletter data is deleted using the data management tool, the record in the Available_Subscriptions data extension will also be deleted, and the newsletter will no longer be available in the preference center.

Featured Newsletters

Click here for information on featured newsletters.

Pair A Newsletter With A Category

Click here for information on pairing newsletters with categories.

Preference Center Interface

On Page Load
When the page loads, we pull records from the Available_Subscriptions Data Extension. Then we start to loop through the records returned by the DE and add them into our PreferenceCenterData.DataExtensions Object.
Initialize/Populate Subscriptions
We then alphabatize the newsletters with
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.

 

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.

Your email address will not be published. Required fields are marked *