Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Accessing a recipient in a typology rule

Avatar

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
ayats67229299
Level 2

15-05-2019

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?

Replies

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

15-05-2019

Hi,

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.

Thanks,

-Jon

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

15-05-2019

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)).
http://docs.campaign.adobe.com/doc/AC/en/jsapi/f-escapeUrl.html?hl=escapeurl

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.

Regards.
J-Serge

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

15-05-2019

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.

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

15-05-2019

Hi,

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.

Formula:

20190515-1117-screenshot-1.jpg

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

20190515-1434-screenshot-5.jpg

Regards

Florian

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

15-05-2019

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

Avatar

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
ayats67229299
Level 2

15-05-2019

Hi Jon,

Thank you very much for this insight.

Kind regards,

Ayat

Avatar

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
ayats67229299
Level 2

15-05-2019

Hi Jean-Serge,

Great insight, thank you.

Kind regards,

Ayat

Avatar

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
ayats67229299
Level 2

Likes

5 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
ayats67229299
Level 2

15-05-2019

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,

Ayat