we have created a custom landing page in Marketing Cloud that we are using as a preference centre/unsubscribe centre to update marketing cloud all subscribers when contacts unsubscribe & Sales cloud too. All of the contacts interactions we are saving in a data extension in marketing cloud to analyse the interaction with the cloud page.
we have noticed that there are instances when the unsubscribe log event are not recorded in the All Subscribers. We can see that the users have asked to unsubscribe (via the data extension inputs) but status in the all subscribers remains Active.
Cloud page is at Enterprise Business unit level. The unsubscribe code is the one from the documentation and we are passing the Subscriber Key, List ID, Job ID & reason in the code. The one that we are not passing is Batch id. From what i read Batch ID is optional and code works most of the time.
Code from the cloud page:
/* read user submitted data */
SET @SubscriberKey = RequestParameter("SubscriberKey")
SET @MID = RequestParameter("MID")
SET @JobID = RequestParameter("JobID")
SET @MKTId=RequestParameter("MKTId")
SET @email=RequestParameter('email')
SET @ListID = XXX /* ID of All Subscribers List */
SET @UnsubEvent = CreateObject("ExecuteRequest")
SetObjectProperty(@UnsubEvent,"Name","LogUnsubEvent")
SET @Unsub_Property = CreateObject("APIProperty")
SetObjectProperty(@Unsub_Property, "Name", "SubscriberKey")
SetObjectProperty(@Unsub_Property, "Value", @SubscriberKey)
AddObjectArrayItem(@UnsubEvent, "Parameters", @Unsub_Property)
SET @Unsub_Property = CreateObject("APIProperty")
SetObjectProperty(@Unsub_Property, "Name", "JobID")
SetObjectProperty(@Unsub_Property, "Value", @JobID)
AddObjectArrayItem(@UnsubEvent, "Parameters", @Unsub_Property)
SET @Unsub_Property = CreateObject("APIProperty")
SetObjectProperty(@Unsub_Property, "Name", "ListID")
SetObjectProperty(@Unsub_Property, "Value", @ListID)
AddObjectArrayItem(@UnsubEvent, "Parameters", @Unsub_Property)
SET @Unsub_Property = CreateObject("APIProperty")
SetObjectProperty(@Unsub_Property, "Name", "Reason")
SetObjectProperty(@Unsub_Property, "Value", @UnsubReason)
AddObjectArrayItem(@UnsubEvent, "Parameters", @Unsub_Property)
SET @UnsubEvent_statusCode = InvokeExecute(@UnsubEvent, @overallStatus, @requestId)
SET @Response = Row(@UnsubEvent_statusCode, 1)
SET @Status = Field(@Response,"StatusMessage")
SET @Error = Field(@Response,"ErrorCode")
As I said this code processes and unsubscribes correctly some subscribers but not others and I can't tell why that is. For now i have an automation that checks the unsubscribes recorded via cloud page vs the unsubscribes via the data view _Unsubscribe for comparison to see what records have been missed and updates the All Subscribers via data extract/file transfer / import.
Any suggestions on why the code is failing to process for all records? The volumes are not big at all, we are getting a submission on the cloud page every few minutes or so.
Thanks, Giulietta