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 questions
Answer options
A: Search settings and Promotion Correct answer
B: Search settings and Site Jobs
C: Promotions and Site jobs
Correct Answer:
A. Search settings and Promotion
Explanation

The 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.

References

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.

Scroll to Top