how can I grab additional attributes values from emails properties screen and log that in the sendlog (refer the image)
-
Have you tried adding columns to SendLog that would be called Parameter 1, 2, 3, 4? Or perhaps AdditionalEmailAttribute1 etc - this is a long shot, but maybe it would work– zuzannamjCommented Jul 31, 2019 at 20:37
-
I do not see these additional attributes in my marketing cloud instance. Does somebody know why i do not see them? What is the basic use case for these additional attributes?– Johannes SchapdickCommented Aug 1, 2019 at 6:36
-
@JohannesSchapdick you have to enable WAC to see them: help.salesforce.com/…– zuzannamjCommented Aug 1, 2019 at 7:43
-
@CodeRage Is it possible to insert AMPScript in there that gets populated at send time? If ampscript is possible, what will be evaluated first the additional attributes or body etc.? For dynamic emails which would set parameter according to locales it would be kind of nice to have ampscript in there.– Johannes SchapdickCommented Aug 1, 2019 at 9:20
-
@JohannesSchapdick no idea if that's possible and in what order ampscript would get resolved, but I agree that it would useful to be able to use dynamic parameters– zuzannamjCommented Aug 1, 2019 at 9:30
4 Answers
Send log works for more than triggered sends as outlined in the help doc: 'Send Logging'
The send log data extension only logs information from user-initiated sends, triggered sends, and A/B test sends.
You can add custom fields to your send log, and they will be populated if the names of the columns in the send logging data extension exactly match
- the names of the profile attributes
- the fieldname in the sendable data extensions
- ampscript variable (@additionalattribute1)
-
1for the additionalattributes be aware you would likely need to make them into AMPscript vars to pass them in as the 'personalization string' for them begins with an underscore
_
which is not allowed for a DE field to begin with an underscore. Commented Aug 1, 2019 at 13:36
I've used Ampscript:
SET @Parameter3 = __AdditionalEmailAttribute3=
SET @Parameter4 = __AdditionalEmailAttribute4=
and it grabs the value from the respective fields and logs in the sendlog under Parameter3 & Parameter4 fields.
Adding column names to your SendLog Data Extension will work if you are using a Triggered Send to trigger your email. In order to achieve this, you would add the column to your SendLog DE, then trigger your email with a property the ContactAttributes with the same name.
For instance, you could add a column to your email with the name Parameter1, then trigger your email with:
{
"From": {
"Address": "[email protected]",
"Name": "Code@"
},
"To": {
"Address": "[email protected]",
"SubscriberKey": "[email protected]",
"ContactAttributes": {
"SubscriberAttributes": {
"Parameter1": "Parameter1"
}
}
},
"Options": {
"RequestType": "ASYNC"
}}
You can also create columns in your SendLog DataExtension matching Subscriber data. For instance, adding a SubscriberKey column to your SendLogDE will log the SubscriberKey for the send.
It may be worthwhile to add a column name to your SendLog DE matching the name of one of these parameters to give it a try.
%%[
SET @utm_campaign = __AdditionalEmailAttribute1
SET @utm_source = __AdditionalEmailAttribute2
SET @SubscriberKey = _subscriberkey
SET @EventDate = GetSendTime()
SET @View_Link = view_email_url
SET @Email_Id = _emailid
SET @Email_Name = emailname_
SET @Email = emailaddr
]%%
https://b2shashi.blogspot.com/2022/08/logging-significance-importance.html
-
Most of these are in the _Sent data view. What's the point of adding them to the sendlog? Commented Aug 29, 2022 at 3:05