I'm trying to do a lookup with multiple criteria's. The journey doesn't want to send the email, since multiple values are returned. I'm trying to solve this, by filtering the data more, to give 1 result.
In this example, I'm trying to have only the ContractEndDate 2 days prior to today, so Enddate 09/06/2018.
The different formats I see in MC:
- Import CSV: dd/mm/yyyy (09/06/2018)
- Visualizing in Data Extension: dddd d MM yyyy 0:00 (zaterdag 9 juni 2018 0:00)
- Export CSV: dd/mm/yyyy 0:00:00 (09/06/2018 0:00:00)
My idea is that I have to match the format to the export CSV. That the visualisation of the data has nothing to do with it. OR, I can adapt the way to retreive the data from the lookup, in the import CSV format and I'll define the Now() also in the same format. I don't know which one I should do, I tried both, but it's not working. This is my try, for the first scenario:
%%[
SET @PersonID = _Subscriberkey
SET @EmailAddress = Lookup("Ent.Test_B2C_Customers_ME", "EmailAddress", "PersonID", @PersonID)
SET @Language = Lookup("Ent.Test_B2C_Customers_ME", "Language", "PersonID", @PersonID)
SET @LastName = Lookup("Ent.Test_B2C_Customers_ME", "LastName", "PersonID", @PersonID)
SET @FirstName = Lookup("Ent.Test_B2C_Customers_ME", "FirstName", "PersonID", @PersonID)
SET @GSM1 = Lookup("Ent.Test_B2C_Customers_ME", "GSM1", "PersonID", @PersonID)
SET @PostalCode = Lookup("Ent.Test_B2C_Customers_ME", "PostalCode", "PersonID", @PersonID)
SET @City = Lookup("Ent.Test_B2C_Customers_ME", "City", "PersonID", @PersonID)
SET @Country = Lookup("Ent.Test_B2C_Customers_ME", "Country", "PersonID", @PersonID)
SET @ExtractDate = Format(DateAdd(Now(), -2, "D"), "dd/mm/yyyy 0:00:00")
SET @ContractID = Lookup("Ent.Test_B2C_Contracts_new_ME", "ContractID", "PersonID", @PersonID, **"ContractEndDate", @ExtractDate**)
SET @ProductNameNL = Lookup("Ent.Test_B2C_Contracts_new_ME", "ProductNameNL", "PersonID", @PersonID)
SET @URL = CONCAT('https://specificurl.asp', '?EmailAddress=', @EmailAddress, '&Language=', @Language, '&LastName=', @LastName, '&FirstName=', @FirstName, '&GSM1=', @GSM1, '&PostalCode=', @PostalCode, '&City=', @City, '&Country=', @Country, '&ContractID=', @ContractID, '&ProductNameNL=', @ProductNameNL)
]%%