Soft identification, sometimes called “soft login” or “soft ID”, allows identification of a contact who has arrived at a webpage via an email link. When your Engage environment is configured for soft identification, an encrypted JSON is sent in the link’s query string, which has the following form:
In this data is contained all the information needed to identify the contact and present them with a personalized web experience.When decrypted, the JSON has the following structure:
contactId: The unique ID for the contact in Engage, used for subsequent API-calls to get all relevant information about a contact
email: The contact’s email address
id: The contact’s identification key as defined in Engage (for example, “email”)
dateTime: The time and date the link was generated (V.5)
discoveryKey: The contact’s identifier for Voyado Elevate (optional)
To include the discoveryKey from Voyado Elevate, ask your Voyado team to set it up for you.
Be careful about the access a user is granted via a soft login. A soft login link is a convenient method of identification but it can also be easily shared in error, for example by a user forwarding an email containing the link to a friend.
The data is sent as a JSON with the structure shown in the example above.
2
Encrypting data
This JSON string is then encrypted using AES-256 and the shared key which both the customer and Voyado have (it was exchanged during implementation) and a unique initialization vector for each message.
3
Preparing data
The initialization vector and the encrypted string are concatenated, Base64 encoded and modified for URL inclusion (URL-safe Base64).
4
Sending data
The complete encoded string is then sent as the query-string parameter “eClub”.
The shared key used is 32 characters long, using no special characters, only a-z, A-Z, 0-9.
An example of such a key is: DaqfT7Ys6tGqM3zbesEKpmacTJEqBCp2.There are online tools available for creating keys, such as Strong Random Password Generator.
C# code example
Copy
Ask AI
public static string Decrypt(string keyString, string stringToDecrypt){ var key = Encoding.UTF8.GetBytes(keyString); stringToDecrypt = stringToDecrypt.Replace('-', '+').Replace('_', '/'); switch (stringToDecrypt.Length % 4) { case 2: stringToDecrypt += "=="; break; case 3: stringToDecrypt += "="; break; } var bytes = Convert.FromBase64String(stringToDecrypt); var iv = new byte[16]; var text = new byte[bytes.Length - 16]; Array.Copy(bytes, iv, 16); Array.Copy(bytes, 16, text, 0, text.Length); string plaintext = null; using (var aes = Aes.Create()) { aes.Padding = PaddingMode.PKCS7; aes.IV = iv; aes.Key = key; aes.Mode = CipherMode.CBC; var decryptor = aes.CreateDecryptor(aes.Key, aes.IV); using (var msDecrypt = new MemoryStream(text)) { using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)) { using (var srDecrypt = new StreamReader(csDecrypt)) { plaintext = srDecrypt.ReadToEnd(); } } } } return plaintext;}