Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

Unsub link Personalisation

Avatar

Level 2

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

Winston_2022_0-1737030735295.png

Winston_2022_1-1737030780881.png

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

Any feedback is welcome.

Cheers.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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}}

 

View solution in original post

6 Replies

Avatar

Level 1

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.

Avatar

Level 2

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

Avatar

Employee

@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 

vraghav_0-1737324310067.png

and it contains the same formula

vraghav_1-1737324344877.png

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

vraghav_2-1737324420421.png

vraghav_3-1737324453666.png

 

Avatar

Level 2

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. 

Avatar

Correct answer by
Level 2

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}}

 

Avatar

Administrator

Thanks, @Winston_2022, for taking the time to share your update and solution with the community!



Sukrity Wadhwa