SOLVED

Custom object fields to be used as Token

Go to solution
neelambakre
Level 3

Custom object fields to be used as Token

Hi,

 

Hope you are doing great.

 

Can we use custom object fields in token and then can be used in emailer for personalization ? If so, please guide.

 

Thanks in advance.

 

Regards,

Neelam B.

 

 

Neelam Bakre
1 ACCEPTED SOLUTION

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom object fields to be used as Token

Yes, you can use Marketo custom object data in the email using the email script token. Create a custom email script token at an apt place (program/campaign folder) so the email can reference it >> Under the Custom Object section in the object tree on the right of the email script token editor, select the apt. fields >> Once you have your script ready with the additional logic to display the correct CO data save it, add the custom my token in the email, and test. Make sure to sort you sort the custom object list before you use it in the script token so you always pick the correct custom object record if multiple CO records are associated with a person record. Check out Sandy's article on sorting objects and lists in velocity here.

 

View solution in original post

5 REPLIES 5
Beth_Massura
Level 8 - Champion Alumni

Re: Custom object fields to be used as Token

Hi Neelam,

 

Because there is a one-to-many relationship between the person record and custom object records, it isn't possible to use a regular token (similar to {{lead.first name}} or {{my.event name}}) to populate the custom object data in an email. However, you can use Velocity script to accomplish this. Here's a community post that discusses this approach: How to reference Custom Objects in Velocity Script

 

Cheers,

Beth Massura

2022 Adobe Marketo Engage Champion

neelambakre
Level 3

Re: Custom object fields to be used as Token

@Beth_Massura 

 

Thank you. 

Neelam Bakre
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom object fields to be used as Token

Yes, you can use Marketo custom object data in the email using the email script token. Create a custom email script token at an apt place (program/campaign folder) so the email can reference it >> Under the Custom Object section in the object tree on the right of the email script token editor, select the apt. fields >> Once you have your script ready with the additional logic to display the correct CO data save it, add the custom my token in the email, and test. Make sure to sort you sort the custom object list before you use it in the script token so you always pick the correct custom object record if multiple CO records are associated with a person record. Check out Sandy's article on sorting objects and lists in velocity here.

 

Chris_Willis1
Level 8 - Champion

Re: Custom object fields to be used as Token

neelambakre
Level 3

Re: Custom object fields to be used as Token

@Darshil_Shah1 

 

Thank you. 

Neelam Bakre