Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

Accessing a recipient in a typology rule


Level 2

At the moment, we have a typology rules (type: control) which rewrites all the URL's and adds some url parameters to it. This is done in javascript

As an improvement, we wish to add a hashed customer number as a url parameter to the URL.

Therefor I need to access the recipient.cryptedAccountId but I don't know how to acces a recipient in my javascript of a typology control rule.

Can someone provide a solution on how to add the cryptedAccountId to each URL?

8 Replies


Community Advisor


Try the documented jsapi cryptString() function on account id, add cryptedAccountId to all your personalization, or batch select cryptedAccountId's in the script (expensive).

NB there are several undocumented encryption functions so cryptString() may not match the computed col's xtk AESEncrypt() call.

Another avenue is to alter tracking calculation click formula instead of writing a control typology here, if possible for your use case.




Level 10

Hi Ayats,

In addition of what Jon wodnicki​ mentions, you must also escape the result for URL compliance.

if you are in ISO8859P* charset (Latin1, etc) please use the Adobe Campaign API Javascript escapeUrl(cryptString(recipient.@id)) or escapeUrl(recipient.@cryptedId)).

If you are in utf8 environment, you must use encodeURIComponent() standard Javascript function to escape special characters.

As said by Jon, using Javascript memory intensive calculations is not ideal at all at the step of delivering, please take care and think about other solution.



Community Advisor

Oh I meant selecting the data in the control typology is expensive, since it's n / batch-size lookups added per delivery.

That was meant to be written as 3 options in descending order of overhead.


Level 6


We manages to add the Recipient Id field using the formula of the Web analytics External Account. It's not a typology rule, but it works well to add any recipient field on any url.



Demo, we land on this URL when we click on a link in the email:





Community Advisor

Right, that's tracking calculation click formula plus extra analytics params.


Level 2

Hello Florian,

Thank you for your reply.

I will propose this solution as well as the previous one (JSAPI) to our team.

Good job.

Kind regards,