I'm running into a weird case where the claimrow function is claiming the same row for multiple users. What I am trying to do is prevent a user from receiving an email if he/she already received a coupon. In the below code, multiple users are receiving the same code. Anyone has an idea on how to change this?
%%[ var @SubscriberKey, @Email, @defaultCoupon, @claimedbefore, @rows, @rowCount set @SubscriberKey = attributevalue("SubscriberKey") set @Email = attributevalue("Email") set @rows = LookupRows("ent.vouchers","SubscriberKey", @SubscriberKey)set @defaultCoupon = "Er is geen code beschikbaar. Neem contact op met onze klantenservice." set @rowCount = rowcount(@rows)if @rowCount == 0 then if _messagecontext == "PREVIEW" then set @couponCode = "XX PREVIEWMAIL XX" else set @couponCode = ClaimRowValue("ENT.vouchers", "CouponCode", "IsClaimed", @defaultCoupon, "Email", @Email, "SubscriberKey", @SubscriberKey)endif /*function inserts email into data extention used for exclusion 2 years*/ InsertDE("ent.exclusion_list","Email", @Email,"SubscriberKey", @SubscriberKey,"CouponCode", @couponCode )elseRaiseError("User already claimed code", True)EndIf]%%’