Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!

Implementing one-click list unsubscribe without sending subscribers to the denylist

Avatar

Level 1

Hello,

 

Adobe Support have provided us with a web-app that will enable one-click list unsubscribe for our emails. However they told us that this function will send unsubscribers to the denylist. This process is not ideal because they are removed from emails for all divisions and products within our business, and these individuals cannot re-subscribe through our own permissions centre.

 

Adobe Support have said that if we want the function to unsubscribe individuals from the relevant division/product, 'you will have to modify the JS inside the above webapp accordingly'. We were not given any details of what sort of changes would be necessary, so can anyone shed any light on this? Would it be an entirely new web-app needed? Or can the existing out-of-the-box function be amended to fulfil this use case?

 

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

13 Replies

Avatar

Community Advisor

Hello @Jackbayer13 ,

 

I believe you are referring to the one-click unsubscribe feature required for Google and Yahoo emails starting from June 1st.

For this, you need the Post API to unsubscribe silently when someone clicks on the unsubscribe link in real-time.

I have built the JSSP API for one client. This is a custom JSSP API.

In this API, we pass the hashed customer ID and consent type.

For example: https://demo.adobe.campaign/cus/unsubscribe.jssp?hasCusId=fsfsfsafsfwere&consentType="MarketingType1"

There, you can pass different consentType values for different divisions or products. I believe you have different custom subscribe fields for different products or divisions.

If you just pass the consentField value and customer ID, it automatically updates that field.

You don't need to change this JS for different products or divisions.

 

Regards,

Parvesh

 

Avatar

Level 1

Hi Parvesh,

Are you able to call the JSSP using post call?

 

I've tried WebApp , JSSP but the code on JSSP or webapp never executes.

When i remove mailTo from Header then i don't see unsub link in Gmail.

 

Is it possible to paste our JSSP code here ?

 

My guess is that POST call is not at all working

-Vedant

Avatar

Level 4

Hi @VedantVyas ,
The WebApp code is working fine as when you call it using or providing the "CryptedId" for the recipient in the One-Click Unsub URL.
The JSSP logic will not work perfectly in case of One-Click List Unsubscribe as JSSP supports both POST & GET Call wherease for One-Click we need to have POST calls only, so the OOTB provided webapp package is the original solution for implementing One-Clck feature.

 

Further, Unsubsribe link is visible when you are having a Good IP repo for your domain and if you are trying sending the same test mails then delete the previous sent ones from Trash & SPam folder for the unsub link to get visible in the next test mail.

 

Hope that helps.

Avatar

Level 1

Thanks Rahul,

How do i test if the webapp is being called?

I tried logInfo but there are no logs.
Also, if you have a sample altered webApp code , please paste here , if possible
Best

Vedant

Avatar

Level 4

Hi @VedantVyas,

The cryptedId being passed in the unsub url is being used and called upon in the webapp only and further you can check the source code of the gmail via "Show Original" option in gmail to see the webapp link being generated along with the cryped id field.
Further as mentioned once clicking on unsub link for a user, if the blacklist flag value for that user is udpated to "Y" in the recipient schema shows the successful working of the webapp.

Thanks

Avatar

Level 1

Thanks @rahulkad29786 

I've tried following

  1. Adding only webapp in SMTP - unsub link is not visible
  2. Adding first webApp and them mail to  - unsub link is not visible
  3. Adding mailto first and then webApp - unsub link is visible and recipient is blacklisted but webApp is never called.

Apart from show original you can also see the unsub url if you expand the To section in GMAIL.

 

To me it seems that post method with webApp is not working not sure how its working for you guys without using mailto

Are you sure it's working only with web app in AMTP header?

Best

Vedant

Avatar

Level 4

Hi @VedantVyas ,

Please use the webapp code logic in a new typology rule then add it in a typology and then use that typology in your email, it will work then.

Adding it in SMTP header doesn't work sometimes as I observed.

 

Let me know

Thanks

Avatar

Level 1

Hi Parvesh,

 

Is it working using only jssp? without mailto?

 

if yes, can you post your jssp code

 

Best

Vedant

 

Avatar

Level 1

This is the script in the web-app that Adobe Support provided:

 

if (NL.isEmpty(ctx.@secret))
logError("invalid secret...");
var secret = decryptString(ctx.@secret);
if (NL.isEmpty(secret))
logError("invalid secret...");
this.secret = JSON.parse(secret);
if (NL.isEmpty(this.secret))
logError("invalid secret...");

if (this.secret.method != ctx.@_method ||
this.secret.identifier != ctx.@_identifier ||
this.secret.key != ctx.recipient.@_key ) {
logError("invalid secret...");
}

if( String(ctx.recipient.@id) != decryptString(this.secret.identifier) )
logError("The webApp inputs are corrupted.");

// remove descenants @_key to protecte against sql injection
var descendantNode = ctx.recipient.descendants();
for (var i = 0; i < descendantNode.length(); i++) {
delete descendantNode[i].@_key;
delete descendantNode[i].@_operation;
}

nms.subscription.Unsubscribe(ctx.vars.service, ctx.recipient)

Avatar

Level 4

Hi @Jackbayer13 ,
You can refer to the provided documentation at below link:-
https://experienceleague.adobe.com/en/docs/deliverability-learn/deliverability-best-practice-guide/a...

Here u will get that Webapp package which you can import & install in ur environment.

Hope that helps.

Thanks

Avatar

Level 1

I think this is the web-app that was provided to us by Adobe Support. My question is can this web-app be amended to prevent unsubscribers being added to the blanket denylist.

Avatar

Level 4

Hi @Jackbayer13 ,
Yes, the script can be altered,as there is the Unsubscribe method being called upon in the script which is further being defined in standalone JS code. This method can be overwritten for further customisations.4

 

Thanks