I have created an email with SFMK with coupons.
This is:
%%[
var @couponRow, @couponCode ,
set @email = AttributeValue("Email Address")
set @FirstName = AttributeValue("First Name")
set @LastName = AttributeValue("Last Name")
set @AssetNumber = AttributeValue("Asset Number")
set @couponRow = ClaimRow('Data_Extension_Code','IsClaimed', 'Email Address', @email, 'First Name', @FirstName, 'Last Name', @LastName, 'Asset Number', @AssetNumber)
if empty(@couponRow) then
RaiseError('No coupons available', false)
else
SET @couponCode = Field(@couponRow,'CouponCode')
endif
]%%
But I need that if there are no coupons available that the coupon is not shown, how can I do it.
Because all costumers receive that email but not all have a coupon.
Thanks.