I'm wanting to insert a row in a Data Extension (DE) exactly once per email send using AMPScript -- without using a lookup.
The best I've been able to do is limit the upserts to the first Batch ID using the
_JobSubscriberBatchID personalization string.
In analyzing tracking data, I've noticed that all non-triggered send jobs are separated into batches and numbered sequentially starting at
1. The batch sizes range from 50 to 500 emails. So at most this operation would be done 500 times.
%%[ if _JobSubscriberBatchID == 1 then /* upsertDE() function goes here */ endif ]%%
Anyone have a better way to go about this?