Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Comm-Dev-101 Exam Questions

Exam Name: Salesforce Certified B2C Commerce Developer Exam
Exam Code: Comm-Dev-101
Related Certification(s):
  • Salesforce Developer Certifications
  • Salesforce B2C Commerce Developer Certifications
Certification Provider: Salesforce
Number of Comm-Dev-101 practice questions in our database: 154 (updated: Sep. 22, 2026)
Expected Comm-Dev-101 Exam Topics, as suggested by Salesforce :
  • Topic 1: B2C Commerce Setup: Covers configuring the development environment, cartridge paths, sandbox setup, data imports, and creating/configuring a new site in Business Manager.
  • Topic 2: Work With a B2C Site: Covers managing product data, pricebooks, inventory, order-related configurations (payment/shipping), and content management using Page Designer, Content Slots, and Content Folders.
  • Topic 3: Data Management Using Business Manager Usage: Covers site search configuration, custom attributes/objects, logging, performance troubleshooting, OCAPI permissions, and service configurations within Business Manager.
  • Topic 4: Application Development: Covers coding ISML templates, JavaScript controllers, Page Designer components, form handling with validation/CSRF, localization, logging, service integrations, hooks, best practices, OCAPI usage, and job scripting.
Disscuss Salesforce Comm-Dev-101 Topics, Questions or Ask Anything Related
0/2000 characters

Currently there are no comments in this discussion, be the first to comment!

Free Salesforce Comm-Dev-101 Exam Actual Questions

Note: Premium Questions for Comm-Dev-101 were last updated On Sep. 22, 2026 (see below)

Question #1

A developer is writing a server side script that needs to maintain state across calls. The persistent information needed includes these items:

* The current customer

* Whether or not the customer is authenticated

* The privacy attributes (such as tracking consent or cookie policy)

Which technique should the developer use to maintain state in an efficient and scalable manner that follows best practice?

Reveal Solution Hide Solution
Correct Answer: B

Server-side script variables do not persist between independent request executions. B2C Commerce therefore provides theSessionobject as the appropriate request-session mechanism for maintaining shopper-specific state across calls.

Salesforce specifically identifies the Session API as providing access to thecurrent customer, whether that customer isauthenticated, session custom attributes, andcustom privacy attributes. These capabilities map directly to every requirement in the question.

A client-side cookie is inappropriate for reproducing server-maintained authentication and customer state. It would also expose application-controlled values to client modification and duplicate information already securely managed by the Commerce session. An SFRA controller does not automatically preserve its own JavaScript variables across requests; each request executes within a separate script context.

Session data should nevertheless remain lightweight. Long-lived or business-critical information that must survive beyond the shopper's browser session belongs in persistent business objects rather than session attributes. Privacy attributes have specific lifecycle semantics and are particularly appropriate for tracking consent and related shopper preferences during the active session.

Study Guide reference:Application Development --- Session API, shopper state, authentication state, privacy attributes, server-side JavaScript execution lifecycle, and scalable state management.

===============


Question #2

Business Manager has the configuration:

* Active Log category is "root"

* Log level of INFO

The code below executes.

varlog=Logger.getLogger("products","export");

log.info("This is important information");

Using this information, what is the beginning of the filename in which the log will be written?

Reveal Solution Hide Solution
Correct Answer: B

The two-argument overload ofLogger.getLogger()has the signaturegetLogger(fileNamePrefix, category). Therefore, inLogger.getLogger('products', 'export'),productsis the developer-defined filename prefix andexportis the logging category.

Salesforce documents that custom application log files begin withcustom, while the suppliedfileNamePrefixidentifies the named custom log file. Consequently, the resulting filename begins withcustom-products, making option B correct. The category valueexportcontrols filtering through the custom-log category hierarchy but does not replace the filename prefix.

The configured root level of INFO also permits thislog.info()message because INFO is at the configured threshold. Higher-severity WARN, ERROR, and FATAL entries would likewise pass the root filter unless a more specific category rule superseded it.

This distinction between filename prefix and category is significant in production diagnostics. The prefix controls which named custom file receives the entries, while categories provide hierarchical filtering and operational control through Business Manager.

Study Guide reference:Application Development ---dw.system.Logger, custom named logs, filename prefixes, categories, and log-level filtering.

===============


Question #3

A developer is tasked with the development of a new Page Designer Page Type, as requested by the merchant. How should they define the rendering logic of the page?

Reveal Solution Hide Solution
Correct Answer: A

A Page Designer Page Type consists of a metadata definition plus a corresponding JavaScript implementation. The rendering behavior itself belongs in the page-typeJavaScript file, which must expose arender()function.

Salesforce states that the script file must have the same base name and location as the Page Designer meta-definition file, using.jsrather than.json. The script'srenderfunction receives aPageScriptContextand must return the resulting markup as a string. It commonly renders an ISML template usingdw.util.Template, and the template can in turn render the page's regions.

The metadata JSON describes the Page Type's declarative configuration---such as its attributes and regions---but does not implement rendering through a'render'property. A conventional SFRA controller route can invokePageMgr.renderPage()to initiate rendering, but that controller does not define the actual Page Type rendering logic.

This separation allows Page Designer to manage page composition while the JavaScript implementation controls the output representation.

Study Guide reference:Application Development --- Page Designer Page Types, page metadata,render()functions,PageScriptContext, and Page Designer rendering.

===============


Question #4

A developer is asked to improve a page's maintainability by reducing its code repetition.

Which technique should the developer implement to achieve this?

Reveal Solution Hide Solution
Correct Answer: A

Template decorators provide a standard mechanism for extracting shared page structure---such as headers, navigation, wrappers, footers, and common layout markup---into reusable ISML templates. A child template uses<isdecorate>to select a decorator, and the decorator uses<isreplace/>to identify the location where the child's page-specific content is inserted.

Salesforce describes<isdecorate>as the ISML mechanism for decorating enclosed content with another template and defines<isreplace/>as the placeholder where the decorated content is inserted. A typical use case is wrapping different page bodies with a common header and footer.

This architecture directly reduces repeated layout code and improves maintainability because a shared element can be changed in the decorator rather than edited across many individual pages.

Option B misuses<isscript>; script tags are intended for executable template scripting, not reusable page composition. Option C doesn't represent the standard decorator-based technique requested by the question and can encourage fragmented template composition when a reusable layout is the underlying requirement.

Study Guide reference:Application Development --- ISML templates, template decorators,<isdecorate>,<isreplace>, reusable presentation structure, and maintainable storefront design.

===============


Question #5

A developer has these requirements for out-of-stock products:

* Save the SKUs of the out-of-stock products that the customer is interested in.

* Save the customer email regardless if the customer is a guest or registered.

* Email the customer when the product is back-in-stock.

Which step should the developer perform as part of the solution to achieve the requirements?

Reveal Solution Hide Solution
Correct Answer: C

A custom object is the most appropriate persistent data structure because the requirement applies toboth registered and guest shoppers. A Profile-based solution cannot satisfy the requirement reliably because anonymous/guest customers do not have a persistent registered customer profile. Storing customer email lists directly on Product records would also create an inappropriate product-to-shopper coupling and potentially large mutable collections on product system objects.

B2C Commerce custom objects are intended to extend the persistent commerce data model for application-specific requirements. Developers can define custom object types with custom attributes, including multi-valuedSet of Stringattributes, and choose organization or site storage scope.

A custom back-in-stock object can therefore persist the shopper's email address plus one or more interested SKUs independently of authentication status. Subsequent job or inventory-update logic can identify subscriptions when inventory becomes available and trigger the notification process.

This design also keeps notification-subscription data separate from core customer and product objects, reducing unintended effects on standard platform data models and supporting anonymous shoppers cleanly.

Study Guide reference:Data Management Using Business Manager Usage --- custom object types, custom attributes, persistent business data, guest shoppers, and application-specific data modeling.

===============



Unlock Premium Comm-Dev-101 Exam Questions with Advanced Practice Test Features:
  • Select Question Types you want
  • Set your Desired Pass Percentage
  • Allocate Time (Hours : Minutes)
  • Create Multiple Practice tests with Limited Questions
  • Customer Support
Get Full Access Now

Save Cancel