I have a customer_data_extension that consists of customers with their customer_id.
I'm creating an email with conditional content, so IF customer exists in customer_data_extension then show this content, to find the customer I will be using customer_id. I want to know if it's possible to do this in ampscript and how? I've tried not empty and != "". The condition only works if it can find a match in the data extension, whereas I need the condition to also work when it can't find a match. Here is my working code.
<tr> <td align="center"> %%[ /* checking for customer_id */ VAR @customer_id_look_up SET @customer_id_look_up = Lookup("Customer_Data_Extension", "customer_id", "customer_id", customer_id) ]%% %%[IF @customer_id_look_up != " " THEN]%% <p class="headline">content 1 because customer_id exists in data extension=%%</p> %%[ELSE]%% <p class="headline">content 2 because the customer_id doesn't exist in the data extension</p> %%[ENDIF]%% </td> </tr>