Hi Guys,
Apologies in advance if has been discussed previously but I wasn't able to find other related threads or discussions.
We found our last week that we are limited to the row of custom object data that we could use as part of our email (via a foreach loop).
This was only made apparently after feedbacks from live email sent, as the test and preview of the email all looks fine.
Our email consist of a section that list/loop through data within a Custom Object table, matching on the contact's email address. In some cases, there would be more than 10 records for the same user (1:Many, based on email and product).
Our use case is to personalise the email with products purchased by the contact. But with the limit of only being able to display up to 10 records from the Custom Object poses an issue for us.
The weird thing is that our test emails, and the view online link of live emails seems to work fine and displays more than 10 custom object records.
I'm just wondering if anyone else have experience this personalisation limitation and if there is a work-around solution available to handle this use case?
Thanks
Aaron
Solved! Go to Solution.
I guess the other only option that I can think of is to extend the core table with the required fields and flatten the data for personalisation.
Yes, that's the only way. Was just working w/a client where we're doing exactly this today, concatenating string fields from a related object — of which there could be hundreds — into a textarea (long).
Our email consist of a section that list/loop through data within a Custom Object table, matching on the contact's email address. In some cases, there would be more than 10 records for the same user (1:Many, based on email and product).
Our use case is to personalise the email with products purchased by the contact. But with the limit of only being able to display up to 10 records from the Custom Object poses an issue for us.
Yes, this is a known restriction. Are you using a Trigger SC or Batch SC?
Hi Sanford,
Thanks for the reply. The email is a batch send and only on ad-hoc bases.
I guess the other only option that I can think of is to extend the core table with the required fields and flatten the data for personalisation. But this would definitely make the table really wide.
Just curious if there is a work around even though it is a limitation and how others have dealt with similar use case.
Thanks
Aaron
I guess the other only option that I can think of is to extend the core table with the required fields and flatten the data for personalisation.
Yes, that's the only way. Was just working w/a client where we're doing exactly this today, concatenating string fields from a related object — of which there could be hundreds — into a textarea (long).
Thanks again for the feedback Sanford.
By the sound of your solution, you concatenated multi-value into a single long text field rather than separated into individual fields?
If the data is a long concatenated string, I'm guessing your some sort of array Velocity script to loop through concatenated string?
Apologies, still learning Velocity scripting and its still not my forte 🙂
If the data is a long concatenated string, I'm guessing your some sort of array Velocity script to loop through concatenated string?
Yes, split the string on a delimiter, comma in this particular case.
Something along the line of this -
#foreach( $stringList in $product.productId.split("[|]") )
Not sure about the name $stringList (are the substrings of the pipe-delimited String themselves lists?) but yes.
Thanks again Sanford, will give it a go and see how it works 👍