Skip navigation

Do It

1 Post authored by: aziznana786

Want to make an image dynamic for each recipient based on a field merge?


A big thank you Rob Sommers on this one! I hope this document makes it easy for others in the future. This is my first 'blog' and technical tip - a shame after 3+ years of being in Topliners!


We had a tradeshow in which a QR code was used for checking in. Our team wanted to keep the email in Eloqua and not use another tool to send the email. First thing that came to mind? ACD - but was I really going to upload 200+ QR codes and create 200+ rules for each individual in the ACD Rules? No way! Eloqua support had recommend this as well. Determined to find an easier, streamlined method I took to Topliners and Rob Sommers had the solution!


Use Cases:

- Append your URL with a SFDC Lead or Contact ID with the field merge

- Append a random or personalized string in the URL

- Dynamically display an image based on a field value (w/Images being hosted externally)


Be sure to post your use cases below!


Steps to Success

1. Create a new Field Merge

2. Upload images to an external FTP site

3. Create an Excel sheet mapping your image file names to each customer

4. Add your field merge to the email.

5. Test!


1. Create a new Field Merge

With the field you wish to use to store your image file names, create a field merge. Check out the guide here: The specified item was not found.


2. Upload Images to an external FTP Site

Upload all of the images into a folder on your FTP site -> make note of the entire URL until that directory. For this example, we will use - this is your Base URL


**Note: Make sure each file name is unique to each customer.


3. Create an Excel sheet mapping your image file names to each customer

The easiest way to get each file name is to keep all of the images in one directory. Use this guide to get the file names into a .txt file How to create a text file list of the contents of a folder. From there, copy the text over into an Excel file and map each file name to the right email customer.


See the attached file as an example. Once the file is ready, upload it into Eloqua and map it to the right field.


4. Add your field merge to the email

1. The first thing you want to do is place the field merge anywhere in the email - this will help us get the needed code for the field merge:

2. Next you want to right click the email text and hit Edit Source:

3. Once in the edit source, you will find the code for your field merge, it will look something like this: <span class="eloquaemail">QR_Code1</span>

4. Now we want to place this code into the code of your image source For this, take your base URL and append your field merge to the end - should look like this:

<img src="<span class="eloquaemail">QR_Code1</span>">

Final Step: remove the quotations around the "eloquaemail" to leave you with the code below:

<img src="<span class=eloquaemail>QR_Code1</span>">


That's it! Place the image where you need it in the email and it will look like a little square - since it's dynamically pulling it in, don't worry!

5. Test!

Simply hit the settings gear and hit 'Preview'. in the preview pane, choose a contact which you know should have the image and hit preview:

Boom there it is! and you are done! To be on the safe side and as a sanity check, randomly check a handful of contacts to make sure the image is rendering.



A similar approach of taking off the quotations can be used for simple URLs instead of an image as well.

If you have any questions please feel free to post them. Any comments or recommendations on guide would be great!

Filter Blog

By date: By tag: