+ Start a Discussion
Wil PhoWil Pho 

Merge fields not populating in Classic email template

Hi all,

I created a classic email template and have merge fields from a custom object called Order (not the native Salesforce Order object).

The following merged fields don't seem to work:

Order Name:  {!NU__Order__c.Name}
Pay NOW URL:  {!NU__Order__c.PayNowUrl__c}
Payment URL:  {!NU__Order__c.NU__PaymentUrl__c}

However, oddly enough this one works:

Balance: {!NU__Order__c.NU__Balance__c}

And this one works - {!Order.Name} -  even though we aren't using the standard Order object. 

All the above fields on the Order record are populated.  

I even tried fields on a related object (Cart):

TEST: {!NU__Cart__c.NU__PaymentUrl__c}
TEST: {!NU__Cart__c.PayNowUrl__c}

Thanks in advance for any help. Looking through some help docs but have not found any solution yet.

ShirishaShirisha (Salesforce Developers) 
Hi Wil,


The way of merging the field is correct and you should be able to see the data.Can you please double check,if you have values on all of their fields and has read access as well.

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Shirisha Pathuri
Wil PhoWil Pho
Hi Shirisha,

Apparently, the managed package that we use has a custom object called ORDER which is the same as the standard ORDER object. As such, this customer Order object is not available to be used with merge fields in Classic Email Templates. At least this is according to a forum post that I read. All other merge fields work for other custom objects, but not for this one for the reason stated above. Trying to find a workaround.

Danielle RhoadesDanielle Rhoades
Since you got some of the merge fields to work it seems like this might not be applicable, but just in case it helps you or someone else trying to get this to work, I just found this Knowledge Article while fighting with my own version of this Cross-object Merge Fields Do Not Work in Email Templates (https://help.salesforce.com/s/articleView?id=000324867&type=1)

I don't really want to use their work around and clutter up my Case object with otherwise unnecessary fields, but perhaps for some this would be a valid option.