Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
2 years, 11 months ago
I have an ampscript with
CreateSalesforceObject code, this code creates a record on service cloud for every email sent by marketing cloud.
My question is, can someone clarify the trigger point of ampscript, will the ampscript trigger everytime the user opens the email?
Jun 9, 2020 at 7:34
AMPscript is evaluated on the server side at send-time. So it is evaluated for every preview of the email as well as every email sendout. Opens don't re-process AMPscript.
The system processes the script at the point where you include it in the message to render content on a subscriber-by-subscriber basis. The Marketing Cloud application handles all AMPscript calls at the end of the email send.
(Source: Introduction to Programmatic Marketing Content)
If you need to exclude Test sends, you can retrieve the context of the message and don't execute the CreateSalesforceObject-call for tests.
IF (_messagecontext != "PREVIEW" AND _isTestSend != true) THEN
Jun 9, 2020 at 7:43
log in to answer this question.
Not the answer you're looking for? Browse other questions tagged
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only