2

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?

1 Answer 1

-1

Updated.

Have you maybe tried making it work with

%%before; httpget; 1 "http://URL_TO_CLOUD_PAGE"%%

and then create a Cloud Page with the InsertData AMPScript function?

2
  • I know about _messagecontext. That's not what I'm trying to do. Commented Jun 14, 2017 at 20:44
  • @AdamSpriggs Updated the answer, maybe something like what I've outlined would help?
    – Amtera
    Commented Mar 6, 2018 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .