QuestionQ83

Scripting and Automation

A developer needs to personalize a welcome email using the recipient’s first name from the Customers data extension, which differs from the targeted sending data extension named NewSubscribers. Both data extensions store the unique identifier in a field called CustomerKey.

Which AMPscript syntax would populate the first-name personalization as requested?

  • A %%=Lookup(‘Customers’, ‘FirstName’, ‘ContactID’, CustomerKey)=%%
  • B %%=Lookup(‘Customers’, ‘FirstName’, ‘CustomerKey’, ‘CustomerKey’)=%%
  • C %%=Lookup(‘Customers’, ‘FirstName’, ‘CustomerKey’, CustomerKey)=%%
Explanation

The AMPscript Lookup() function takes the data extension, return column, search column, and search value in that order. Looking up FirstName in Customers where CustomerKey equals the unquoted CustomerKey send-context attribute retrieves the recipient’s corresponding first name.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!