Expand my Community achievements bar.

SOLVED

How to handle link parameters within a Webapp?

Avatar

Level 1

We are attempting to implement the one-click unsubscribe webapp and have the baseline implementation running. However, we are trying to include at least one additional parameter to the generated link injected into email headers via typology rule. In particular, we want to get a handle on the email delivery that generated the unsubscribe request, and have added it to the url. It is unclear how to access any parameter beyond the ctx object that is generated by default and includes the encrypted and unencrypted recipient id parameters. I've gone through the available Webapp documentation and searched Experience League, but I have not found any hints.

 

Here is an example of the injected url:

var headerUnsubUrl = "https://xyz.campaign.adobe.com/webApp/unsubNoClick?id=<%= recipient.cryptedId %>&id2=<%= delivery.id %>";

 

Link to the relative process documentation:

https://experienceleague.adobe.com/en/docs/deliverability-learn/deliverability-best-practice-guide/a...

 

Appreciate any help available!

 

Thank you,

Ryan

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Ryan_Bard  To access a custom parameter you will have to first define it and then save it in a variable.

 

Step1. Create  variable to save it. Open the Web app properties and add a variable in variables tab.

_Manoj_Kumar__0-1721354868601.png

 

Step2. Get the information from parameter and save it in variable

_Manoj_Kumar__1-1721354921838.png

 

 

Now id2 parameter can be accessed in web app via this code

<%= ctx.vars.id2 %>

     Manoj
     Find me on LinkedIn

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @Ryan_Bard  To access a custom parameter you will have to first define it and then save it in a variable.

 

Step1. Create  variable to save it. Open the Web app properties and add a variable in variables tab.

_Manoj_Kumar__0-1721354868601.png

 

Step2. Get the information from parameter and save it in variable

_Manoj_Kumar__1-1721354921838.png

 

 

Now id2 parameter can be accessed in web app via this code

<%= ctx.vars.id2 %>

     Manoj
     Find me on LinkedIn

Avatar

Level 1

Thank you so much, Manoj! That was a great help and worked to get me past that particular issue.