I am trying to limit my email send to 1000 users in the last 24 hours means if my email has been sent 1000 times or 1000 users in single day then it should not do any further send.
To implement this, I have tried below solution:
Storing the count and time in Data Extension for each send to subscriber.
Lookup in this DE and check the time and count during next send.
Once the count is 1000, stops the send using raise error function.
But the issue here is the LOGIC for time calculation is not working and it takes 5 second for email to load for each insert during send.
EMAIL CODE LOGIC SOMETHING LIKE THIS
Var @count, @sendtime
set @count = DataExtensionRowCount(SentCountDE)
if @count < 1000 then
set @send = "true"
insertDE("SentCountDE","count","1")
else
@send = "false"
end if
if (@send == "false") then
raise error ("count exceeded 1000 for today")
endif.
- I also tried with sent views, but it gives 6-month data. Also, it cannot work in email code as query cannot be used inside HTML Email code.
Please let us know if there is an efficient way to achieve this. Any global variable or any personalized string in marketing cloud that can help to limit the send to 1000 users in single day.
Thanks in advance.