I have an issue with the ClaimRow() function added to an email part of a journey running from a Data Extension entry with 150 contacts. Each contact supposed to receive a unique URL pulled from DE with 150 unique URLs but instead only 3 promo links were assigned to 3 contacts. Does anyone have experiences something like this when using the function for a batch send or DE sends?
Here is the scenario:
The journey has a simple DE entry with 150 contacts imported manually and was activated to run once at specific date/time then sending a simple email.
During the QA before the send, I ran multiple tests of a single sends and the ClaimRow function was working as expecting and clamming the next available row each time I call it.
I've been using this function in another journey which trigger based on SF data not on a batch send (DE entry) and I don't have any issue. I've checked the email tracking data to investigate further and I noticed that few of the contacts that clicked on the CTA received the same URL instead of unique as I was expecting. When I looked into the DE contacting the URLs, I saw that only 3 rows were claimed which looks to me that the very first emails that were send by MC were captured and received unique URL and the rest received duplicates of those same 3 URLs already claimed.
I ran additional test to replicate the journey with 10 test contacts and DE with 10 unique URLs and upon sending this is exactly what happened as I mentioned above. I received 10 emails with only 2 unique URLs assigned and I saw that only 2 rows were claimed from the ClaimRow DE.
I feel that using this function with a batch send caused some sort of error of confusion and only the very first 2-3 contacts received unique promo url.
Here is example of the code I used:
%%[
/* Check for available URLs in Data Extention 'Redeem_URLs' */
var @rows, @rowCount
SET @Rows = LookupRows("Redeem_URLs", "IsClaimed", "False")
SET @RowCount = rowcount(@rows)
IF RowCount(@Rows) >0
THEN
]%%
%%[
/* Redeem URL and update the DE */
var @ContactKey, @RedeemURL, @ClaimedDate
set @ContactKey = AttributeValue("ContactID")
if (not empty (@ContactKey)) THEN
set @RedeemURL = Lookup("Redeem_URLs", "RedeemURL", "IsClaimed", "false") /* Retrieve the next available URL */
set @ClaimedDate = Now(1)
UpdateDE("Redeem_URLs", 1, "RedeemURL", @RedeemURL, "IsClaimed", "true", "ContactKey", @ContactKey, "ClaimedDate", @ClaimedDate) /* Claimed URL will be updated with ContactID and Date */
]%%
Reedem URL: %%=RedirectTo(@RedeemURL)=%%
The AMPscript was added in the beginning of the HTML template and the output inserted into CTA block and also hyperlink (inserted in two places inside the HTML). Here is example of the html codes with the variable:
Email CTA:
<tr>
<td align="center" valign="middle" class="mcnButtonContent" style="font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px; padding: 12px;">
<a class="mcnButton " title="CLAIM YOUR MEMBERSHIP" href="%%=RedirectTo(@RedeemURL)=%%" target="_blank" style="font-weight: normal;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #222222;">CLAIM YOUR MEMBERSHIP</a>
</td>
</tr>
Email Text URL:
<strong>As part of your membership, we will now fund a <a href="https://www.youtube.com/watch?v=xxxxxx" target="_blank">rewilding membership with XXX</a> on your behalf. <a href="%%=RedirectTo(@RedeemURL)=%%" target="_blank"><u>All you have to do is claim your profile</u></a>.</strong><br>
Example of the Coupon DE: