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
- The list is a publication list
- The list is top-level/ent
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!