Last updated: May 2026
MCE-Dev-201 — Salesforce Certified Marketing Cloud Engagement Developer
Test your knowledge with official exam-style questions
Questions and options are shuffled each attempt
▶Salesforce Certified Marketing Cloud Engagement Developer — Practice Set 1: All Questions & Explanations
Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.
1. In AMPscript, what is the purpose of the VAR and SET keywords?
- A. VAR declares one or more AMPscript variables; SET assigns a value to a declared variable(correct)
- B. VAR is used in loops; SET defines loop termination conditions
- C. VAR retrieves a subscriber attribute; SET updates it
- D. VAR and SET are interchangeable keywords in AMPscript
Explanation: In AMPscript, variables must be declared before use. VAR @variableName (or VAR @var1, @var2) declares the variable(s). SET @variableName = value assigns a value — this can be a literal string/number, a function result, or another variable. Variable names are always prefixed with @ in AMPscript.
2. What does the following AMPscript return: `%%[OUTPUT(CONCAT('Hello, ', @FirstName, '!'))]%%` when @FirstName = 'Maria'?
- A. Hello, @FirstName!
- B. Hello, Maria!(correct)
- C. CONCAT('Hello, ', @FirstName, '!')
- D. An error — OUTPUT cannot wrap CONCAT
Explanation: CONCAT() concatenates strings and returns a single string. OUTPUT() renders the result to the page/email. With @FirstName = 'Maria', CONCAT('Hello, ', 'Maria', '!') produces 'Hello, Maria!', and OUTPUT() displays it inline. The %%[ ]%% block executes AMPscript logic; the result replaces the block in the rendered HTML.
3. A developer uses LOOKUP('ProductDE', 'ProductName', 'ProductID', '12345') in an email. The ProductID '12345' does not exist in ProductDE. What does LOOKUP() return?
- A. An empty string (null)(correct)
- B. An error that breaks the email rendering
- C. The string 'NULL'
- D. The first row of ProductDE
Explanation: LOOKUP() returns an empty string (effectively null) when no matching row is found. It does not throw an error. Developers must use EMPTY(@result) or ISNULL(@result) to check whether a value was returned before rendering it, to avoid displaying blank content to subscribers.
4. A developer needs to retrieve all rows from a PurchaseHistory Data Extension where SubscriberKey matches the current subscriber, then loop through them and display each product name. Which two AMPscript functions are required? (Choose 2)
- A. LOOKUPROWS() to retrieve a RowSet of matching rows(correct)
- B. FIELD() to extract a specific column value from each row in the loop(correct)
- C. LOOKUP() to retrieve each row individually
- D. ROWCOUNT() to extract column values
Explanation: LOOKUPROWS(DE, Column, Value) returns a RowSet (all matching rows). A FOR loop iterates over the RowSet using FOR @i = 1 TO ROWCOUNT(@rows) DO ... NEXT @i. Inside the loop, FIELD(ROW(@rows, @i), 'ProductName') extracts the ProductName column from each row. FIELD() is essential for accessing column values from a RowSet row. LOOKUP() returns only a single scalar value — not a RowSet.
5. A developer wants to write a value to a Data Extension row from within an AMPscript email execution. Which function performs a write operation?
- A. LOOKUP()
- B. UPDATEDE()
- C. UPSERTDE()(correct)
- D. INSERTDE()
Explanation: UPSERTDE(DE, keyCount, key1, val1, key2, val2, ..., col, val, ...) inserts a new row or updates an existing row in a Data Extension, based on whether the key field value already exists. INSERTDE() inserts a new row; UPDATEDE() updates only existing rows. UPSERTDE() is the safest and most common AMPscript write function as it handles both insert and update cases.
6. A developer's AMPscript in a landing page captures a form submission and inserts the data into a Data Extension. The page is experiencing intermittent duplicate entries when users double-click the submit button. What is the best AMPscript fix?
- A. Replace INSERTDE() with UPSERTDE() keyed on a unique identifier (e.g., email address or submission ID) so duplicate submissions update the existing row instead of creating a new one(correct)
- B. Add a server-side sleep of 2 seconds before the INSERTDE() call to prevent rapid successive submissions
- C. Add a JavaScript setTimeout on the submit button to disable it after the first click
- D. Use LOOKUPROWS() before INSERTDE() and only insert if no existing row is found
Explanation: UPSERTDE() with a unique key prevents duplicate rows — if the same email/ID is submitted twice, the second call updates the existing row rather than inserting a duplicate. This is the server-side idempotency fix. JavaScript disabling (C) prevents the client-side double-click but does not protect against network retries or other scenarios. The LOOKUP + INSERT pattern (D) has a race condition between the lookup and insert steps.
7. What is the correct AMPscript syntax to conditionally display content only if the subscriber's LoyaltyTier attribute equals 'Gold'?
- A. %%[ IF @LoyaltyTier == 'Gold' THEN ]%% ... content ... %%[ ENDIF ]%%
- B. %%[ IF @LoyaltyTier = 'Gold' THEN ]%% ... content ... %%[ ENDIF ]%%(correct)
- C. %%[ IF(@LoyaltyTier, 'Gold') ]%% ... content ... %%[ /IF ]%%
- D. %% IF LoyaltyTier EQ 'Gold' %% ... content ... %% ENDIF %%
Explanation: In AMPscript, the IF statement uses a single = for equality comparison (not ==). The correct syntax is: %%[ IF @LoyaltyTier = 'Gold' THEN ]%% ... content ... %%[ ENDIF ]%%. AMPscript delimiters are %%[ for code blocks. The variable must be prefixed with @. Using == (double equals) causes a syntax error in AMPscript.
8. A developer needs to render a landing page that displays a subscriber-specific offer retrieved from a Data Extension. The subscriber arrives via an email link containing their SubscriberKey in the URL query string. Which AMPscript function retrieves the SubscriberKey from the URL?
- A. ATTRIBUTEVALUE('SubscriberKey')
- B. RequestParameter('SubscriberKey')(correct)
- C. LOOKUP('AllSubscribers', 'SubscriberKey', 'EmailAddress', @email)
- D. _SubscriberKey system variable
Explanation: RequestParameter('ParameterName') retrieves a URL query string parameter or a POST form field value from the current HTTP request. For a landing page accessed via email link (e.g., landingpage.com?SubscriberKey=12345), RequestParameter('SubscriberKey') returns '12345'. ATTRIBUTEVALUE() retrieves subscriber profile attributes in the email context, not URL parameters on a landing page.
9. A developer builds a CloudPages landing page that must display personalised content to authenticated subscribers. Which Marketing Cloud mechanism identifies and authenticates a subscriber who arrives from an email link?
- A. The subscriber must log in with their email and password on the landing page
- B. Marketing Cloud automatically appends encrypted subscriber context parameters to email links for CloudPages, which the CloudPages engine decrypts to identify the subscriber(correct)
- C. The developer must manually append a JWT token to every email link
- D. CloudPages require an OAuth 2.0 access token passed as a cookie
Explanation: When a CloudPages landing page is linked from a Marketing Cloud email, the platform automatically appends encrypted context parameters (_messageContext or _subscriberkey) to the URL. The CloudPages engine decrypts these parameters server-side, making the subscriber's identity (SubscriberKey, email address, attributes) available to AMPscript via functions like _SubscriberKey, ATTRIBUTEVALUE(), and RequestParameter(). No manual token management is required.
10. A developer is building an email with personalised content regions using Dynamic Content. Which two statements about Dynamic Content in Content Builder are correct? (Choose 2)
- A. Dynamic Content rules evaluate subscriber attribute values at send time and display the matching content block(correct)
- B. If no Dynamic Content rule matches for a subscriber, the Default content block is displayed(correct)
- C. Dynamic Content can retrieve values from Data Extensions using LOOKUP() automatically
- D. Dynamic Content rules are evaluated client-side after the email renders in the inbox
Explanation: Dynamic Content rules are evaluated at send time (server-side) in Marketing Cloud. Rules compare subscriber attribute values (profile attributes or DE attributes used in the send) against defined conditions and display the first matching content block. If no rule matches, the Default content block renders. Dynamic Content does not perform Data Extension lookups automatically — for DE-driven personalisation, AMPscript (LOOKUP/LOOKUPROWS) is required.
11. A developer needs to include a product image in an email where the image URL is constructed dynamically using the subscriber's gender attribute and a product ID from a Data Extension. Which approach is correct?
- A. Use a Dynamic Content rule with one image block per gender
- B. Use AMPscript to retrieve the ProductID via LOOKUP(), construct the image URL using CONCAT(), and render it in the email's img src attribute(correct)
- C. Use a personalisation string %%ProductImageURL%% mapped to a subscriber attribute
- D. Use two email templates — one per gender — and send each to the appropriate segment
Explanation: When the image URL is dynamically constructed (not a fixed attribute value), AMPscript is required. The developer uses LOOKUP() to retrieve the ProductID from a Data Extension, then CONCAT() to build the full image URL string (e.g., 'https://cdn.example.com/products/' + @gender + '/' + @productId + '.jpg'), and renders it as the src attribute of an img tag using OUTPUT(). Personalisation strings can only reference flat attribute values, not computed strings.
12. A developer builds a preference centre on CloudPages. When a subscriber submits the form, the developer must update the subscriber's subscription status for multiple Publication Lists simultaneously. Which AMPscript approach handles this?
- A. UPSERTDE() to write the subscriber's preferences to a custom Data Extension, and rely on a nightly automation to update Publication List status
- B. Use the CloudPages Smart Capture form component with Publication List checkboxes — Smart Capture natively handles Publication List subscribe/unsubscribe on form submission(correct)
- C. Call the Marketing Cloud REST API from a client-side JavaScript AJAX call on form submission
- D. UPDATEDE() to update the AllSubscribers list directly
Explanation: The CloudPages Smart Capture form component has native Publication List integration. When configured with Publication List checkboxes, Smart Capture automatically subscribes or unsubscribes the contact from each selected/deselected list on form submission — no AMPscript or API calls required. For custom logic beyond Smart Capture's capabilities, AMPscript calls to subscribedata-related functions or the REST API are alternatives.
13. What is required to authenticate against the Marketing Cloud REST API?
- A. A Marketing Cloud username and password passed as Basic Authentication headers
- B. An OAuth 2.0 access token obtained by calling the /v2/token endpoint with a connected app's Client ID and Client Secret(correct)
- C. A Marketing Cloud API key configured in Setup
- D. A session cookie from a Marketing Cloud web login
Explanation: Marketing Cloud REST API uses OAuth 2.0 Client Credentials authentication. The developer creates a Server-to-Server Installed Package (or API Integration) in Marketing Cloud Setup to get a Client ID and Client Secret, then calls POST /v2/token with those credentials to receive an access_token. This token (Bearer) is included in all subsequent REST API request Authorization headers. Tokens expire and must be refreshed.
14. A developer needs to insert 10,000 rows into a Marketing Cloud Data Extension using the REST API. Which endpoint is most efficient for batch inserts?
- A. POST /data/v1/async/dataextensions/{key}/rows — send 10,000 individual API calls, one row per call
- B. POST /data/v1/async/dataextensions/{key}/rows with a JSON array of up to 2,500 rows per request, batching into 4 calls(correct)
- C. Use the Marketing Cloud SOAP API DataExtensionObject Create method — REST cannot batch-insert
- D. POST /data/v1/customobjectdata/key/{key}/rowset with all 10,000 rows in one call
Explanation: The Marketing Cloud REST API Data Extension rows endpoint accepts a JSON array of row objects, supporting up to 2,500 rows per request. For 10,000 rows, the developer sends 4 batched API calls (2,500 rows each), which is far more efficient than 10,000 individual calls. The async endpoint processes the batch asynchronously and returns a request ID for status polling.
15. A developer uses the Marketing Cloud REST API to trigger a Journey Builder API Event. The API call returns HTTP 200 but the contact never enters the journey. What is the most likely cause?
- A. The access token has expired
- B. The journey is in Draft status — it must be published and Activated (Running) for contacts to enter(correct)
- C. The REST API does not support Journey Builder — only the SOAP API does
- D. The contact must be in All Subscribers before they can enter a journey
Explanation: The Journey API Event endpoint accepts the request and returns 200 even if the journey is not in a running state — the event is received but the contact is not enrolled because the journey is inactive. For contacts to enter a Journey Builder journey via API Event, the journey must be in Running (Active) status. A 200 response only confirms the API request was received, not that the contact was successfully enrolled.
16. Which two Marketing Cloud REST API endpoints are used in the standard Triggered Send flow for sending a transactional email to an individual subscriber? (Choose 2)
- A. POST /messaging/v1/email/definitions — to create (or verify) the Triggered Send Definition(correct)
- B. POST /messaging/v1/email/messages — to send the email to a specific subscriber using the definition key(correct)
- C. POST /interaction/v1/events — to fire a Journey API event instead
- D. GET /data/v1/async/dataextensions — to verify the subscriber exists
Explanation: The Marketing Cloud transactional messaging REST API flow: (1) POST /messaging/v1/email/definitions creates (or updates) a Triggered Send Definition (TSD) — if it already exists from setup, this step is optional at send time; (2) POST /messaging/v1/email/messages sends the email to a specific recipient using the TSD's definitionKey, with personalisation attributes in the request body. The journey event endpoint is for Journey Builder, not transactional sends.
17. In Marketing Cloud Automation Studio, a developer needs to run a SQL query against a Data Extension that has 10 million rows and a date filter on the CreatedDate column. The query runs slowly. What is the most effective optimisation?
- A. Split the query into multiple smaller queries with UNION ALL
- B. Add CreatedDate as an index (primary key field) on the Data Extension to speed up filtering(correct)
- C. Use TOP 1000 to limit the result set
- D. Move the Data Extension to a different Marketing Cloud Business Unit
Explanation: Marketing Cloud Data Extension queries perform much faster when the WHERE clause filters on a field that is configured as a Primary Key or has an index. Adding CreatedDate as a Primary Key field (or part of a composite key) on the Data Extension allows the Marketing Cloud query engine to use index-based lookups rather than full table scans. This is the primary performance optimisation for large DE queries.
18. A developer needs to retrieve all subscribers from a Data Extension who are in a specific segment, then use the result as a Journey Builder entry audience. The segment logic is complex (multiple joins and conditions). What is the recommended Marketing Cloud approach?
- A. Use Journey Builder's Filter entry source with multiple drag-and-drop criteria
- B. Use an Automation Studio SQL Query Activity to write the segment to a target Data Extension, then use that DE as a Journey Builder Data Extension entry source(correct)
- C. Export the segment from Marketing Cloud to SFTP, then import it back in as a List for Journey Builder
- D. Write the complex SQL in a CloudPages AMPscript block and feed results to Journey Builder
Explanation: For complex segmentation requiring SQL joins and conditions, Automation Studio SQL Query Activities are the correct tool. The query runs on a schedule (or triggered), writes the segment results to a designated target Data Extension, and Journey Builder's Data Extension entry source polls that DE for new records to enroll. This decouples segmentation logic from Journey Builder's entry configuration.
19. A developer needs to upsert (insert or update) 500,000 subscriber records into a Marketing Cloud Data Extension every night from a CRM export. What is the most reliable and scalable approach?
- A. Use the Marketing Cloud REST API to send 200 batches of 2,500 rows
- B. Drop a CSV file on the Marketing Cloud Enhanced SFTP and use an Automation Studio File Transfer + Import Activity with 'Add and Update' mode(correct)
- C. Use the SOAP API DataExtensionObject Upsert with 500,000 individual SOAP calls
- D. Use AMPscript UPSERTDE() in a CloudPages page loaded by an automated script
Explanation: For large nightly data loads (500K+ rows), the SFTP + Automation Studio Import Activity pattern is the recommended and most scalable approach. The CRM exports a CSV to the Marketing Cloud Enhanced SFTP; File Transfer Activity moves it to the import location; Import Activity processes it with 'Add and Update' (upsert) mode. This avoids API rate limits, handles large files reliably, and is the standard enterprise integration pattern.
20. A developer's SQL Query Activity in Automation Studio is failing with a 'Query exceeded maximum execution time' error. The query joins three large Data Extensions (5M, 2M, and 500K rows). What is the most effective remediation?
- A. Break the join into multiple sequential Query Activities, materialising intermediate results in temporary Data Extensions(correct)
- B. Increase the Marketing Cloud query timeout in Setup
- C. Use the Marketing Cloud SOAP API to run the query externally
- D. Move the query logic to a CloudPages AMPscript block
Explanation: Marketing Cloud SQL Query Activities have a maximum execution time of 30 minutes. When a query joins multiple very large DEs and exceeds this limit, the solution is to decompose the query: run Query 1 to join the two largest DEs and write results to an intermediate 'temp' DE; run Query 2 to join the intermediate DE with the third DE. Each step is smaller and completes within the time limit. Marketing Cloud does not expose a query timeout setting for user configuration.
21. A developer needs to send a file from Marketing Cloud to an external SFTP server after a Data Extract Activity creates the file. Which Automation Studio activity moves the file from the Marketing Cloud SFTP to the external server?
- A. Import Activity
- B. File Transfer Activity configured to 'Transfer from Marketing Cloud' to an external SFTP(correct)
- C. Data Extract Activity with an 'Export to SFTP' option
- D. HTTP POST activity sending the file as a multipart upload
Explanation: File Transfer Activity in Automation Studio has two directions: (1) 'Transfer from External URL' — downloads a file from an external SFTP to the Marketing Cloud Enhanced SFTP (for imports); (2) 'Transfer from Marketing Cloud' — moves a file from the Marketing Cloud Enhanced SFTP to an external SFTP (for exports). After a Data Extract Activity writes a file to the MC SFTP, a File Transfer Activity pushes it to the external server.
22. A developer configures an Automation Studio automation with a File Drop trigger pointed at the SFTP path /import/subscribers/. The automation has been running successfully for 3 months. Suddenly it stops triggering. No files are arriving. What is the most likely cause and how should the developer investigate?
- A. The SFTP password expired — Marketing Cloud rotates SFTP credentials every 90 days
- B. The upstream system that deposits files has stopped sending; the developer should check the upstream system's logs and SFTP transfer logs for file arrival(correct)
- C. The automation's File Drop trigger deactivates after 90 days automatically
- D. Marketing Cloud SFTP has a file count limit — clear old files to restore triggering
Explanation: A File Drop automation trigger fires only when a file arrives in the designated SFTP folder. If the automation stops triggering, the most common cause is that the upstream system has stopped depositing files — due to an upstream failure, changed schedule, modified file path, or expired credentials on the sending system's side. The developer should check the upstream system's transfer logs and verify that files are being deposited on the SFTP (using an SFTP client to browse the folder). Marketing Cloud SFTP credentials do not auto-rotate.
23. A developer builds an Automation Studio automation that generates a daily email report and saves it as an HTML file on the MC SFTP. The operations team needs to receive this file via email every morning. Which Automation Studio activity accomplishes this without additional external tooling?
- A. A Send Email Activity that attaches the generated HTML file to an email
- B. There is no native Automation Studio activity to email a file — the developer must use the Marketing Cloud REST API to send the file as an email attachment from an external script(correct)
- C. A Triggered Send activity that emails the operations team with a link to the file on the SFTP
- D. A Data Extract Activity with an email distribution option
Explanation: Automation Studio does not have a native activity to email a file as an attachment. The Send Email Activity sends marketing emails to subscribers — it does not support file attachments or internal team notifications. For this use case, the developer must use an external script (or CloudPages with SSJS) that calls the Marketing Cloud REST API to send a transactional email, or use the File Transfer Activity to push the file to an external SFTP from which the operations team retrieves it.
24. What is the primary difference between AMPscript and Server-Side JavaScript (SSJS) in Marketing Cloud?
- A. AMPscript runs client-side in the browser; SSJS runs server-side on Marketing Cloud servers
- B. AMPscript is a proprietary Marketing Cloud scripting language executed server-side; SSJS is JavaScript executed server-side on Marketing Cloud, providing access to platform Core library objects and HTTP capabilities(correct)
- C. SSJS is only used in Automation Studio; AMPscript is only used in emails
- D. SSJS is deprecated — all new development should use AMPscript
Explanation: Both AMPscript and SSJS execute server-side on Marketing Cloud. AMPscript is a proprietary language designed specifically for Marketing Cloud with a syntax tailored to data lookups and personalisation. SSJS is a JavaScript variant that gives developers access to the Marketing Cloud platform's Core library (Platform.Load('Core', '1')), which provides APIs for HTTP requests, Data Extension operations, and more complex programming constructs. SSJS is preferred for complex logic; AMPscript for simple personalisation.
25. A developer uses SSJS on a CloudPages landing page to make an outbound HTTP POST to an external REST API. The response contains JSON with a confirmation number. The developer needs to display the confirmation number on the page and store it in a Data Extension. Which SSJS code pattern is correct?
- A. Use Platform.Load('Core','1'); var req = new Script.Util.HttpRequest(url); parse the response and use Platform.Response.Write() to display and Data.DE.Add() to store(correct)
- B. Use XMLHttpRequest in SSJS the same as client-side JavaScript; SSJS runs in a browser context on CloudPages
- C. SSJS cannot make outbound HTTP calls — use AMPscript HTTP functions instead
- D. Use fetch() API with async/await in SSJS — it supports ES6 natively
Explanation: In Marketing Cloud SSJS (CloudPages context), Platform.Load('Core','1') loads the platform library. HTTP outbound calls are made using Script.Util.HttpRequest (the SSJS HTTP client). The response JSON is parsed with Platform.Function.ParseJSON(). To display output, use Variable.SetValue() or write to the page via Write(). Data Extension writes use Platform.Function.UpsertData() or the Core library's DataExtension object. SSJS on Marketing Cloud is not browser JavaScript — it has no XMLHttpRequest or fetch().