Hi folks,
I'm trying to send an email to a decent sized list of users with some dynamic content from a CSV inserted in a table with 3 columns. The 3 columns are the same across all the emails but the values in the rows will be different and while some users might have 1 entry I have some that have 10+ entries. I have the CSV with the users email and IDs and the data I want to inject, is there a way to do this so that each user gets only their own entires from the CSV at scale? Thanks!
Hi @MarketoQuickPMM - As per my understanding, first of all, if your data is complex and huge, you should leverage the custom object to store the data.
At a later stage, when you have the data in place, you can proceed and utilize the Velocity Script to display the data as per your requirement in different rows of the table.
Still, in case you need any further assistance, please feel free to elaborate on your questions or concerns, and I would be happy to answer them all for you.
Thanks!
@MarketoQuickPMM in the future, remember to read responses from this all-volunteer community. It’s frustrating to provide technical guidance without knowing the thread will be abandoned.
The shape of your data isn't quite clear. Are you saying you have multiple rows for some email addresses? (And what specifically do you mean by "IDs" –Marketo Lead IDs?)
Yes my list does have multiple rows for some email addresses so for example in my CSV sam@fakeemail.com might have 3 entries I want to send to them that have three fields like this:
sam@fakeemail.com - Location Name 1- Location Manager 1 - Location Description 1
sam@fakeemail.com - Location Name 2- Location Manager 2 - Location Description 2
sam@fakeemail.com - Location Name 3- Location Manager 3 - Location Description 3
Some people on the list have 1-2 entries but I have a few outliers that have 10+ entries under their name. Basically looking for a way to pull in that CSV list of data like a mail merge so every recipient only gets their entires as the end of the email. An unusual set up, but trying to do this to avoid having to manually copy and paste and send a bunch of emails. Thanks!
@MarketoQuickPMM please return to your thread and check responses.
Going forward, please use example.com as an example domain (that’s what it’s for). The domain you’re using as a dummy domain is actually a phishing site.
Fundamentally, you can‘t have multiple rows for the same email address in the same CSV. Only one of them will end up being used — the others will be overwritten. And the field can only hold one value anyway, it never automatically appends.
So you need to change the format of the CSV so all the values are in the same row. I personally would use a JSON format, but that might be out of reach unless you’re familiar with JSON. Instead, you can use an appropriate delimiter, in this case the pipe |
. Then the file would look like this:
Email,LocationName,LocationManager,LocationDescription
"sandy@example.com","1234|4567|8910","Jim|Jo|Sandy","HQ|Satellite|Temporary"
"steve@example.com","4567","Jo","Satellite"
"susan@example.com","1234|4567","Jim|Jo","HQ|Satellite"
Of course I don’t know what representative values would be for your company, but hopefully that gets the point across.
Then you use a Velocity {{my.token}} to split each field into its sub-values and output them in the email. Before we get to that, does the above format make sense to you?