Skip to main content
Winston_2022
Level 2
Jan 16, 2025 12:36 PM UTC
Solved

Unsub link Personalisation

Hello,

Hope someone can assist.

I'm trying to create an unsubscribe link in the email template in AJO. I'm getting a syntax error when trying to access the below field

What would be the proper syntax to access the value in consents.marketing.email.subscriptions.TestListWL.topics.0?

Any feedback is welcome.

Cheers.

Winston_2022
Winston_2022Accepted solution
Level 2
Apr 4, 2025 12:25 AM UTC

Managed to solve it with the below. 

{% let subtopics = head(get(profile.consents.marketing.email.subscriptions, "xxxx").topics) %} {% let subtype = get(profile.consents.marketing.email.subscriptions, "xxxx").type %} https://www.test.com/subscribe-to-newsletters/unsubscribe?type={{subtopics}}&emailsubscription={{subtype}}

 

6 replies

Jan 17, 2025 4:12 AM UTC

Hi @winston_2022 , may be that attribute is not enabled yet, you can navigate to configurations option under administration menu and enable the attribute in the data source. 

If this is already done, there could be other reason for the issue.

Translate
Winston_2022
Level 2
Jan 19, 2025 10:55 PM UTC

Thank you for the response. Data source settings are as expected. I don't believe that's what's causing the error.

Translate
vraghav
Adobe Employee
Adobe Employee
Jan 19, 2025 10:07 PM UTC

@winston_2022 I got it to work inside the subject line and also anywhere inside the email body using this formula

{%= head(profile.consents.marketing.email.subscriptions.get("Newsletter").topics)

However, there is something with the URL personalisation piece as it is not allowing me to use the helper functions.

 

I've even tried using an expression fragment 

and it contains the same formula

but when I use it inside the URL, while the UI accepts it, I do get an error on the delivery

 

Translate
Winston_2022
Level 2
Jan 19, 2025 10:52 PM UTC

Hi, Thank you for the response. It's the same behviour for me. Whilst the syntax appears to be vaild. However the output is an error. 

Translate