0

How can i implement Ampscript once email was sent on a Subscriber? Say field from DE named Status from No to Yes once email was sent to subscriber is this possible? Any example, thanks in advance.

1
  • Once email is gone, you cannot do anything about it
    – Maneesh
    Commented Jun 9, 2017 at 10:42

2 Answers 2

1

You can do it using a %%_messagecontext%% personalization string and use UpsertDE(1,2,3,4,5,6) function

paramters:

1 -> Name of data extension from which to update specified row

2 -> Number of filter columns to insert or update

3 -> Column name used to build the WHERE clause

4 -> Value used to build the WHERE clause

5 -> Column name used to build the INSERT clause

6 -> Value used to build the INSERT clause

%%[
if _messagecontext == "SEND" then
  UpsertDE("SendDE",1,"SubscriberKey",_SubscriberKey,"status","yes")
else
  UpsertDE("SendDE",1,"SubscriberKey",_SubscriberKey,"status","no")
endif
]%%

you have put this sample of code in your email and then send it to your subscribers

1
  • you are welcome, Please upvote the answer so others can also check it. @MarkDacillo
    – Abhishek
    Commented Jun 13, 2017 at 7:02
0

You could add the function UpdateDE in the Template email; in this way after the email sending, AMPscript will update one or more Data Extension fields (Status (Y/N) and Date Sent).

You must log in to answer this question.

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