Salesforce-Marketing-Cloud-Engagement-Developer Practice Test Questions

196 Questions


A sendable data extension with a text field named 'Balance' contains the value S6.96 for a particular record. The following AMPscript statement is included in an email:

IF (Balance > 6.00) THEN
SET @Result = 'Balance is more than $6.00
ENDIF

Why would this IF statement yield unintended results?


A. The operands are not the same data type.


B. The comparison should use the < operator.


C. Balance is a protected keyword.


D. Double quotes should be used instead of single quotes.





A.
  The operands are not the same data type.

Summary:
The IF statement produces unintended results because the 'Balance' field is stored as a Text data type in the data extension, even though its value looks numeric (e.g., "S6.96"). When AMPscript retrieves the value, it remains a string. String-to-string comparison is performed, causing "S6.96" to be evaluated as less than "6.00" due to lexicographical (alphabetical) ordering, not numerical ordering.

Correct Option:

A. The operands are not the same data type.
The field Balance is a Text field containing the string "S6.96". In the comparison Balance > 6.00, AMPscript treats Balance as a string and implicitly converts 6.00 to the string "6.00". The comparison becomes "S6.96" > "6.00", which is false because the first character "S" has a higher ASCII value than "6". This leads to the condition failing even though numerically 6.96 > 6.00. The root cause is the mismatch in data types (Text vs Number).

Incorrect Option:

B. The comparison should use the < operator.
The logic requires checking if the balance exceeds $6.00, so the greater-than (>) operator is correct. Using < would reverse the condition and produce the opposite (wrong) outcome.

C. Balance is a protected keyword.
"Balance" is not a reserved or protected keyword in AMPscript. It is a perfectly valid field name and variable name.

D. Double quotes should be used instead of single quotes.
The string literal 'Balance is more than $6.00' uses single quotes, which is the correct syntax in AMPscript. Double quotes would cause a syntax error.

Reference:
Salesforce Help – AMPscript Data Types and Type Conversion

Northern Trail Outfitters has an Enterprise 2.0 account with 15 business units. Each business unit can access a Shared Data Extension named 'Inventory', which contains the details for each product. A Boolean field named 'InStock' indicates whether the item is available. Which snippet of AMPscript would return all products which are currently available?


A. LookupRows ('Ent. Inventory*, 'true', 'InStock')


B. LookupRows ('Ent. Inventory*, itemName, 'InStock', 'true')


C. LookupRows ('Ent. Inventory*, 'InStock', 'true', )


D. LookupRows ('Inventory*, 'InStock' 'true',)





C.
  LookupRows ('Ent. Inventory*, 'InStock', 'true', )

Summary:
In an Enterprise 2.0 account, shared data extensions are located in the "Ent." shared folder. The correct syntax for the LookupRows function requires: the exact data extension name (including the "Ent." prefix), the filter column name, and the value to match. To return all rows where the Boolean field InStock equals true, the minimum required parameters are the data extension name and one filter pair ('InStock', 'true').

Correct Option:

C. LookupRows('Ent.Inventory', 'InStock', 'true')
This is the correct syntax. "Ent.Inventory" is the proper external key for the shared data extension visible to child business units. The LookupRows function is used with three parameters: data extension name, filter field, and filter value. Since 'InStock' is a Boolean field, the text value 'true' (case-insensitive) correctly matches when the checkbox is checked, returning all available products.

Incorrect Option:

A. LookupRows('Ent. Inventory', 'true', 'InStock')*
Wrong parameter order and syntax. The second and third parameters are swapped — the column name must come first, then the value. Also, there is an unnecessary space and asterisk.

B. LookupRows('Ent. Inventory, itemName, 'InStock', 'true')*
This is syntactically invalid. The function mixes optional return columns (which would come after the filter) incorrectly and uses a comma before itemName without proper structure. Additionally, no such field "itemName" is mentioned in the question.

D. LookupRows('Inventory', 'InStock' 'true',)*
Multiple errors: missing the required "Ent." prefix for shared items, invalid comma placement, missing comma between parameters, and an unnecessary trailing comma.

Reference:
Salesforce Help – Shared Data Extensions in Enterprise 2.0

A developer wants to create a CloudPage which is linked from an email. %%[SET @point = RequestParameter(x) SET @value = 5 IF Length(@point) > 1 THEN SET @value = 1 ELSEIF Length(@point)>2 THEN SET @value = 2 ELSEIF Length(@point) >3 THEN SET@value = 3 ELSEIF Length(@point) >4 THEN SET @value = 4 ENDIF]%% Which is the expected value of @value if x = 'Tacos'?


A. 3


B. 1


C. 5


D. 4





B.
  1

Summary:
This question tests the logic flow of an IF/ELSEIF statement in AMPscript. The code checks the length of the parameter x (which is 'Tacos') against a series of conditions. The key to understanding the result is that AMPscript executes the first condition that evaluates to true and then skips all subsequent ELSEIF and ELSE blocks. The length of the string 'Tacos' is 5 characters.

Correct Option:

B. 1:
This is the correct value. The first condition, IF Length(@point) > 1, checks if the length of 'Tacos' (which is 5) is greater than 1. Since 5 > 1 is true, the code inside this IF block runs, setting @value = 1. The script then exits the conditional block entirely, and none of the subsequent ELSEIF conditions are evaluated, even though they are also mathematically true.

Incorrect Option:

A. 3:
This would be the result if the condition Length(@point) > 3 were the first true condition encountered. However, the earlier condition Length(@point) > 1 is true and is evaluated first, so the script never reaches the check for > 3.

C. 5:
This is the initial default value set for @value. It would only remain as 5 if none of the conditions in the IF/ELSEIF block were true, which is not the case here.

D. 4:
This would be the result if the condition Length(@point) > 4 were the first true condition. However, the condition for > 1 is true and is evaluated first, preventing the script from reaching the > 4 check.

Reference:
Salesforce Help – Shared Data Extensions in Enterprise 2.0

Which statements are true regarding the Marketing Cloud SOAP API?
(Choose 2)


A. More than 2000 SOAP calls can be performed per minute.


B. Most SOAP calls can be synchronous or asynchronous


C. Uses XML in request and response body.


D. Uses JSON in request and response body.





B.
  Most SOAP calls can be synchronous or asynchronous

C.
  Uses XML in request and response body.

Summary:
The Marketing Cloud SOAP API is built on the legacy SOAP protocol, which uses XML for both request and response payloads. It is primarily synchronous by nature, though some objects support an optional Asynchronous request header. The API enforces rate limits far below 2000 calls per minute (typically around 120–300 depending on the account tier).

Correct Option:

C. Uses XML in request and response body.
The SOAP API exclusively uses XML format for both the request envelope and the response. This is a fundamental characteristic of all SOAP-based web services in Marketing Cloud.

B. Most SOAP calls can be synchronous or asynchronous
Many SOAP API objects support both modes via the optional header inside the SOAP envelope. When omitted, calls are synchronous; when included, they are processed asynchronously and return a request ID immediately.

Incorrect Option:

A. More than 2000 SOAP calls can be performed per minute.
False. The standard SOAP API limit is much lower (typically 120–300 calls per hour for most accounts, or up to ~5 per second in high-tier accounts). 2000 calls per minute would far exceed documented limits.

D. Uses JSON in request and response body.
False. JSON is used by the Marketing Cloud REST API, not the SOAP API. The SOAP API always uses XML.

Reference:
Salesforce Help – SOAP API Technical Details

A developer is notified the View Email As Web Page (VAWP) link, when clicked, displays the message, The system is temporarily unavailable. We apologize for any inconvenience. Please try again later. What could be a possible cause for the error


A. The data in the data extensions used at the time of send was overwritten.


B. The email used at the time of send was deleted, updated, or moved.


C. The sender profile used at the time of send was overwritten.


D. The data extension used at the time of send was moved to another folder.





B.
  The email used at the time of send was deleted, updated, or moved.

Summary 📝
The View Email As Web Page (VAWP) link works by referencing the exact content and data context of the email at the moment it was sent. This functionality relies on the Job ID and Subscriber ID to dynamically reconstruct the message. If the underlying Email asset in Marketing Cloud is deleted, moved, or updated to a new version after the send job completes, the system loses the essential reference needed to retrieve and render the static content, resulting in the generic "temporarily unavailable" error.

Correct Option ✅

B. The email used at the time of send was deleted, updated, or moved.
The VAWP link's URL contains parameters that reference the original Job ID and the Email ID (or its equivalent in the system). If the email asset is removed from its original location (moved), deleted, or overwritten by a new version (updated), the system cannot find the correct content asset linked to that specific send job. This disruption in the asset path is a primary cause for the "temporarily unavailable" error message when trying to view the static web version.

Incorrect Options ❌

A. The data in the data extensions used at the time of send was overwritten.
This is incorrect because the VAWP feature saves a static snapshot of the email content and the subscriber's personalized data at the time of send. Once the email is sent, changes to the source Data Extension data (like overwriting or updating rows) will not affect the already rendered and stored web page version.

C. The sender profile used at the time of send was overwritten.
This is incorrect. The Sender Profile primarily dictates the From Name and From Email Address. While important for the send process, changes to this profile after the send has completed will not break the ability of the system to retrieve and display the static HTML content of the email linked to the VAWP.

D. The data extension used at the time of send was moved to another folder.
This is incorrect for two reasons. First, the VAWP uses the snapshot of the data, not a live reference. Second, moving a Data Extension to a different folder generally does not break the internal system references tied to a completed send job, as the unique Data Extension Customer Key remains the same.

Reference 🔗
Marketing Cloud Email Send Information: View Email As Web Page

Northern Trail Outfitters (NTO) stores most of their customer data in Marketing Cloud. They do not mind their data being viewed in clear text within SFMC to users who have access, but they want to ensure the underlying database files are encrypted at rest in case the physical media is stolen. Which encryption method should NTO use?


A. Encrypted Data Sending


B. Field-Level Encryption


C. Tokenized Sending


D. Transparent Data Encryption





D.
  Transparent Data Encryption

Summary:
This scenario describes a requirement for database-level security without altering how data is accessed or viewed within the Marketing Cloud application. The goal is to protect the physical database files on the server's disk from being read if the underlying storage media is compromised. This points to a solution that encrypts the entire database at the storage level, operating transparently for authorized users and applications.

Correct Option:

D. Transparent Data Encryption (TDE):
This is the correct method. TDE performs real-time encryption of the entire database at the file level, including its data files, log files, and backups. It is "transparent" because it requires no changes to the application; users with proper access in Marketing Cloud can still view and use the data in clear text, but the underlying files are encrypted and unreadable without the encryption keys, protecting against physical media theft.

Incorrect Option:

A. Encrypted Data Sending:
This refers to securing data in transit (e.g., using TLS/SSL for email or API calls), not while it is at rest in the database. It does not address the risk of stolen physical media.

B. Field-Level Encryption:
This method encrypts specific, sensitive fields (e.g., Social Security Numbers) within the database. It is not transparent, as it requires the application logic to encrypt and decrypt the data, and it would prevent the data from being viewed in clear text within the SFMC UI, which contradicts the business requirement.

C. Tokenized Sending:
Tokenization is the process of replacing sensitive data with a non-sensitive equivalent (a token) that has no extrinsic meaning. It is primarily used for securing data during transmission or for masking data in user interfaces, not for encrypting entire database files at rest.

Reference:
Salesforce Official Documentation: Data Encryption at Rest

A developer receives a request for tracking data for alt sends associated with a specific JoblD. The developer needs to see Sends, Opens, Clicks, and Bounces. Which two activities could the developer use?
(Choose 2 answers)


A. Tracking Extract Activity


B. Server-Side JavaScript Activity


C. Campaign Data Extract


D. SQL Query Activity





A.
  Tracking Extract Activity

D.
  SQL Query Activity

Summary:
To retrieve individual send, open, click, and bounce tracking data tied to a specific JobID in Marketing Cloud, the data must come from the underlying tracking sent data views (_Sent, _Open, _Click, _Bounce). The only two Automation Studio activities that can extract or query this granular tracking data at the JobID level are the Tracking Extract and the SQL Query Activity (targeting a data extension).

Correct Option:

A. Tracking Extract Activity
The Tracking Extract can export Job-level tracking details (Sends, Opens, Clicks, Bounces, Unsubscribes, etc.) for one or more specific JobIDs. When configured with “Job” scope and the desired JobID(s), it generates a _Job.csv file plus the corresponding _Sent.csv, _Open.csv, _Click.csv, and _Bounce.csv files containing subscriber-level records.

D. SQL Query Activity
SQL Query Activities can directly query the tracking data views (_Sent, _Open, _Click, _Bounce) using a WHERE JobID = XXXXX condition. This is the most common and flexible method developers use to pull send, open, click, and bounce data for a specific JobID into a data extension for reporting or further processing.

Incorrect Option:

B. Server-Side JavaScript Activity
Server-Side JavaScript cannot directly access the tracking data views or perform a tracking extract. It can only call limited WSProxy or Core functions and is not designed for bulk tracking exports.

C. Campaign Data Extract
Campaign Data Extract is part of the legacy Automation Studio “Data Extract” activity and is limited to campaign-level summaries. It does not provide individual tracking events tied to a specific JobID.

Reference:
Salesforce Official Documentation: Data Encryption at Rest

Northern Trail Outfitters wants to trigger follow up messages after a subscriber opens an email. What process would they use to get real-time engagement data?


A. Query Activity


B. Client-Side JavaScript


C. WSproxy Service


D. Event Notification Service





D.
  Event Notification Service

Summary:
This question focuses on capturing real-time engagement events (like an email open) to trigger an immediate follow-up action. Traditional methods like Query Activities run on a scheduled basis and introduce significant latency. The solution requires a mechanism that can instantly notify an external system or service the moment an event occurs, enabling a near-instantaneous response.

Correct Option:

D. Event Notification Service:
This is the correct process. The Event Notification Service (ENS) is a Marketing Cloud feature that pushes real-time notifications for specific events (Sends, Opens, Clicks, Bounces, etc.) to a pre-configured HTTP endpoint (webhook). This allows an external application to receive the open event data immediately and trigger a follow-up message without any delay.

Incorrect Option:

A. Query Activity:
A Query Activity runs on a predefined schedule (e.g., hourly, daily) within Automation Studio. It queries Data Views, which are updated periodically, not in real-time. This method introduces a latency of minutes to hours, making it unsuitable for triggering immediate follow-ups based on an open.

B. Client-Side JavaScript:
While JavaScript can be used to track opens and fire additional actions, it is client-side and unreliable (can be blocked by email clients). More importantly, it is not a Marketing Cloud process for getting data into the platform or a connected system to trigger a new send; it executes in the subscriber's inbox.

C. WSproxy Service:
WSproxy is an SSJS object used within CloudPages to make SOAP API calls. It is a tool for programmatically interacting with Marketing Cloud data, but it is not a service designed for receiving or pushing real-time engagement event streams.

Reference:
Salesforce Official Documentation: Event Notification Service

A developer receives Error Code 5 when performing a SOAP API call. The error states: "Cannot Perform 'Post' on objects of type 'SentEvent'". What could be the issue?


A. SOAP does not support POST; useREST


B. The authentication token has expired.


C. It may be a temporary network issue.


D. 'SentEvent' is not able to be updated using SOAP.





D.
  'SentEvent' is not able to be updated using SOAP.

Summary:
This error indicates an attempt to perform an unsupported operation on a specific API object. The SentEvent object represents a record in the Sent Data View, which is a system-generated, read-only log of email send events. Error Code 5 typically signifies an invalid operation, such as trying to create, update, or delete a record that is not allowed by the system's data model. The key is recognizing which objects are mutable and which are immutable.

Correct Option:

D. 'SentEvent' is not able to be updated using SOAP.
This is the correct issue. The SentEvent object, like most tracking event objects (e.g., OpenEvent, ClickEvent), is strictly read-only within the SOAP API. It is a historical log entry, and the system does not allow creating (Post), updating, or deleting these records via any API. The only permitted operation is Retrieve to pull this data out for reporting.

Incorrect Option:

A. SOAP does not support POST; use REST.
This is incorrect. The SOAP API absolutely supports the Create method (which corresponds to the Post operation mentioned in the error). The issue is not the HTTP verb but the specific object type the operation is being applied to. The REST API also would not allow creating a SentEvent record.

B. The authentication token has expired.
An expired or invalid authentication token typically results in a different class of error, such as an "HTTP 401 Unauthorized" or a SOAP fault indicating a security failure, not Error Code 5 related to a specific object operation.

C. It may be a temporary network issue.
Temporary network issues generally cause connection timeouts, request failures, or non-specific server errors (e.g., HTTP 500). They do not produce a specific, descriptive error message about the inability to perform a Post on a particular object type.

Reference:
Salesforce Official Documentation: SentEvent Object

A developer is making an API REST call to trigger an email send. An access token is used to authenticate the call. How long are Marketing Cloud v1 access tokens valid?


A. Access tokens expire after 24 hours.


B. REST calls do not require an access token.


C. Each API call requires a new access token.


D. Access tokens expire after one hour.





D.
  Access tokens expire after one hour.

Summary 📝
When using the older v1 Marketing Cloud Authentication endpoint (/v1/requestToken) for server-to-server (installed package) integrations, the generated access token is valid for a default period of one hour (3600 seconds). This token is reusable for multiple API calls within that hour, allowing the application to maintain a session and avoid requesting a new token for every interaction. Developers must store the token and the expiration time (expiresIn) and be prepared to request a new token when the current one expires to maintain continuous access.

Correct Option ✅

D. Access tokens expire after one hour.
The Marketing Cloud REST Authentication service (used for v1 tokens via the requestToken endpoint) returns an expiresIn value of 3600 seconds, which is one hour.

This is the standard lifetime for the access token, and the application must refresh the token before or immediately after this period to continue making successful API calls.

It is a recommended best practice to refresh the token slightly before the one-hour mark to prevent call failures due to expiration

Incorrect Options ❌

A. Access tokens expire after 24 hours.
This is incorrect. A 24-hour expiration is significantly longer than the standard one-hour (3600 seconds) lifetime for the v1 access tokens, and is not the default configuration. Using an access token past its one-hour validity will result in an "Unauthorized" (401) HTTP error response.

B. REST calls do not require an access token.
This is incorrect. All Marketing Cloud REST API calls require an authenticated access token in the Authorization header (using the Bearer scheme). The token acts as the session credential, granting access permissions defined by the installed package.

C. Each API call requires a new access token.
This is incorrect. The access token is explicitly designed to be reusable for the duration of its one-hour validity. Requesting a new token for every API call is inefficient, adds latency, and can lead to API throttling issues, which is strongly discouraged by Salesforce documentation.

Reference 🔗
Salesforce Developers Documentation - Get an Access Token

A developer is using the REST Authorization Service to obtain an OAuth access token. Which method should be used to include the access token in the API requests


A. Include the header x-access-token: your_access_token


B. Include as a query parameter access_token=Y0UR_ACCESS_TOKEN


C. Include the header Authorization: Basic your_access_token


D. Include the header Authorization: Bearer YOUR ACCESS TOKEN





D.
  Include the header Authorization: Bearer YOUR ACCESS TOKEN

Summary:
This question tests the knowledge of the standard and correct method for presenting an OAuth 2.0 access token in the HTTP header of a REST API request. After successfully authenticating and receiving an access token from the Authorization Service, this token must be included in all subsequent API calls to prove the request is authorized. The OAuth 2.0 Bearer Token specification defines the exact format for this.

Correct Option:

D. Include the header Authorization:
Bearer YOUR_ACCESS_TOKEN: This is the correct and standardized method. The Authorization header is used for this purpose, and the Bearer keyword specifies the type of authentication being used, which is an OAuth 2.0 bearer token. The API endpoint will validate this token to authorize the request.

Incorrect Option:

A. Include the header x-access-token: your_access_token:
This is a non-standard and incorrect method for the Marketing Cloud REST API. While some custom APIs might use a similar custom header, the official specification for OAuth 2.0 requires the use of the standard Authorization: Bearer header.

B. Include as a query parameter access_token=YOUR_ACCESS_TOKEN:
This method is discouraged for security reasons. Placing the token in the URL as a query parameter can expose it in server logs, browser history, and referrer headers, making it more vulnerable to being intercepted and stolen.

C. Include the header Authorization:
Basic your_access_token: This is incorrect. The Authorization: Basic header is used for Basic Authentication, where the credentials are a base64-encoded string of a username and password. It is not used for presenting an OAuth 2.0 access token. Using a Bearer token with the Basic schema will result in an authentication failure.

Reference:
Salesforce Official Documentation: Use an Access Token

A developer created a landing page in CloudPages which return unique content when subscriber data is located on a related data extension. The developer does not know if all subscribers have rows in the related data extension, and want default content to render if no subscriber data is found on the related data extension. Which best practice should the developer follow to control the unique and default content?


A. Use the RowCount function and an IF statement


B. Use the Lookup, Row and Field functions


C. Use the LookupOrderRows and Row functions


D. Use the DataExtensionRowCount function





A.
  Use the RowCount function and an IF statement

Summary:
To display personalized content when a subscriber has a row in a related data extension and fall back to default content when no row exists, the best practice is to first attempt to retrieve the row(s) and then check how many rows were returned. The most reliable and commonly used functions for this pattern in CloudPages are RowCount() combined with LookupRows() (or LookupOrderedRows()) inside an IF statement.

Correct Option:

A. Use the RowCount function and an IF statement
This is the recommended best practice. The developer performs a LookupRows() or LookupOrderedRows() call, stores the result in a variable (e.g., @rows), then uses RowCount(@rows) inside an IF statement. If RowCount(@rows) > 0, personalized content is shown using Row() and Field(); otherwise, default content is rendered. This pattern explicitly handles the “no row found” scenario safely.

C. Use the LookupOrderedRows and Row functions
Also correct and widely used. LookupOrderedRows() is preferred over LookupRows() when a specific sort order is needed or to guarantee consistent results. Combined with RowCount() and Row()/Field(), it achieves the same safe personalized/default content logic and is considered a best-practice variation of option A.

Icorrect option:

B. Use the Lookup, Row and Field functions
Lookup() returns only a single value, not a rowset, so RowCount() cannot be used with it. It also fails silently with empty strings when no row is found, making it harder to reliably detect “no data” versus a legitimate empty value.

D. Use the DataExtensionRowCount function
DataExtensionRowCount() only returns the total row count of an entire data extension and cannot be filtered by SubscriberKey or EmailAddress. It is useless for checking if the current subscriber has a matching row.

Reference:
Salesforce Help – RowCount Function


Page 3 out of 17 Pages
Previous