Table of Contents
Data Management Admin Tool
Use the data management tool to add, edit, and delete all filter by categories for the UPMC Dynamic Preference Center.
Access to the Flying Cork x UPMC back end data management tool is currently granted via email.
Manage Newsletter (Filter By) Categories
Visit the data management tool (via the access URL provided in an email) and navigate to Manage Newsletters and Categories > Categories.
The file below creates the functionality to add, edit, delete, and display all filter-by categories 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. This data populates the filter by drop down menu within the “Available Subscriptions” section.
- File path: My Landing Pages > Profile Center > Dynamic Preference center > Back End > AJAX Manage Preference Categories - Edit Landing Page
The data from this section gets recorded in a data extension called Available_Categories, located here:
Add Category
Click “Add Category” to add a new category. These additions will immediately be reflected in the preference centers’ filter by drop down in the “All Subscriptions” section.
- Category Name: The name of the category. This should be a "friendly name" as it will be visually displayed in the filter by drop down menu in the preference center.
- Category Order: The order in which categories will be displayed in the filter by drop down menu. They are currently being display alphabetically.
Edit/Delete Category
Click the “Edit” button to the right of the category to make changes to that particular category.
When category data is edited using the data management tool, the record in the Available_Categories data extension will also be updated, and changes are immediately reflected in the preference center.
Click the “Delete” button to the right of the category to delete it.
When category data is deleted using the data management tool, the record in the Available_Categories data extension will also be deleted, and the category will no longer be available to filter by in the preference center.
Pair A Category With A Newsletter
Click here for information on pairing categories with newsletters.
Preference Center Interface
On Page Load/Generating the Dropdown
When the page loads, we pull the records from the Available_Categories Data Extension. We then generate the filter dropdown with the records returned by the DE with AMPscript.
In our DataExtensions JSON Object, we will have used the Subscription_and_Category DE to set the category (the ‘category’ key in PreferenceCenterData.DataExtensions) for each newsletter.
When we start to create the DOM objects for each newsletter, we pull from PreferenceCenterData.DataExtensions.category to create a class with the name of the category and apply it to the container of the new DOM object. We use this class to filter off of.
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
filterNewsletters()
Decides what newsletters to show/hide based on a dropdown selection. The dropdown categories are populated via the Available_Categories data extension.
initializeSubscriptions()