I have two data extensions:
- Data extension 1:
API_Onboarding_OnlineMembershipshas the following column:
SUBS_START_DATE(this DE gets the emails)
- Data extension 2:
Customershas the following column:
Here's the amp script I've updated in the email:
%%[ SET @SUBS_START_DATE = Lookup("API_Onboarding_OnlineMemberships","SUBS_START_DATE","CUSTOMER_INTERNAL_NS_ID", @CUSTOMER_INTERNAL_NS_ID) SET @DATE_OF_FIRST_SUB_AEST = Lookup("Customers","DATE_OF_FIRST_SUB_AEST","CUSTOMER_INTERNAL_NS_ID", @CUSTOMER_INTERNAL_NS_ID) IF @SUBS_START_DATE > @DATE_OF_FIRST_SUB_AEST THEN SET @output = "Welcome Back" ELSE SET @output = "Welcome" ENDIF ]%% %%=v(@output)=%%
It should show 'Welcome Back' if @Subs_Start_Date is today and the @Date_of_first_sub_aest is yesterday...
@CUSTOMER_INTERNAL_NS_ID is the Subscriber key for both data extensions, but not necessarily the primary key for both.