Decrypt the recipientId in the Form Code - Adobe Campaign Classic | Community
Skip to main content
Level 5
February 17, 2023
Solved

Decrypt the recipientId in the Form Code - Adobe Campaign Classic

  • February 17, 2023
  • 1 reply
  • 2060 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dipendu_g

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

 

1 reply

Tobias_Lohmann
Adobe Employee
Adobe Employee
February 17, 2023

Hi Dipendu,

you can create the web app like this:

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

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

dipendu_gAuthorAccepted solution
Level 5
February 17, 2023

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

 

Tobias_Lohmann
Adobe Employee
Adobe Employee
February 17, 2023

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.