I was curious if anyone has a good solution for this issue.
We are about to send out price change emails for various products. We want to display that new price in an email based on their ID, NOT their email address, as some emails may have multiple products.
I am trying to solution storing that data and using a custom token to display that price in the email sent to that person via their ID (either Salesforce ID or another ID already stored in Marketo)
What are the best solutions for this?
You’re looking at a Marketo Custom Object or a JSON field (Textarea field w/JSON).
In both cases you do the output using a Velocity (Email Script) token.
Which one to choose depends on how many products you’re talking about. Would be good to know more about the shape and scope of the data.
We have around 20 products, but won't be using them all for this particular example, but maybe in the future. We would want to match this on their customer ID to display the price change in an email. I have created a test Custom Object in our instance, and create a field for New Price and one for Customer ID, which I made the dedupe rule.
That makes sense, I did not make the Price field the de-dupe field, just the Customer ID, but adding Product as well makes sense. How do these tie to emails? Do I have to upload values to these fields and then use tokens to pull them in? I am familiar with how Eloqua did it, I worked in that system for over 15 years, but Marketo's option is new to me.
Digging into these deeper, once a field is approved, it seems I cannot edit it anymore. Is that by design?
I added data to the fields, tried to call it with an Email Script token in the email, and it is outputting this:
${scottSystemsPriceIncrease_cList.get(0).newPrice}
Please use the syntax highlighter when inserting code so it’s readable. I edited your post this time.
The output you’re showing is what happens if there’s no data for that person. (Velocity’s fallback when a reference is null, or certain types of errors, is to just print the original code.)
Always start by dumping the entire list:
${scottSystemsPriceIncrease_cList}
Can you show the Custom Objects tab for a person with at least one CO, and then show the Preview pane when your {{my.token}} has the above code?
And of course: