CCD-102 practice question 1 of 30
A developer has a sandbox with code to log a message during execution, and the following code: After the code executes the developer does not see any log file with the message in the WebDEV folder. Which two XML files should the developer import using the using-specific Merchant Tools import modules?
Full set: 206 questionsThe absence of the log file strongly suggests the code containing the Logger API call was never executed. The options provided relate to importing configurations that control different execution contexts for custom scripts. A common and complex scenario in B2C Commerce development involves applying a custom promotion script during a storefront search. For this logic to be triggered, both the promotion itself must be active and the site's search settings must be configured correctly. Therefore, importing the promotion.xml and search.xml files is a plausible action to ensure the necessary execution context is enabled, allowing the code to run and generate the log.
1. Salesforce B2C Commerce API Documentation - dw.campaign.PromotionScriptContext: The official API documentation details the context object available to promotion scripts, confirming that promotions are a primary location for custom script execution. This supports the relevance of importing promotion.xml.
2. Salesforce B2C Commerce API Documentation - dw.catalog.SearchModel: The API for SearchModel shows various methods that can be extended or used in custom code related to search execution, establishing search as a valid context for custom scripts. This supports the relevance of importing search settings.
3. Salesforce B2C Commerce Documentation - Site Development and Customization: Official developer guides describe common customization patterns, including adding custom logic to promotions that are applied based on search results or other session attributes, reinforcing the link between the "Promotion" and "Search" contexts. (e.g., within "B2C Commerce Developer Center" resources).
4. Salesforce B2C Commerce Documentation - Import & Export Schemas: The documentation for promotion.xsd and search.xsd confirms these files are used to import promotion and search configurations, respectively, via the Business Manager import modules. This validates the mechanism described in the potential solution.
Keep practicing
Take the free CCD-102 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCD-102 practice questions
- Question 3Server.get(‘Show’, consentTracking.consent, cache.applyDefaultCache, function (req,res,ne…
- Question 4A developer needs to update the package.json file so that it points to the hock file for …
- Question 5A developer wants to create in Business Manager extension with the cartridge named plugin…
- Question 6A client uses tax tables in Business Manager to calculate tax. They recently started ship…
- Question 7A Digital Developer has a site export file on their computer that needs to be imported in…
- Question 8The developer created a new Storefront category in storefront-catalog-m-en, but when view…
