I've written scripts that extract email lifecycle information from Salesforce Marketing Cloud's SOAP API, but am unable to find a way to get email subjects for each subscriber after AMPscript has been processed.
Essentially, I use the API to get from
Sends, and then get all the events (
BounceEvent, etc.) for all the
Sends. Each of these events is then stored in a separate database, alongside related information (subscriber email, campaign name, email subject, and some other data).
This works quite well, and I'm able to get all the information I need except for rendered email subject. Many emails have dynamic subject lines with AMPscript in them, for example
%%[ IF PROP_A == \"foo\" OR PROP_B == \"bar\" THEN ]%% subject 1 %%[ ELSE ]%% subject 2 %%[ ENDIF ]%%. When I say "rendered email subject", I mean that I'm interested in obtaining the subject as actually sent to the particular subscriber of that event. So for subscriber A the subject may be "subject 1", and for B it may be "subject 2".
subject attribute of both
SentEvent, etc.) have a rendered subject, either. This makes some sense since it would be redundant across all events. However, for the life of me I cannot find any objects that would logically hold information like the subject as a particular subscriber receives it.
Does such an object or attribute exist somewhere I'm not seeing? If not, are there any other approaches to get this data?