Expand my Community achievements bar.

SOLVED

Decrypt the recipientId in the Form Code - Adobe Campaign Classic

Avatar

Level 5

Hi All,

 

  • I have a form created in ACC, whose document type is not Recipient.
  • Now we have a link in an email which calls the abobe form with a paramter  id=<%=escapeUrl(recipient.cryptedId)%> "
  • We need to retrieve the value of recipient id in our form, but since its in encrypted format, how can we do that. Is this possible using the default Adobe Encryption Method, which the form preloading activity uses, Out of Box

 

Regards,

DG

1 Accepted Solution

Avatar

Correct answer by
Level 5

Thanks Tobias,

It working....

 

But when I see the documentation for decryptString, it mentioned deprecated. Can we still use the same ?

 

https://experienceleague.adobe.com/developer/campaign-api/api/f-decryptString.html

 

Can we still go ahead and use the same ?

I am in using ACC v8, Adobe Managed

 

Regards,

DG

 

View solution in original post

4 Replies

Avatar

Employee Advisor

Hi Dipendu,

you can create the web app like this:

2023-02-17_08-39-43.png

Then add a context variable in the properties to store the decrypted recipient id:

2023-02-17_08-39-54.png

The javascript step should have something like this to decode the recipient id and store it in the context. 

encryptedRecipientId = String(request.getParameter("id"));
decryptedRecipientId = decryptString(encryptedRecipientId);
ctx.vars.recipientId = decryptedRecipientId;

Downstream you can then use the id from the ctx.vars.recipientId variable.

Cheers, Tobias

Avatar

Correct answer by
Level 5

Thanks Tobias,

It working....

 

But when I see the documentation for decryptString, it mentioned deprecated. Can we still use the same ?

 

https://experienceleague.adobe.com/developer/campaign-api/api/f-decryptString.html

 

Can we still go ahead and use the same ?

I am in using ACC v8, Adobe Managed

 

Regards,

DG

 

Avatar

Employee Advisor

The function has been declared as deprecated for a long time now and has not disappeared yet; I am still using it in multiple projects and the above code is from a v8 instance. The decryptPassword function cannot be used in web apps, so it is not an option to switch to that method.

I know this is mixed communication here , but I will try to check internally to find out more about it.