1

At send-time, data is written to the SendLog and when fields in the Sending Data Extension match the Field name of the SendLog Data Extension, that value is written in the SendLog. But in a field ("Brand" field) I need to write a different value in the SendLog, not the one contained in my target data extension. I tried to do it by using AMPscript in my email, but it doesn't seem to work - in the SendLog I still see the value of the Brand field from my target DE, not the one I am trying to write using AMPscript.

Is there any way to overcome the value of matching fields in the target DE?

2 Answers 2

3

First of all, there are four ways of populating a custom field in the Email SendLog:

1.1‏‏‎ Matching field name in the Sendable DE

1.2‏‏‎ Matching attribute name passed in the API's Payload (e.g. Triggered Send)

2.‏‏‎‏‏‎ ‏‏‎ ‏‏‎ Matching attribute name in the Subscriber's Attributes (All Subscribers list)

3.‏‏‎‏‏‎ ‏‏‎ ‏‏‎ Matching AMPScript variable name inside an Email

The first two options are interchangeable and serve a similar purpose - provide initial information (Email Address and SubscriberKey) for the send either from API's Payload or Sendable DE's fields with an option to supply additional fields.

That is how the priority of populating custom fields in the Email SendLog goes in the same order as above. When the send is getting prepared, first it checks Sendable DE/API Payload, then Subscriber's Attributes, and lastly AMPScript variables. Even if all 3 places would be filled in, the priority would be Sendable DE's field, other 2 would be ignored.

That is what happens in your scenario, since a Sendable DE has a value for the "Brand" field - the AMPScript variable @Brand will be skipped. And if you would like to use the AMPScript variable's value, then you would need to simply play around with names:

  • Change the field's name in the SendLog and reference a new name via AMPScript
  • Create a new field in the SendLog and only reference it with AMPScript
  • Vice versa, change Sendable DE's field name
0

You can freely add columns to your sendlog, and they will be automatically populated, provided that column names match the ampscript variable names.

Meaning, that if you add Brand column to sendlog DE, and you define it in the email as @brand - you will pass the data to your sendlog. Your @brand variable can be populated with a value from a different DE utilizing the Lookup function.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .