Iterable recipe: inject data from a custom event into userProfile for email template

An email I’ve been working on needs to grab data from a custom event to populate a variable on the email template (or subject line). This could be accomplished with an API webhook call but I am trying to avoid mucking around with our public APIs for the time being. Luckily I can stuff data from the event onto the user and access later. This is not the cleanest solution but it works and I didn’t require any additional engineering resources to accomplish the task. Example:
Hi <Name>, Thank you for watching <PROGRAM_TITLE>!
The event data looks like this:
    "eventName": "<CUSTOM_EVENT>",
    "eventType": "customEvent",
    "email": "<EMAIL_ADDRESS>",
    "dataFields": {
        "program_title": "TEST NAME AWESOME",
To jam the program_title onto the person’s user profile, I use a Handlebars variable to read out the information from the event. Iterable makes the fields in the dataFields object accessible at the root level on the template.
-- Perform Actions: Change Contact Field --
-- merge top level objects instead of overwriting = TRUE --

Now the data from the event data has been saved onto the user profile in an easily accessible area. I can now comfortably access the data to produce the subject line using the Handlebars.
Hi {{firstName}}, Thank you for watching {{saved_event_data.campaign1}}!


Hi Jeff, Thank you for watching STRANGER THINGS!
Posted in Miscellaneous