Logo Passei Direto
Buscar
Material
páginas com resultados encontrados.
páginas com resultados encontrados.

Prévia do material em texto

1 / 11
Exam : Comm-Dev-101
Title :
https://www.passcert.com/Comm-Dev-101.html
Salesforce Certified B2C
Commerce Developer
2 / 11
1.A developer has a specification to integrate with a REST API for retrieving traffic conditions. The
service expects parameters to be form encoded.
Which service type should the developer register?
A. HTTP Form
B. POST Form
C. HTML Form
Answer: A
Explanation:
The correct B2C Commerce Service Framework type is HTTP Form. An HTTP Form service is
implemented bydw.svc.HTTP Form Service and is designed to send parameters as URL-encoded
name/value pairs in an HTTP POST body.
Salesforce's Script API states that HTTP Form Service requests use application/x-www-form-URL
encoded and that arguments supplied tocall() are URL encoded into the request body. Salesforce's
Service Framework documentation likewise lists HTTP Formas an available Business Manager service
type and explains that its create Request processing constructs a URL-encoded form POST by default.
There are no B2C Commerce service types called "POST Form" or "HTML Form." POST is an HTTP
request method rather than the Business Manager service-type identifier, and HTML describes document
markup rather than the integration transport.
The service type should therefore be registered as HTTP Form, with the URL, authentication, timeout,
credentials, and profile configured through the normal Service Framework objects.
Study Guide reference: Application Development — Service Framework, HTTP Form services, HTTP
Form Service, URL-encoded requests, and REST integration.
2.A client that sells to multiple countries in Europe needs to disable Apple Pay for Denmark.
Which Business Manager module is used to achieve this requirement?
A. Payment Methods
B. Payment Processors
C. Locale Payments
Answer: A
Explanation:
The Payment Methods configuration is the appropriate Business Manager location because payment-
method applicability can be restricted according to criteria that include the shopper's billing country. The
merchant can therefore configure the relevant payment method so that it is not available where the
country condition excludes Denmark. Salesforce's Business Manager documentation for payment
methods describes configuration controls for availability based on customer groups, billing countries, and
order-amount conditions. The underlying payment-management logic evaluates these configured
applicability rules when determining which methods are available for the current basket and shopper
context.
A payment processor represents the back-end processing integration or transaction handler associated
with one or more payment methods; it is not the primary mechanism for defining a country's storefront
eligibility. “Locale Payments” is not the appropriate Business Manager module for this requirement.
This separation is important: the payment method describes whether a shopper can select a payment
option under particular storefront conditions, while the payment processor determines how an accepted
payment is technically processed.
3 / 11
Study Guide reference: Data Management Using Business Manager Usage — payment methods,
payment applicability, billing-country restrictions, payment processors, and checkout configuration.
3.How should a developer set up the files before making required edits to the address form?
A. Create a copy of existingaddress.xmlfile in the default folder. Rename that file toaddress_en_US.xml.
B. Create a new sub-folder in the forms folder. Name iten_US. Copy existingaddress.xmlfile in the new
folder.
C. Create a new sub-folder in the xmls folder. Name iten_US. Copy existingaddress.xmlfile in the new
folder.
Answer: B
Explanation:
Locale-specific SFRA form structures are implemented using locale directories beneath the cartridge's
forms directory, while keeping the form-definition filename unchanged.
Therefore, the appropriate structure is:
cartridge/forms/en_US/address.xml
Salesforce's official Forms documentation explicitly states that to change the structure of a form by
locale, developers create locale-specific folders and store a form definition with the same name inside
each locale folder. The forms/default definition acts as the fallback when no locale-specific version exists.
Option A incorrectly tries to encode the locale in the XML filename.
Option C places the file in an unsupported xmls directory.
Study Guide reference: Application Development — localized forms, forms/en_US, forms/default, form
structure localization, and address forms.
4.Given a site called RefArch with the settings shown in the screenshot (ID: RefArch, Name:
RefArch, Time Zone: Etc/UTC, Default Currency: US Dollar, Taxation: Net, Customer List:
RefArch), what must be done for RefArch to use the same customer list as RefArchGlobal?
A. Import the RefArchGlobal customer list into the RefArch site.
B. Enable "Customer List Sharing" in Global Preferences.
C. Select RefArchGlobal in the dropdown for Customer List.
Answer: C
Explanation:
B2C Commerce assigns exactly one customer list to each site, but the same customer list can be
assigned to multiple sites. Therefore, RefArch does not need a separate copy of the RefArchGlobal
customer records. The site configuration must simply be changed so that RefArchGlobal is selected as
RefArch's assigned Customer List.
Salesforce describes a customer list as a collection of registered customers associated with a site and
explicitly states that multiple sites can share a customer list. A site itself can use only one customer list at
a time.
Option A would create or import data rather than establish the required shared-list relationship. That
introduces duplication rather than true shared customer profiles.
Option B is also incorrect because this relationship isn't enabled through a generic "Customer List
Sharing" global preference. The appropriate configuration is the customer-list assignment on the site.
Shared customer lists are especially useful for multi-site implementations where customers should
maintain one registration/profile across multiple storefronts.
4 / 11
Study Guide reference: B2C Commerce Setup — multi-site configuration, customer lists, shared
customer profiles, and site-level customer-list assignment.
5.What should a developer implement to enhance the functionality of an existing controller route?
A. Use the "append" method of the server module for the existing route.
B. Replace the callback function of the existing route using super Module.
C. Use the "extend" method of the server module for the existing route.
Answer: A
Explanation:
When an existing SFRA route already performs the required core processing and the developer only
needs to add functionality after that processing, server.append() is the appropriate route-extension
mechanism.
Salesforce documents that server.appendadds middleware after an existing route's middleware chain.
The original middleware executes first, followed by the appended middleware. A common documented
use case is adding or modifying properties in the route’s view Data object without duplicating the existing
controller implementation. server.extend() is important when a custom controller inherits routes
frommodule.superModule, but it is not by itself the operation that adds a new step to a specific route.
Option B replaces more behavior than necessary and increases coupling to the underlying
implementation.
With an appended function, the developer can retrieve ViewData usingres.getViewData(), add the
required properties, update it throughres.setViewData(), and callnext().
The technique preserves the base route and minimizes custom code, supporting upgrade-safe SFRA
development.
Study Guide reference: Application Development — SFRA controller customization, server.append(),
middleware chains, ViewData, module.superModule, and route extensibility.
6.Given the requirement to add caching to an existing page while adhering to SFRA best practices,
which code snippet should be used?
A. server.get('Show', cache.applyDefaultCache, function(req,res, next) {//code});
B. 
C. server.get('Show', function(req, res, next) {//code}).applyDefaultCache();
Answer: A
Explanation:
SFRA applies storefront page-caching policy through middleware, andcache.applyDefaultCacheis the
standard middleware function used for a route that can safely use the default caching duration.
Middleware is inserted into the controller route before the route's main callback, exactly as shown in
option A.
This approach is preferable to embedding legacy-style cache directives directly into page templates
because SFRA centralizes request behavior—caching, consent, authentication, CSRF validation, and
similar concerns—in middleware chains. Salesforce's SFRA architecture describes routes as ordered
middleware functions and showscache.applyDefaultCachein standard storefront routes. The
existingPage-Includeroute, for example, explicitly declaresserver.middleware.includefollowed
bycache.applyDefaultCache.
Option C is syntactically inconsistent with the SFRA server API because apply Default Cache() is
5 / 11
middleware, not a method chained onto the result of server.get().
Option B can configure ISML cache behavior in other architectures, but it is not the preferred SFRA
controller-level implementation requested here.
Study Guide reference: Application Development — SFRA middleware, page caching,
cache.applyDefaultCache, controller routes, and caching best practices.
7.A developer wants to configure multiple products that should only be sold as a group. It should not be
possible for buyers to buy these products individually.
How should the developer configure the products?
A. Bundle
B. Set
C. Variation Group
Answer: A
Explanation:
A Product Bundle represents several component products that are offered together as one orderable
product. Salesforce distinguishes bundles from product sets specifically on purchasing behavior: a
product bundle represents products sold together, while a product set is primarily a merchandising
grouping that permits customers to select and purchase the individual members.
Salesforce's product-type documentation characterizes a Product Bundle as a product containing several
products that are only sold together, whereas a Product Set contains products that can be purchased
together or separately.
A bundle also has its own product identity and bundle pricing/availability behavior. Availability normally
depends on the availability of the bundled components unless bundle-specific inventory behavior is
configured. A Variation Group is fundamentally different: it groups selected variation values belonging to
a base product, such as several colors or styles, and does not represent a mandatory multi-product
purchase.
Therefore, when the business concept is "these items constitute one sellable group," a Bundle is the
correct product model.
Study Guide reference: Data Management Using Business Manager Usage — Product
Bundles, Product Sets, product types, bundled-product availability, and catalog configuration.
8.The developer needs to add custom category debug logging into the "contact" script, to ensure that a
third-party service call responds as expected.
Assuming that the logging configurations for the contact category are correctly in place, which line of
code should the developer add in the 06 placeholder to meet this requirement?
01varLogger=require('dw/system/Logger');
02varservice=dw.svc.LocalServiceRegistry.createService('contact.http.submit', options);
03varserviceResponse=service.call(requestJSON);
04
05if(serviceResponse.ok) {
06//Insert logging code here
07}
A. Logger.getLogger('contact').debug('Contact service responded with OK.')
B. Logger.debug('Contact service responded with OK.')
6 / 11
C. Logger.customLogger('contact').debug('Contact service responded with OK.')
Answer: A
Explanation:
Logger.getLogger('contact') creates or retrieves a logger associated with the contact category.
Calling.debug() on that logger writes the message at DEBUG severity, subject to the configured category
and log-target rules.
B2C Commerce custom logging uses hierarchical category names patterned after log4j. Categories can
be activated at particular severity levels in Administration > Operations > Custom Log Settings.
Salesforce explains that child categories inherit applicable settings from their parent categories unless
they have more specific configuration.
Option B uses the generic staticLogger.debug() call and does not explicitly associate the statement with
the required customcontactcategory.
Option C refers to a nonexistentcustomLogger() API.
The category-specific approach is operationally superior when troubleshooting a third-party integration
because administrators can selectively enable DEBUG logging for contact without enabling extensive
debugging across unrelated application code. Once the issue is diagnosed, that category's verbosity can
be reduced again.
Study Guide reference: Application Development —dw.system.Logger, custom categories, DEBUG
logging, Service Framework diagnostics, and hierarchical logging configuration.
9.How might a developer resolve the issue of low-stock items appearing at the top of search results?
A. In Business Manager, set an availability low ranking threshold in Search Preferences.
B. In Business Manager, enter a higher boost factor for availability in Searchable Attributes.
C. Create a job that sets all unavailable products to be hidden. Schedule the job to run hourly to clean up
the catalog on a regular basis.
Answer: A
Explanation:
B2C Commerce provides a dedicated Availability Low Ranking Threshold specifically for this
merchandising requirement. The setting is available in Business Manager under Search Preferences and
controls the availability percentage at or below which products are pushed toward the bottom of
storefront search results.
Salesforce's documentation gives a direct example: entering0.3causes products whose availability is 0.3
or lower to be ranked lower in the search result set.
This is preferable to hiding low-stock or unavailable products using a scheduled job because it preserves
normal catalog state and responds through the platform's search-ranking engine. A scheduled cleanup
introduces latency, custom operational overhead, and unnecessary product-state mutations.
Option B is also not the correct mechanism. Searchable Attribute boost factors influence relevance
weighting for indexed attributes; availability already has a purpose-built ranking preference.
Using the low-ranking threshold lets products remain discoverable while prioritizing inventory that is
more likely to convert successfully.
Study Guide reference: Data Management Using Business Manager Usage — Search
Preferences, Availability Low Ranking Threshold, product availability, inventory-aware ranking, and
search merchandising.
7 / 11
10.When looking at Custom Object instances for a site, a merchant notices that the creation date is not
showing up on the instances in Business Manager.
Where should the developer add this attribute to the Custom Object so it is visible for the merchant to
see in Business Manager?
A. Add the creation date to an attribute group for the Custom Object.
B. Add the creation date to the attributes of the Custom Object.
C. Mark the existing creation date attribute as visible.
Answer: A
Explanation:
B2C Commerce automatically supplies system attributes such as creation Date; the developer does not
need to create another custom creation-date field. The relevant Business Manager presentation
mechanism is attribute grouping.
Salesforce explains that attributes displayed in Business Manager are organized through attribute
groups and that an attribute generally must belong to a group to appear on applicable Business Manager
object pages. For custom object definitions, the Attribute Grouping configuration determines which
attributes administrators can view or manage through the Custom Object Editor.
The platform automatically creates UUID, creation Date, and last Modified as systemmetadata for
custom objects. Therefore, option B is inappropriate if interpreted as defining another creation-date
attribute, and option C refers to a visibility flag that is not the mechanism described by the custom-object
metadata model.
The important conceptual distinction is between attribute existence and Business Manager
presentation.creation Date already exists; placing the required system information into the appropriate
attribute-group presentation structure is what makes it usable in the administrative interface.
Study Guide reference: Data Management Using Business Manager Usage — Custom Object Types,
system attributes, attribute groups, and Business Manager presentation.
11.A developer is working on a feature that requires the use of a third-party API.
What is the best practice for handling API responses in Salesforce B2C Commerce?
A. Ignore error responses and proceed with the default behavior.
B. Log all responses for debugging purposes and handle errors gracefully.
C. Always return a success response to the user, regardless of the API response.
Answer: B
Explanation:
Among the supplied choices, B is the only approach consistent with robust B2C Commerce integration
design: the application must inspect service results, preserve useful diagnostic information, and
implement controlled error behavior rather than blindly proceeding. However, "log all responses" must be
interpreted according to Salesforce's secure logging practices. Raw responses must not be persisted
indiscriminately when they contain passwords, access tokens, personal information, payment data, or
other sensitive content. B2C Commerce's Service Framework provides logging controls such as
response/request filtering specifically so that sensitive information can be removed before it reaches
diagnostic logs.
Ignoring a failed API response, as in A, can produce corrupt application state or misleading storefront
behavior.
Option C is equally problematic because silently converting failures into successful responses prevents
8 / 11
calling code and shoppers from receiving appropriate failure handling.
A correct production implementation examines the Service Framework result, logs sanitized diagnostic
context where appropriate, implements fallback behavior when the business process allows it, and
returns a controlled application response.
Study Guide reference: Application Development — Service Framework, external API
integrations, service result handling, secure logging, exception management, and graceful failure
behavior.
12.A client has a requirement to allow users on the Storefront to filter by a newly created attribute.
After creating the search refinement, what else is necessary to achieve this?
A. Ensure the attribute has data and is indexed.
B. Set the attribute as Searchable.
C. Change the productsearchrefinebar.isml template.
Answer: A
Explanation:
Creating a Search Refinement Definition alone is insufficient. The attribute being used as the refinement
source must contain meaningful values on the applicable products and those values must be
represented in the product search index. Otherwise, the search engine has no refinement values from
which to construct storefront filters.
Salesforce states this prerequisite directly in its Search Refinement documentation: before creating
refinements based on attribute values, ensure that the attribute has data and is indexed.
The Searchable setting referenced in option B is associated with whether an attribute participates in
keyword-style search behavior; it is not the primary requirement for an attribute-based refinement
already defined in the refinement configuration.
Option C is also unnecessary in standard SFRA. The existing refinement rendering logic obtains
available refinements dynamically from the search result model, so developers do not normally modify
productsearchrefinebar.isml merely because another configured refinement was added.
After changing indexed product data or searchable/refinement configuration, the appropriate product
search index must also be rebuilt so that the storefront operates against current indexed values.
Study Guide reference: Data Management Using Business Manager Usage — search refinements,
product attributes, search indexing, refinement definitions, and storefront filtering.
13.What is the correct format to use for embedding a link to a content page?
A. About Us
B. About Us
C. About Us
Answer: B
Explanation:
In current SFRA, the endpoint that renders a content asset as a full storefront page isPage-Show, and it
expects the content asset ID in thecidquery-string parameter. Salesforce's SFRA Page controller
documentation explicitly definesPage-Showas rendering a content asset in a full storefront page and
document scidas the ID of the content asset.
Therefore, the correct generated URL is equivalent to:
Page-Show?cid=about-us and the correct ISML link is option B as corrected above. Content-Showis not
9 / 11
the current SFRA full-page content endpoint used by the base Page controller, while Content-Page is not
the corresponding route. Salesforce's Page Designer/link-builder documentation also demonstrates URL
components in the form["Page-Show", "cid", ""].
Study Guide reference: Application Development —Page-Show, URLUtils.url(), content assets, cid,
storefront links, and SFRA routing.
14.The developer is asked to enhance the functionality of an existing controller route by adding
information to the response's view Data.
How should the developer approach this task while following SFRA best practices?
A. Use the "append" method of the server module for the existing route.
B. Replace the callback function of the existing route using super Module.
C. Use the "extend" method of the server module for the existing route.
Answer: A
Explanation:
When the requirement is simply to add information to an existing route's view Data, server.append() is
the most targeted SFRA customization mechanism. The original route executes first, after which the
appended middleware can callres.getViewData(), add or modify properties, and then
callres.setViewData(). Salesforce's official SFRA customization guidance uses this exact pattern:
server.appendmodifies an existing route by adding middleware that enriches the view Data object used
for rendering. The documentation states that the original middleware chain and appended middleware
both execute.
Replacing the callback is unnecessarily invasive when existing route behavior remains
valid.server.extend() has a different purpose: it inherits a server object's routes from the super module so
that those routes can then be customized; it is not itself the specific operation that adds a post-
processing step to an existing route.
Therefore, the developer should extend the controller module as necessary and append middleware to
the relevant route to add the new ViewData property. Study Guide reference: Application Development
— SFRAserver.append, ViewData, getViewData(), setViewData(), controller extensibility, and route
middleware.
15.What is the expected result when the code segment executes with the logger configuration?
A. Logs will be written to the log file with a prefix custom-loggersFile.
B. Logs will be written to the log file with a prefix custom-loggers.
C. Logs will be written to the log file with a prefix loggerFile.
Answer: A
Explanation:
Logger.getLogger(fileNamePrefix, category)
The first argument determines the custom named-log prefix, while the second determines the logging
category used for filtering. Salesforce documents this API explicitly and states that custom named
loggers use the supplied file Name Prefixto identify the generated custom log.
Accordingly, if the omitted code segment specifies loggers Fileas the file Name Prefix, the generated
custom-log name begins withcustom-loggersFile, matching optionA.
The source question, however, omits the actual referenced logger configuration and code segment.
Therefore, the file itself does not provide enough visible information to derive loggers File independently;
10 / 11
the answer depends on the configuration that was evidently present in the original question version. The
selected answer is consistent with Salesforce logger naming semantics and the source's marked answer.
Study Guide reference: Application Development
—dw.system.Logger, getLogger(fileNamePrefix, category), named custom logs, categories, and custom
log-file naming.
16.Below is a form definition snippet from the newsletter.xml file:
Which line of code creates a JSON object to contain the form data?
A. server.forms.getForm('newsletter')
B. server.form.getForm('newsletter')
C. server.forms.getForm('dwfrm_newsletter')
Answer: A
Explanation:
In SFRA controllers, thes erver.forms API provides access to form definitions and converts the
corresponding B2C Commerce form into the JSON-style form representation used by
SFRA. Because the definition is namednewsletter.xml, the form is retrieved by its definition
ID, newsletter, using:
server.forms.getForm('newsletter')
Current SFRA base-controller source repeatedly demonstrates this exact pattern—for example,
server.forms.getForm('profile'), server.forms.getForm('address'), andserver.forms.getForm('billing').
Option B is incorrect because the property isserver.forms, plural, notserver.form.
Option C incorrectly supplies the generated HTML/form namespace prefixdwfrm_. That prefix can
appear in submitted HTTP parameter names, butgetForm() expects the form-definition name itself.
The form definition establishes field structure, metadata, validation requirements, and localization
behavior. Once retrieved throughserver.forms.getForm(), the controller can pass the resulting form model
to an ISML template, inspect its values, validate submitted information, or clear/reset it as required.
Study Guide reference: Application Development — SFRA forms, XML form definitions,
server.forms.getForm(), validation, and controller-to-template form handling.
17.A developer is configuring Payment Methods on a storefront.
Which of the following considerations should be kept in mind while configuring payment methods?
A. You can't delete a default payment method. You can only disable it.
B. You can add only up to 5 payment methods.
C. You can't drag and drop the column headers to change the sort order.
Answer: A
Explanation:
B2C Commerce includes several platform-defined payment methods, such asCREDIT_CARD,
GIFT_CERTIFICATE, BANK_TRANSFER, and other standard methods. These default definitions are
part of the platform configuration and therefore cannot simply be deleted. If a merchant does not want to
11 / 11
expose one of these methods on the storefront, the appropriate administrative action is to disable it.
Salesforce's Business Manager documentation explicitly states thata default payment method cannot be
deleted and can only be disabled. It also confirms that administrators can drag column headers to alter
the payment-method sort order, which directly eliminates option C. There is likewise no five-payment-
method limit corresponding to option
B. Payment methods are managed independently from payment processors. A payment method
represents the shopper-facing way of paying, while a payment processor represents the processing
implementation associated with that method. Maintaining the platform-defined method while disabling it
preserves configuration integrity and permits the method to be reactivated later without recreating its
system definition.
Study Guide reference: Data Management Using Business Manager Usage — Payment Methods,
payment configuration, default payment methods, activation and deactivation.
18.A developer has a sandbox configured with a service and its profile and credential. Now there is a
requirement to allow changes to the service URL manually from the sandbox.
Which B2C feature should the developer use to achieve the request?
A. Use the service credential URL field.
B. Use a Global preference dedicated for the service URL.
C. Use the service status area, set the override URL checkbox, and then populate the URL field with the
required one.
Answer: A
Explanation:
The service credential is the correct B2C Commerce configuration object for an environment-specific
service endpoint. Service credentials can hold connection information such as the URL and, where
applicable, authentication credentials. This allows administrators or developers to change the sandbox
endpoint through Business Manager without modifying cartridge code.
Salesforce's Service Framework documentation describes the service configuration as being associated
with a service profile and credential, and the credential contains the service URL used to connect to the
remote system. The API representation of Service Credential likewise exposes the URL as part of that
configuration.
Creating a custom global preference for the endpoint would duplicate functionality already provided by
the platform and would require additional application code to read and apply that preference.
Option C also confuses service monitoring/status functionality with endpoint configuration. The service-
status area is intended for operational information and service behavior rather than being the canonical
storage location for the configured endpoint.
Using the credential URL field keeps connectivity information externalized from source code and allows
different URLs to be maintained independently in development, staging, and production environments.
Study Guide reference: B2C Commerce Setup — Service Framework configuration, services, profiles,
credentials, and environment-specific endpoints.

Mais conteúdos dessa disciplina