Background Info :

I have created a custom unsubscribe LP. I use publication list to send the newsletter emails and this email has custom unsubscribe link . when the user clicks the link, he will be directed to the custom unsubscribe LP with a link button to unsubscribe from the particular publication lists . Once unsubscribed, a triggered email is sent to user containing RESUBSCRIBE link button option to resubscribe .

I display the values to see if they are passed correctly. From newsletter email to unsubscibe page i gets values like below which are correct:

var_listname is : eDM test 2 (publication list name)
var_listid : 19121361 
key is : 68c51941-51cc-e211-827a-0050569861d9,contact
emailaddre is : ir@efc.com
var_jobid : 33119304
JobSubscriberBatchID : 1

When the user click the unsub link in LP, it takes it to the processign page (code) and based on it takes to confirm or error page. In processing page , i diplayed the values and they are corrrect and works fine :

process_listname is : eDM test 2
process_listid : 19121361
key is : 68c51941-51cc-e211-827a-0050569861d9,contact
process_unsub is : Yes
process_email is :  ir@efc.com
Status : Event posted
Error : 0
overallStatus : OK
requestId : 2c7d8a77-7733-4a4c-ac29-7ab17609b5c9
process_jid : 33119304
ts_statusMsg : Created TriggeredSend
ts_statusCode : OK
errorCode : 0

Issue :

All works till the user gets unsubscribed from the publication list and also gets triggered email . When the user clicks the resubsciber button link in the triggered email , i get issue here . I tracked the values to see :

process_listname is : All Subscribers 
process_listid : 17794465 
key is : 68c51941-51cc-e211-827a-0050569861d9,contact 
process_unsub is : Sub_add_update 
process_email is : ir@efc.com
overallStatus : Error 
requestId : 3516d092-4a05-4576-b873-b83b8e3870be 
process_jid : 33115240 
re_Status : Value cannot be null. Parameter name: key 
re_Error : 0 
ts_statusMsg : 
ts_statusCode : 
errorCode : 

I wonder, here we see it gives ALL subscribers and not the particular publication lists. How can i link them and where ..is it at triggered sends ? or in the subscribe code ? so i can have user resubscribe to that particular list.

Triggered send  :

 SET @ts = CreateObject("TriggeredSend")
   SET @tsDef = CreateObject("TriggeredSendDefinition")
      SetObjectProperty(@tsDef, "CustomerKey", "21406")
   SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)

   SET @ts_sub = CreateObject("Subscriber")
   SetObjectProperty(@ts_sub, "EmailAddress", @emailaddr)  
   SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)

   AddObjectArrayItem(@ts, "Subscribers", @ts_sub)
   SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)

   IF @ts_statusCode != "OK" THEN
       RaiseError(@ts_statusMsg, 0, @ts_statusCode, @errorCode)

Resubscribe : 

 SET @re_subscriber = CreateObject("ExecuteRequest")

    SET @re_lue_prop = CreateObject("APIProperty")                 
    SetObjectProperty(@re_lue_prop, "Name", "SubscriberKey")
    SetObjectProperty(@re_lue_prop, "Value", @process_subkey)
    AddObjectArrayItem(@re_subscriber, "Parameters", @re_lue_prop)

    SET @re_lue_prop = CreateObject("APIProperty")                 
    SetObjectProperty(@re_lue_prop, "Name", "ListID")
    SetObjectProperty(@re_lue_prop, "Value", @process_listid)
    AddObjectArrayItem(@re_subscriber, "Parameters", @re_lue_prop)

    SET @re_lue_prop = CreateObject("APIProperty")                 
    SetObjectProperty(@re_lue_prop, "Name", "JobID")
    SetObjectProperty(@re_lue_prop, "Value", @process_jid)
    AddObjectArrayItem(@re_subscriber, "Parameters", @re_lue_prop)

     SET @re_lue_prop = CreateObject('APIProperty')
SetObjectProperty(@re_lue_prop, 'Name', 'Status')
SetObjectProperty(@re_lue_prop, 'Value', "Active")
AddObjectArrayItem(@re_subscriber, 'Parameters', @re_lue_prop)

   SET @re_lue_statusCode = InvokeExecute(@re_subscriber, @overallStatus, @requestId)
    SET @re_Response = Row(@re_lue_statusCode, 1)
SET @re_Status = Field(@re_Response,"StatusMessage")
SET @re_Error = Field(@re_Response,"ErrorCode")
  • Is something not working, or are you asking us to test your code first? Dec 31, 2014 at 2:51
  • I updated above. resubscribing a user from the triggered email doesn't work. needs pointers.
    – Jack85
    Dec 31, 2014 at 8:49
  • 1
    How is the button made, and what is the key property that's returning the null error? Dec 31, 2014 at 12:50

1 Answer 1


Is the resubscribe landing page a custom page for this publication? If so, you can hard code the publication list id into the the code to target the publication list you would like to re-subscribe the user to. I have used the code below for something similar:

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

set @subscription = CreateObject("SubscriberList")
//process_listid from your original email
SetObjectProperty( @subscription, "ID",19121361)
SetObjectProperty( @subscription, "IDSpecified", "true" )
SetObjectProperty( @subscription, "Status", "Active" )
SetObjectProperty( @subscription, "StatusSpecified", "true" )
AddObjectArrayItem( @ll_sub, "Lists", @subscription )

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

IF @ll_statusCode != "OK" THEN
    RaiseError(@ll_statusMsg, 0, @ll_statusCode, @errorCode)

If the landing page is used for many publication lists you can pass the list id property value from the original email and then to the re-subscribe landing page when the button is clicked. You can declare the ID as a variable and use it in the SetObjectProperty. I have no idea how to pass a property from the original email off the top of my head but I know it is possible.

  • thx and it does solve part of the issue. The resubscribe LP is the custom page for the publication and Yes, the LP is used for different publications . Wonder how to pass the publication id to and from the Triggered send email to the LP ?? Should i create a new question for this? or?
    – Jack85
    Jan 4, 2015 at 14:48
  • It might be best to create a new question for passing the publication id. I did something similar once by passing a link id in the URL string and then using a requestParameter function to read the value in the landing page. I'm not sure it this would work in your case. Jan 5, 2015 at 15:33

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.