I am creating a journey for which the entry event is a salesforce data event on a contact object. But I have to use child object field data in the mail to personalize the mail.
For example
Parent object: Contact
Fields: Firstname, Lastname, Email, ContactId
Child object: Team
Fields: TeamId, TeamName, ContactId(lookup)
So how I can use the Team object data in the mail while journey's entry event is salesforce data on contact object?
I tried with ampscript following this article: Personalize email using standard object
I have used the similar code mentioned in the link given above.But I am getting these errors.
Error 1: Script SET Statement Invalid An error occurred when attempting to resolve a script expression. See inner exception for detail. Script Expression: SObject
Error 2: Script SET Statement Invalid An error occurred when attempting to resolve a script expression. See inner exception for detail. Script Expression: RecordId MemberID: JobID: 0 An unrecognized expression appears in a script block. Script Expression: RecordId. Invalid Content: Set @TeamRecordId = RecordId There is an error in your email. Please contact your customer service representative.
Error 3: Script SET Statement Invalid An error occurred when attempting to resolve a script expression. See inner exception for detail. Script Expression: RetrieveSalesforceObjects(SObject,'TeamName,TeamId','Id', '=', RecordId) The specified attribute or custom object field name was not found for this client.