I have a birthday journey, where the entry source is a DE from Salesforce that is overwritten every day to include only those who have their birthday coming up 6 weeks from that day.
The first email encourages a person to play a birthday game to win a discount code. Then I have a decision split that looks at the contact data in Salesforce to see if the person has played the game or not. In Salesforce, I have created a text field for the code in the contact object (Birthday_Prize_Code__c) and this field is synced to Marketing Cloud. I also have this field in the DE that works as the entry source in the journey, but that field is not populated in the beginning of the journey - only after they played the game using the link in the first email of the journey.
If the person has played the game, they will receive an email that reminds to use the code and I want to embed their own personal code from contact data, which they won in the game, into the email. But personalization strings in journey builder use journey data, and of course they didn't have the code at the time when the journey started.
So how can I personalize the email in journey builder using contact data, not journey data? Do I have to use AMPScript for this? If so, what would be the AMPScript code to retrieve and embed this piece of up-to-date data from the Birthday_Prize_Code__c field in Salesforce person account?