Hi StakeExchange community, it's my first post in this community, I hope for your help and kindness.
I'm having difficulty with personalisation string in Email Studio. There is a custom field in the Lead object named CustomField_c that I wanted to inserted in a Journey Builder Email with Salesforce Data Event as the source
Method 1: Ampscript lookup function
set @SubscriberKey = AttributeValue("_subscriberkey")
set @CustomField = Lookup("Lead_Salesforce","CustomField__c","_ContactKey", @SubscriberKey)
Method 2: I called it direct code, not sure how to call it
%%Lead:CustomField__c%%
Method 2 worked well in practice but I always got Personalization error: %%lead:CustomField__c%% when preview email even though I chose the correct subscriber. Method 1 worked well with email preview and test, but in practice, there is a delay that resulted in the personalisation string is populated after the email was sent. As a consequence, the string sent to customer was blank, but it will populate a few minute when clicked to view on the web browser.
This email is a transactional message and should be sent asap hence I prefer not to add a delay time to method 1. Do you have any suggestion for best practice in this case?
Thank you very much and looking forward to hearing from you