[2024年03月20日] 365日更新、有効なB2B-Commerce-Developer知能問題集 [Q16-Q34]

Share

[2024年03月20日] 365日更新、有効なB2B-Commerce-Developer知能問題集

ベスト品質のB2B-Commerce-Developer試験問題集でSalesforceテスト高得点を目指そう


Salesforce B2B-Commerce-Developer試験に合格するためには、個人はSalesforce B2B Commerceのしっかりとした理解を持ち、プラットフォームを使用した経験が必要です。さらに、個人はApex、Visualforce、およびJavaScriptを使用したアプリケーションの開発経験がある必要があります。試験は60問の多肢選択問題から構成され、105分以内に完了する必要があります。試験に合格すると、Salesforce Accredited B2B Commerce Developer認定資格を取得し、Salesforceプラットフォームを使用したB2B eコマースソリューションを開発に興味があるすべての人にとって貴重な資格となります。

 

質問 # 16
Salesforce B2B leverages global API's for encapsulating business logic into blocks that can be extended and modified by subscribers. Which three statements are true regarding extending ccServiceProduct and exposing custom fields on the Product Detail Page? (3 answers)

  • A. Ensure that any helper methods are defined as private and static only.
  • B. Create a global with sharing class that extends ccrz.ccServiceProduct.
  • C. Create a public with sharing class that extends ccrz.ccServiceProduct.
  • D. Override the fetch method and add your subscriber specific code here.
  • E. Override the getFieldsMap method and add subscriber specific code.

正解:B、D、E


質問 # 17
Which three actions are applicable when modifying the number of steps required in the Salesforce Commerce Checkout flow? (3 answers)

  • A. Perform a template override on the Checkout page.
  • B. Set the value of the configuration setting defined as CO.useDef to TRUE
  • C. Add a page include to the checkout page.
  • D. Build and activate a new configuration cache setting via CC admin.
  • E. Set the value of the configuration setting defined as CO.overrideFlow to TRUE.

正解:A、D、E

解説:
Three actions that are applicable when modifying the number of steps required in the Salesforce Commerce Checkout flow are:
Perform a template override on the Checkout page. This action will allow you to change the structure and content of the Checkout page, such as adding or removing sections, widgets, or fields. For example, you can override the checkout.handlebars template and modify it according to your requirements.
Set the value of the configuration setting defined as CO.overrideFlow to TRUE. This setting will enable you to use your own custom checkout flow instead of the default one. You need to set this value to true before you can modify the checkout flow.
Set the value of the configuration setting defined as CO.useDef to TRUE. This setting will enable you to use a single-page checkout flow instead of a multi-step checkout flow. You need to set this value to true if you want to reduce the number of steps in the checkout flow to one. Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Checkout Flow


質問 # 18
In checkout, what event should the developer's code listen for in order to help troubleshoot and respond to actions?

  • A. CommerceDiagnosticEvents
  • B. CommerceBubbleEvents
  • C. CommerceErrorEvents
  • D. CommerceActionEvents

正解:A

解説:
To help troubleshoot and respond to actions in checkout, the developer's code should listen for CommerceDiagnosticEvents. CommerceDiagnosticEvents is an event that is fired by Salesforce B2B Commerce when an error occurs in the storefront. CommerceDiagnosticEvents contains information about the error, such as error code, error message, error type, and error details. CommerceDiagnosticEvents can be subscribed by other components or services that want to handle or display the error information in different ways. The developer's code can listen for CommerceDiagnosticEvents using an aura:handler tag in Aura Components or an @wire decorator in Lightning web components. The developer's code can also use the event information to perform custom logic or actions based on the error, such as logging, reporting, or notifying. CommerceBubbleEvents is not an event that the developer's code should listen for in checkout, as it is not related to troubleshooting or responding to actions. CommerceBubbleEvents is an event that is fired by Salesforce B2B Commerce when a user interacts with a bubble component in the storefront. A bubble component is a user interface element that displays information or options in a pop-up window when clicked or hovered over. CommerceBubbleEvents contains information about the user interaction, such as bubble name, bubble type, and bubble value. CommerceErrorEvents is not an event that the developer's code should listen for in checkout either, as it is not related to troubleshooting or responding to actions. CommerceErrorEvents is an event that is fired by Salesforce B2B Commerce when a validation error occurs in the storefront. CommerceErrorEvents contains information about the validation error, such as field name, field label, and error message. CommerceActionEvents is not an event that the developer's code should listen for in checkout either, as it is not related to troubleshooting or responding to actions. CommerceActionEvents is an event that is fired by Salesforce B2B Commerce when a user performs an action in the storefront. CommerceActionEvents contains information about the user action, such as action name, action type, and action parameters. Salesforce Reference: B2B Commerce Developer Guide: Handle Errors, B2B Commerce Developer Guide: Handle User Interactions with Bubble Components, B2B Commerce Developer Guide: Handle Validation Errors, B2B Commerce Developer Guide: Handle User Actions


質問 # 19
Which two usages of ccLog should be avoided in Salesforce B2B Commerce? (2 answers)

  • A. crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrder', myOrder), where myOrder is an order object
  • B. crz.ccLog.log(System.LoggingLevel.WARN, 'D:something', 'Something unexpected occurred: The data we were expecting for pl was not there,')
  • C. ccrz.ccLog.log(System.LoggingLevel.ERROR, 'D:something', myCallToGetMessage(pl) ), where myCallToGetMessage(pl) is a method invocation
  • D. crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrderList', myOrderList), where myOrderList is a list of orders

正解:B、C


質問 # 20
What is default behavior for how theSalesforce B2B Commerce Global APIs transform Salesforce data?

  • A. Fields names are returned with a lowercase first letter,camelcase convention
  • B. Fields names can be mapped to any naming convention desired
  • C. Fields names are returned with ;c." prepended in their name.
  • D. Fields names are returned using the Salesforce naming convention.

正解:A

解説:
The default behavior for how the Salesforce B2B Commerce Global APIs transform Salesforce data is to return field names with a lowercase first letter, camelcase convention. For example, the field name ccrz__E_Product__c in Salesforce will be transformed to eProduct in the API. This is done to follow the JavaScript naming convention and to avoid conflicts with the standard Salesforce fields and relationships. Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Query Transformation


質問 # 21
A configuration value, CO.NewOrder, is set to TRUE. What is one way of
preventing an existing payment page from being shown on the checkout payment page?

  • A. Remove the value matching the page name from the pmt.whitelist configuration setting, then rebuild and activate a new Configuration cache
  • B. Remove the payment type associated with the payment page from CO.pmts, then rebuild and activate a new cache.
  • C. Override the front end template and modify the way the embedded payment page gets loaded from the payment list configuration.
  • D. Delete the Visualforce page from the code base.

正解:A


質問 # 22
Where is the API-based record creation generally handled in Salesforce B2B Commerce?

  • A. In the methods available in extension hooks
  • B. The service-layer responsible for the entity
  • C. Logic classes that implement the business logic for create operations
  • D. Data creation is not allowed

正解:B


質問 # 23
Which method needs to be implemented when rendering a Salesforce B2B
Commerce view in order to have it called after rendering has finished?

  • A. postRender()
  • B. afterRender()
  • C. onRender()
  • D. There are no methods called on the view after rendering has finished

正解:A

解説:
Explanation
The method that needs to be implemented when rendering a Salesforce B2B Commerce view in order to have it called after rendering has finished is postRender. This method is an optional hook that can be defined by the user to perform any actions or logic that depend on the view being rendered, such as initializing widgets, binding events, or updating the user interface. The method will be called by the render method of the CCRZ.View class, which is the base class for all views in the framework. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, View Class


質問 # 24
The sizing keys used in the Salesforce B2B Commerce Global APIs five distinct operations. What are three of these operations? (3 answers)

  • A. Refetch data (used on some Logic classes)
  • B. Override static DAO classes and methods
  • C. Object type casting
  • D. Related Query to call (sub queries or direct queries)
  • E. Return formats as Map<String, Object> or SObjects lists

正解:A、C、D

解説:
The sizing keys used in the Salesforce B2B Commerce Global APIs perform five distinct operations. Three of these operations are:
Refetch data (used on some Logic classes): This operation indicates that the data should be refetched from the database instead of using the cached data. For example, ccrz.ccServiceCart.getCart(ccrz.ccAPI.SZ_REFETCH) will refetch the cart data and refresh the cache.
Related Query to call (sub queries or direct queries): This operation indicates that the related entities should be retrieved by using sub queries or direct queries. For example, ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_SUBQUERY) will use sub queries to fetch the related entities for each product, while ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_DIRECTQUERY) will use direct queries to fetch the related entities separately.
Object type casting: This operation indicates that the data should be cast to a specific object type. For example, ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_SOBJECT) will cast the data to sObjects instead of transformed objects. Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Data Sizing Conventions


質問 # 25
The ccUtil apex class in Salesforce B2B Commerce provides numerous utility functions that can be leveraged in subscriber classes.
What are two ways to check the input or return data of the Global API's? (2 answers)

  • A. ccrz.ccUtil.isEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(List<Object>)
  • B. ccrz.ccUtil.isValid(Map<String, Object>) and ccrz.ccUtil.isValid(List<Object>)
  • C. ccrz.ccUtil.isNotEmpty(Map<String, Object>) and
    ccrz.ccUtil.isNotEmpty(List<Object>)
  • D. ccrz.ccUtil.isNotValid(Map<String, Object>) and
    ccrz.ccUtil.isNotValid(List<Object>)

正解:A、C


質問 # 26
A developer is working on a storefront and is seeing unexpected Ul behavior in one of the custom Lightning web components (LWCs) their team has built.
How should the developer investigate the issue?

  • A. Identify the user, inputs, and failure, then ask Salesforce support to investigate the issue with the custom LWC.
  • B. Enable debug logs for a storefront user, log in to storefront and perform action, and view debug logs in Setup.
  • C. Enable Debug Mode for a storefront user, load the LWC in Visual Studio (VS) Code, attach to session, and view debug logs in VS Code.
  • D. Enable Debug Mode for a storefront user, log in to the storefront, and use Browser Inspection tools and debugger points.

正解:D

解説:
To investigate the issue of seeing unexpected UI behavior in one of the custom Lightning web components (LWCs) their team has built, the developer should enable Debug Mode for a storefront user, log in to the storefront, and use Browser Inspection tools and debugger points. Debug Mode is a feature that allows developers to debug and troubleshoot custom LWCs in the storefront by disabling performance optimizations and enabling source maps. Source maps are files that map the minified or obfuscated code to the original source code, making it easier to read and debug. To enable Debug Mode for a storefront user, the developer can go to Setup, enter Users in the Quick Find box, select Users, click Edit next to the user name, and select Debug Mode. After enabling Debug Mode, the developer can log in to the storefront as the user and use Browser Inspection tools and debugger points to inspect and debug the custom LWC. Browser Inspection tools are tools that are built into web browsers that allow developers to examine and modify the HTML, CSS, JavaScript, and other aspects of a web page. Debugger points are statements that are added to the JavaScript code of a LWC that pause the execution of the code at a certain point and allow the developer to inspect the values of variables, expressions, and other elements. Enable Debug Mode for a storefront user, load the LWC in Visual Studio (VS) Code, attach to session, and view debug logs in VS Code is not a valid way to investigate the issue of seeing unexpected UI behavior in one of the custom LWCs their team has built, as it is not possible to attach to a session or view debug logs for LWCs in VS Code. Enable debug logs for a storefront user, log in to storefront and perform action, and view debug logs in Setup is not a valid way either, as debug logs do not capture information about LWCs or UI behavior. Debug logs are records of database operations, system processes, and errors that occur when executing a transaction or running unit tests. Identify the user, inputs, and failure, then ask Salesforce support to investigate the issue with the custom LWC is not a valid way either, as it is not a recommended or efficient way of debugging or troubleshooting custom LWCs. Salesforce support may not be able to provide assistance or guidance for custom LWCs that are developed by third-party developers. Salesforce Reference: B2B Commerce Developer Guide: Debug Lightning Web Components, Lightning Web Components Developer Guide: Debug Your Code, Salesforce Help: Debug Logs


質問 # 27
A developer needs to implement a custom Lightning web component (LWC) for the storefront.
The LWC contains language-specific text values.
How should the developer translate the text values?

  • A. Create a custom Metadata object for the text values and query it in the LWC.
  • B. Import static resources for the text values and add them into the LWC.
  • C. Create custom labels for the text values and import them in the LWC.
  • D. Use a CustomLabel xml file in the LWC to add the text values there.

正解:C

解説:
Explanation
Custom labels are text values that can be translated into any language that Salesforce supports. They are useful for displaying language-specific text in Lightning web components. To use custom labels in a LWC, the developer needs to create them in the Setup menu and assign them to a language and a value. Then, the developer can import them in the LWC using the @salesforce/label scoped module. For example, if the developer has a custom label named welcomeHeader, they can import it as follows:
import welcomeHeader from '@salesforce/label/c.welcomeHeader';
Then, they can use it in the HTML template or the JavaScript file of the LWC. For example, in the HTML template, they can use it as follows:
HTMLAI-generated code. Review and use carefully. More info on FAQ.
<template>
<h1>{welcomeHeader}</h1>
</template>
The custom label will automatically display the translated value based on the user's language preference. The developer can also use the lightning-formatted-text component to format the custom label value with HTML tags.
The other options are not correct because:
* A. Importing static resources for the text values is not a recommended way to translate text values in a LWC. Static resources are files that are stored in Salesforce and can be referenced by applications. They are not designed for storing language-specific text values and they do not support automatic translation based on the user's language preference.
* B. Using a CustomLabel xml file in the LWC to add the text values there is not a valid option. Custom labels are not stored in xml files, but in the Setup menu. They cannot be added directly to the LWC, but they need to be imported using the @salesforce/label scoped module.
* D. Creating a custom Metadata object for the text values and querying it in the LWC is not a feasible option. Custom Metadata objects are records that store configuration data that can be deployed and packaged. They are not intended for storing language-specific text values and they do not support automatic translation based on the user's language preference. Querying them in the LWC would also require an Apex class and a wire service, which would add unnecessary complexity to the solution.
References:
* Use Custom Labels in Lightning Web Components
* Custom Labels
* Internationalizing Your Lightning Web Component (LWC)


質問 # 28
While working on a commerce rollout, a developer needs to update the checkout process so that buyers can purchase with one of the below payment types.
* Credit Card
* Purchase Order
* Contract Now & Pay Later
Additionally, the developer needs to show only Purchase Order and Contract Now & Pay Later if a custom checkbox field on the account is checked.
How should the developer meet these requirements?

  • A. Create a custom Lightning web component that can be used with the standard payment component. Use a publish-<g, subscribe (pub-sub) model to listen to events from the standard component to determine which additional payment options should be shown.
  • B. Create a custom Lightning web component for the checkout flow that has all the options available.
    Within that component, pull data from the account to determine which options to show.
  • C. Add a new payment gateway through the reference implementation steps so the payment shows up on the checkout payment screen. Configure the different payment options required.
  • D. Modify the standard payment component settings in the checkout screen flow and add the new payment method. Use the component visibility feature in screen flows to fulfill the account-based payment option criteria.

正解:B

解説:
Explanation
To update the checkout process so that buyers can purchase with one of the below payment types:
* Credit Card
* Purchase Order
* Contract Now & Pay Later Additionally, show only Purchase Order and Contract Now & Pay Later if a custom checkbox field on the account is checked, a developer should create a custom Lightning web component for the checkout flow that has all the options available. Within that component, pull data from the account to determine which options to show. Creating a custom Lightning web component for the checkout flow allows the developer to define custom logic and user interface for processing payments using different payment types. The developer can use Apex methods or third-party APIs to integrate with payment service providers or payment gateways and handle payment authorization, capture, void, and refund. The developer can also use @wire or @api decorators to get data from the account object and use its properties, such as the custom checkbox field, to determine which payment options to show or hide based on business logic. Creating a custom Lightning web component that can be used with the standard payment component is not a valid way to meet this requirement, as it does not allow the developer to replace or modify the standard payment component's logic or user interface.
Modifying the standard payment component settings in the checkout screen flow and adding the new payment method is not a valid way either, as it does not allow the developer to add custom payment types or conditional logic based on account data. Adding a new payment gateway through the reference implementation steps so the payment shows up on the checkout payment screen is not a valid way either, as it does not allow the developer to add multiple payment options or conditional logic based on account data. Salesforce References: B2B Commerce Developer Guide: Payment Integration, B2B Commerce Developer Guide: Payment Component, B2B Commerce Developer Guide: Checkout Subflow


質問 # 29
An administrator has just provided a developer with a completely new org and a username. Assuming the username is [email protected], what is the correct set of steps to authorize the org for Command Line Interface (CLI) access so the developer can deploy Lightning web components?

  • A. Run the command 'sfdx force:auth:web:login -a "https://login.salesforce.com'"' and then supply the credentials in the browser when it opens.
  • B. Run the command: 'sfdx force:auth:web:login -r "https://login.salesforce.com" and then supply the credentials in the ^ browser when it opens ^
  • C. Run the command 'sfdx force:auth:web:login -r "https://login.salesforce.com" -username^'mefaJmy-new-org.org"'
  • D. Run the command: 'sfdx force:login -r "https://login.salesforce.com'' and supply the credentials in the browser when it opens.

正解:B

解説:
To authorize the org for Command Line Interface (CLI) access so the developer can deploy Lightning web components, the developer should run the command: 'sfdx force:auth:web:login -r "https://login.salesforce.com" and then supply the credentials in the browser when it opens. The sfdx force:auth:web:login command is a Salesforce CLI command that authorizes an org using the web server flow. The web server flow is an OAuth 2.0 authentication flow that opens a browser window and prompts the user to log in to Salesforce and allow access to the CLI. The -r flag specifies the login URL of the org, which is https://login.salesforce.com for production or developer orgs. Running this command will open a browser window and ask the developer to enter their username and password for the org. After successfully logging in, the developer will be able to use the CLI to perform various tasks with the org, such as deploying or retrieving metadata, running tests, or executing commands. Running the command: 'sfdx force:login -r "https://login.salesforce.com" is not a valid way to authorize the org for CLI access, as there is no such command as sfdx force:login. Running the command 'sfdx force:auth:web:login -a "https://login.salesforce.com"' is not a valid way either, as the -a flag specifies an alias for the org, not a login URL. Running the command 'sfdx force:auth:web:login -r "https://login.salesforce.com" -username'[email protected]"' is not a valid way either, as there is no such flag as -username. Salesforce Reference: Salesforce CLI Command Reference: force:auth:web:login, Salesforce Developer Tools for Visual Studio Code


質問 # 30
A developer has been working on the flow of an Inventory Class for checkout. The developer has handled all the error states and now needs to indicate that inventory is available for all items and amounts in the cart.
Which step should happen next?

  • A. Return sfdc_checkout.lntegrationStatus.Status.SUCCESS
  • B. Return sfdc.checkout.lnventoryStatus.SUCCESS
  • C. Return sfdc.checkout.lnventoryStatus.Status.SUCCESS
  • D. Return TRUE

正解:C

解説:
To indicate that inventory is available for all items and amounts in the cart, the developer should return sfdc.checkout.InventoryStatus.Status.SUCCESS. The sfdc.checkout.InventoryStatus.Status.SUCCESS is a constant value that represents a successful inventory status. It means that the inventory class has checked the availability of all the products in the cart and confirmed that they are in stock and can be fulfilled. The developer should use this value as the return value of the checkInventory method, which is a method that implements the sfdc.checkout.InventoryCheck interface. The checkInventory method is invoked during the checkout flow to validate the inventory availability of the products in the cart. Returning TRUE is not a valid way to indicate inventory availability, as it is not a valid inventory status value. Returning sfdc_checkout.IntegrationStatus.Status.SUCCESS is not a valid way either, as it is not an inventory status value, but rather an integration status value. Returning sfdc.checkout.InventoryStatus.SUCCESS is not a valid way either, as it is not a valid syntax for accessing the inventory status value. Salesforce Reference: B2B Commerce Developer Guide: Inventory Integration, B2B Commerce Developer Guide: Inventory Status Enum, B2B Commerce Developer Guide: Inventory Check Interface


質問 # 31
Numerous flags ... have a directimpact on the result set provided by the Global API's. What Global API Data-Sizing convention flag prevents an API request from propagating to further requests when provided as a Boolean parameter with a value of true?

  • A. ccrz.ccAPISizing.REL
  • B. ccrz.ccAPI.SZ_ASSC
  • C. ccrz.ccAPISizing.ASSC
  • D. ccrz.ccAPI.SZ_REL

正解:B

解説:
Explanation
The Global API Data-Sizing convention flag that prevents an API request from propagating to further requests when provided as a Boolean parameter with a value of true is ccrz.ccAPI.SZ_ASSC. This flag indicates that only one API request should be executed with the specified sizing block, and any subsequent requests should use their own default sizing blocks. For example, ccrz.ccServiceCart.getCart(ccrz.ccAPI.SZ_L,true) will use the SZ_L sizing block for retrieving the cart data, but any other requests that are triggered by this method will use their own default sizing blocks. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, Data Sizing Conventions


質問 # 32
Where are handlebar Templates defined in the Cloudcraze managed package?

  • A. Page Settings configuration
  • B. cc_hk_UserInterface extension
  • C. Configuration Setting configuration
  • D. uiProperties file

正解:D

解説:
Handlebar Templates are defined in the uiProperties file in the cloudcraze managed package. This file contains various properties that control the behavior and appearance of the user interface components. The handlebarTemplates property defines a map of template names and template contents that are used by the handlebars.js templating engine to generate HTML from JSON data. Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, UI Properties, Handlebars Templates


質問 # 33
While in the process of gathering requirements from a customer about how they would like to set up their net new storefront checkout experience, a consultant learns that the customer needs the ability to add new shipping and billing addresses during checkout.
Which approach should a developer take to meet this requirement?

  • A. Enable Buyer Managed Contact Point Addresses within Commerce Administration.
  • B. Create a Lightning web component that enables this functionality and replaces the current shipping address screen within the Checkout subflow.
  • C. Enable Buyer Managed Contact Point Addresses within the Shipping Address standard component in the Checkout subflow.
  • D. Create a new shipping address checkout subflow that utilizes the Buyer Managed Contact Point Addresses component.

正解:C

解説:
Explanation
To enable the ability to add new shipping and billing addresses during checkout, a developer should enable Buyer Managed Contact Point Addresses within the Shipping Address standard component in the Checkout subflow. The Buyer Managed Contact Point Addresses is a feature that allows customers to add, edit, or delete their shipping and billing addresses during checkout. The developer can enable this feature bysetting the buyerManagedContactPointAddressesEnabled attribute to true in the Shipping Address standard component in the Checkout subflow. The Shipping Address standard component is a component that displays and collects the shipping address information for the cart or order. The Checkout subflow is a subflow that defines the steps and components for the checkout process in the storefront. Creating a new shipping address checkout subflow that utilizes the Buyer Managed Contact Point Addresses component is not a valid way to enable this feature, as there is no such component as Buyer Managed Contact Point Addresses. Enabling Buyer Managed Contact Point Addresses within Commerce Administration is not a valid way either, as this feature is not configurable in Commerce Administration. Creating a Lightning web component that enables this functionality and replaces the current shipping address screen within the Checkout subflow is not a valid way either, as this is unnecessary and complicated when there is already a standard component that supports this feature. Salesforce References: [B2B Commerce Developer Guide: Buyer Managed Contact Point Addresses],
[B2B Commerce Developer Guide: Shipping Address Component], [B2B Commerce Developer Guide:
Checkout Subflow]


質問 # 34
......

注目すべき時短になるB2B-Commerce-Developerオールインワン試験ガイド:https://www.passtest.jp/Salesforce/B2B-Commerce-Developer-shiken.html

検証された材料は決まってこれ!B2B-Commerce-Developer:https://drive.google.com/open?id=1jfeQAWgCIazKMrMH6aF7vPo4-QCZ28b5