We want to create a simple custom subscription center with an 'Unsubscribe' button.
I'm trying to figure out what the best approach would be to do this using AMPscript (that is, what AMPscript code to execute when the form button is submitted). I was thinking of creating a CloudPage URL that looks like this:
http://campaign.company.com/unsubscribe?id=123456
Where 123456
is the subscriber key. I've found this example but it looks pretty over the top and requires the following URL parameters in addition to Subscriber Key:
SET @jid = RequestParameter("jobid")
SET @listid = RequestParameter("listid")
SET @batchid = RequestParameter("batchid")
Is this really necessary? All I want to do is to unsubscribe a SubscriberKey from the All Subscribers list (I assume that I have to use the InvokeExecute API AMPscript function).
Best Answer
This article outlines the minimal required for logging an unsub event. Here's the relevant section: