Salesforce Accredited B2B Commerce Developer Professional (AP-202) Exam Questions

Page: 1 / 14
Total 221 questions
Question 1

Which method needs to be implemented when rendering a Salesforce B2B

Commerce view in order to have it called after rendering has finished?



Answer : C

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 Reference:B2B Commerce and D2C Commerce Developer Guide,View Class


Question 2

Which HTML element can be used as a root tag for a Lightning Web Component's HTML file?



Answer : D

In Lightning Web Components (LWC), the root tag for the component's HTML file must be <template>. This tag defines the markup structure for the component and is essential for the LWC framework to correctly render the component in the Salesforce Lightning Experience. The <template> tag is unique to LWC and is not interchangeable with standard HTML tags like <body>,

, or <html>. For more information, see the Salesforce LWC documentation: Salesforce LWC HTML Templates Documentation.


Question 3

A Northern Trail Qutfitters (NTO) developer made a tile component. To expose a click event and react to user input using the markup below, what should replace ?



Answer : A

To expose a click event and react to user input in a Lightning web component, the developer should use a method name as the value of the onclick attribute in the template. The method name should be followed by parentheses, as in tileClick(). This syntax indicates that the method is invoked when the element is clicked. The method should be defined in the JavaScript file of the component, and it can access the event object as a parameter. The other options are either invalid or incorrect. For example, {event:tileClick} is not a valid syntax for an onclick attribute, javascript:avoid(0);tileClick(); is unnecessary and outdated, and {tileClick} is a property binding expression, not a method invocation.Reference:B2B Commerce and D2C Commerce Developer Guide,Lightning Web Components Developer Guide


Question 4

What should a developer's implementation code return if the External Prices are the same as Sales Prices for Products in the Cart?



Answer : A

When implementing code for external pricing comparisons, if the external prices are the same as the sales prices for products in the cart, the implementation should ideally return a status indicating success (such as sfdc_checkout.IntegrationStatus.Status.SUCCESS). This indicates that the external pricing verification has passed and there are no discrepancies between the external and sales prices.


Question 5

A developer is trying to troubleshoot why a field is not displaying on the Product Detail Page. What should be typed in the Developer Tools Console in the browser to view the fields available for the Product Detail Page?



Answer : C

To view the fields available for the Product Detail Page, the developer should type CCRZ.productDetailModel in the Developer Tools Console in the browser. This will display the product detail model object, which contains the product data and attributes that are rendered on the page. The other options are either not valid or not relevant for the Product Detail Page.


Question 6

A user wants to have a Contact Us page in the storefront. This page will be a web-tolead form and it should have the header and footer, essentially the same look and feel as

all the pages in the application. How can this requirement be fulfilled?



Answer : B

To have a Contact Us page in the storefront that is a web-to-lead form and has the same look and feel as all the pages in the application, the requirement can be fulfilled by creating a Subscriber Page (CC Page). This is a custom Visualforce page that can be added to the storefront and use the standard header and footer components. The page can also include a web-to-lead form that submits data to Salesforce as leads. Salesforce Reference:B2B Commerce and D2C Commerce Developer Guide,Subscriber Pages


Question 7

During checkout flow customizations, a developer receives an error on shipping cost calculation integrations with the error code: INSUFFICIENT_ACCESS_OR_READONLY.

What is causing this error?



Answer : D

The error code INSUFFICIENT_ACCESS_OR_READONLY is caused by the cart being no longer in a valid Checkout State during checkout flow customizations. A cart is an object that represents a collection of products and charges that a customer intends to purchase in the storefront. A cart has a Checkout State field that indicates the current state of the checkout process for the cart. The Checkout State can have values such as Draft, InProgress, Completed, or Cancelled. A cart can only be modified or updated when it is in Draft or InProgress state. A cart cannot be modified or updated when it is in Completed or Cancelled state. If an attempt is made to modify or update a cart that is in Completed or Cancelled state, an error with the code INSUFFICIENT_ACCESS_OR_READONLY will be thrown. This error means that the user does not have permission to edit or delete a record because it is read-only or locked. The storefront user does not have access to the Cart Delivery Method object is not a cause of this error code, as it is not related to the cart checkout state or data modification. The Cart Delivery Method object is an object that stores information about the delivery method selected for a cart in the storefront. An error has occurred during the cart shipping charge integration is not a cause of this error code either, as it is not related to the cart checkout state or data modification. The cart shipping charge integration is an integration that calculates and applies shipping charges to a cart based on various factors such as delivery method, location, weight, volume, etc. The storefront user does not have access to custom fields on the Order Delivery Method object is not a cause of this error code either, as it is not related to the cart checkout state or data modification. The Order Delivery Method object is an object that stores information about the delivery method selected for an order summary in the storefront. Salesforce Reference:B2B Commerce Developer Guide: Cart Object, [B2B Commerce Developer Guide: Cart Delivery Method Object], [B2B Commerce Developer Guide: Order Delivery Method Object], [Salesforce Help: Common Error Messages]


Page:    1 / 14   
Total 221 questions