I am working on a landing page, and right now, the code is all done in AMPScript (as that's what I'm most comfortable with). I have a one-click unsub page that is working great, except for cases where the email was sent to a publication list that was a shared publication list. I already have a method to determine that

  1. The list is a publication list
  2. The list is top-level/ent

Existing code:

SET @ll_sub = CreateObject("Subscriber")
SetObjectProperty(@ll_sub,"EmailAddress", @SubscriberKey)
SetObjectProperty(@ll_sub, "SubscriberKey", @SubscriberKey)

set @subscription = CreateObject("SubscriberList")
SetObjectProperty( @subscription, "ID",@ListID)
SetObjectProperty( @subscription, "IDSpecified", "true")
SetObjectProperty( @subscription, "Status", "Unsubscribed" )
SetObjectProperty( @subscription, "StatusSpecified", "true" )     
AddObjectArrayItem( @ll_sub, "Lists", @subscription )

SET @ll_statusCode = InvokeUpdate(@ll_sub, @ll_statusMsg, @errorCode)

I have a @Flag variable that tells me if it is enterprise level or not, and I have a @Type variable that tells me if this is a group, list, or publication list.

Any thoughts on how to log an unsub event to this publication list when it is top level?

Thanks for your help!


You can define the parent BU MID in the SetObjectProperty and use a SimpleFilterPart for the Publication List ID:

SET @MID = "Account MID Here"
SET @clientID = CreateObject("ClientID")
SetObjectProperty(@clientID, "ID", @MID)

set @sfp = CreateObject("SimpleFilterPart")
AddObjectArrayItem(@sfp,"Value","Publication ListID Here")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.