Displaying data from a custom object in an email

LeaCharnley
Level 3

Displaying data from a custom object in an email

Hi

I'm very new to velocity scripting and I'm looking for some help. Here is my use case:

Our customers often want to know what the carbon footprint of our products will be for their particular project. We have a carbon calculator which will do the calculation for them and offer alternative. We offer to send them the data by email.

They may request more than one set of data at different times.

The email should trigger when the customer fills out the form with their name email company etc.

The velocity script will need to target the most recently added custom object for any given customer record and display all the targeted fields in the custom object in a table. The html part is no problem, but the script part is. I've read some of the developer docs, but I can't see the wood for the trees... Any help would be gratefully received.

Thanks

 

 

Lea Charnley
2 REPLIES 2
Michael_Florin
Level 10

Re: Displaying data from a custom object in an email

I think you have two options here: Find a developer to write the script token for you - or build your own knowledge piece by piece until you have a process that works. Start simple and build on top of it as you go.

 

If you prefer the latter: Start with the "Added to Custom Object" trigger in your Smart Campaign. Like this one for an Abandoned Cart object:

Michael_Florin_0-1743774076052.png

Then create a script token in your program and drag and drop the fields you need in the email into it:

Michael_Florin_2-1743774267020.png

Now Image URL, Items and Link to Cart will populate my email once the trigger fires.

 

That's the start. For COs, there's also advanced stuff like looping through objects, sorting, deconstructing JSON blocks into pieces and lots more. Sanford Whiteman will be here to help you. 🙂

 

https://experienceleague.adobe.com/en/docs/events/the-skill-exchange-recordings/marketo/feb2021/cust...

 

Ah, and also create a Postman environment where you can test adding Custom Object records to your Marketo instance.

https://theworkflowpro.com/marketo-rest-api-course/

 

LeaCharnley
Level 3

Re: Displaying data from a custom object in an email

Thanks so much @Michael_Florin! It looks like I'm massively overthinking what I need. I have a sandbox environment, so I can test there.

Lea Charnley