Calculate new Recipient field and use it into Deliveries
Couple of days ago users came to me and asked if I could help them with an interesting case. Days passed, and I still don't have any idea. ![]()
I need Adobe Campaign to allow users to insert Tokens into personalized links inside Deliveries (emails for now). Token is a value generated by JavaScript code developed in our company, this code requires our internal Id of the customer as an input, and this id is already stored into our Adobe Campaign DB.
By the way, part of this code implements AES encryption with CBC mode and padding, I would love to use AC internal functions for that, but AC doesn't support controlled AES encryption, DES only.
And here comes the question: I have JavaScript code inside Adobe Campaign and I have all required data in Adobe Campaign. How to send an email?
1. I can create new attribute for nms:recipient to store Token. But then I'll have to run JavaScript code against my entire DB and will have to re-run it for all new customers. Or I can spend and unknown amount of time to translate Token generation code from JavaScript to e.g. PostgreSQL function and run it against my DB. Both options can lead to unknown risks with unknown chance of success.
2. (What I thought must be a solution, but...) I can use a combination of Personalization Block, and nms:recipient properties available as Personalization Fields. This one failed because I can't use loadLibrary() inside Personalization Block or Delivery. They both use JavaScript engine to compile personalization, but seems like it's a different engine with no access to AC API/DB (I'm wondering how AC passes personalization into email?).
3. I can't use Typology Rule (Control) for this, because even at the end of analysis Delivery contains <%= recipient.email %> but not exact email. (Is MTA actually is the place where all <%= %> blocks execute?)
What else can I try here?
I'm summoning you, guys! (: