Background: Attempting to create a send log for contacts who can make multiple enquiries on different services and models, but if they already have a record logged in this sendlog data extension with an existing email address, model and service match - to then have them pulled in an exclusion query for email sends they could also receive via another journey (as it exists in the sendlog).
Working with retention lists pulled in via data extension, and Email Send Log data extensions cannot be activated at this time.
Have tried the following but on test preview and send, neither seem to get the email sent out, let alone log this data.
UpsertDE:
%%[
VAR @EmailName, @EmailID, @model, @SubscriberKey, @Email
SET @EmailName = '%%emailname_%%'
SET @EmailID = '%%_emailid%%'
SET @model = AttributeValue('model')
SET @SubscriberKey = '%%_subscriberkey%%'
SET @Email = '%%emailaddr%%'
/* If no record exists with this Email Address, Email ID and Model combination, Insert Variables into the Data Extension */
UpsertDE('ContactSendLog-UAT',3,'EmailAddress',@Email,'model',@model,'EmailID',@EmailID,'SubscriberKey',@SubscriberKey,'EmailName',@EmailName,'SendDate',NOW())
]%%
InsertDE:
%%[
VAR @EmailName, @EmailID, @model, @SubscriberKey, @Email
SET @EmailName = '%%emailname_%%'
SET @EmailID = '%%_emailid%%'
SET @model = AttributeValue('model')
SET @SubscriberKey = '%%_subscriberkey%%'
SET @Email = '%%emailaddr%%'
InsertDE('ContactSendLog-UAT','SubscriberKey',@SubscriberKey,'EmailAddress',@Email,'EmailName',@EmailName,'EmailID',@EmailID,'model',@model,'SendDate',NOW())
]%%
Any ideas on what could be going wrong here?