Which two scoped modules should a developer import in Lightning web components to check user permissions?
A. @salesforce/permission
B. @salesforce/customPermission
C. @salesforce/hasPermission
D. @salesforce/userPermission
Explanation:
Lightning Web Components support special scoped modules that allow developers to check user permissions without Apex. This makes it easy to control component visibility or behavior based on permissions directly in the frontend.
Correct Options
✅ A. @salesforce/permission
This module provides access to standard system permissions, letting developers check if a user has a given permission like “ViewAllData” or “ModifyAllData.”
✅ B. @salesforce/customPermission
This module checks for custom permissions defined in Setup. It’s useful for feature gating and tailoring component behavior based on business-specific access rules.
Incorrect Options
❌ C. @salesforce/hasPermission
There is no hasPermission scoped module. It sounds valid but doesn’t exist in Salesforce’s module set.
❌ D. @salesforce/userPermission
Also not a real scoped module. Developers might confuse this with @salesforce/permission, but Salesforce only exposes the standard permission and customPermission modules.
Reference:
Salesforce Developers – LWC Scoped Modules
A user wants the pricing to reflect the price values stored in an external ERP during the checkoutflow. In what way can this requirement be satisfied?
A. Override the computePricingCart method in ccrz.cc_api_PriceAdjustoment and make the callout in this method.
B. None of the above
C. Override the computePricingReview method in ccrz.cc_CartExtension and make the callout in this method.
D. Override the computePricingCart methos in ccrz.cc_api_CartExtension and make the callout in this method.
Explanation:
Salesforce B2B Commerce enables dynamic pricing integration during checkout by allowing developers to extend core cart calculation logic. When external ERP systems hold authoritative price data, overriding specific methods in the cart extension framework facilitates real-time callouts to fetch and apply those values. This approach ensures accurate, synchronized pricing without disrupting the standard flow, supporting seamless B2B transactions while maintaining data consistency between Salesforce and external inventory or pricing sources.
Correct Options:
D. Override the computePricingCart methos in ccrz.cc_api_CartExtension and make the callout in this method. ✅:
In B2B Commerce, the ccrz.cc_api_CartExtension class provides hooks like computePricingCart for customizing pricing calculations during cart operations. By overriding this method, developers can insert an HTTP callout to the external ERP, retrieving real-time price values and updating the cart accordingly. This integrates seamlessly into the checkout flow, ensuring ERP-sourced prices reflect accurately before review, enhancing precision for dynamic B2B scenarios without altering core Salesforce logic.
Incorrect Options:
A. Override the computePricingCart method in ccrz.cc_api_PriceAdjustoment and make the callout in this method. ❌:
The ccrz.cc_api_PriceAdjustment class focuses on applying discounts or adjustments post-pricing, not initial price computation from external sources. Overriding computePricingCart here wouldn't align with the cart extension framework, potentially skipping standard pricing hooks and causing inconsistencies in checkout. For ERP integration, cart-level overrides are preferred to capture base prices early in the flow.
B. None of the above ❌:
This option dismisses valid extension points in B2B Commerce, where the framework explicitly supports overriding cart pricing methods for custom integrations like ERP callouts. Selecting this would overlook the extensible nature of ccrz.cc_api_CartExtension, which is designed for such modifications, allowing precise control over pricing during checkout without needing entirely new implementations.
C. Override the computePricingReview method in ccrz.cc_CartExtension and make the callout in this method. ❌:
The computePricingReview method in ccrz.cc_CartExtension handles final review-stage calculations, which occurs too late for initial ERP price fetching during the broader checkout flow. Callouts here might delay the process or miss cart updates, leading to discrepancies. Earlier hooks like cart computation ensure prices propagate correctly from the start.
Reference:
Salesforce Developer Documentation: Available Extensions
Salesforce Developer Documentation: Cart Calculate API
What is true regarding adding more Configuration Settings to Salesforce B2B Commerce?
A. Metadata can be added to existing modules, but you cannot add new modules.
B. Configuration settings can only be extended through API's
C. Select "New"in your storefront's Configuration Settings and create a custom setting.
D. More modules and metadata can be added to Salesforce B2B Commerce.
Explanation:
Configuration Settings in Salesforce B2B Commerce power storefront customization, from payment gateways to UI behaviors, via modular metadata. As businesses scale, adding new modules or metadata extends functionality without core code changes, supporting integrations like custom tax engines or payment processors. This flexibility via the CC Admin interface allows admins to build tailored experiences, ensuring configurations remain organized and deployable across global or storefront-specific levels for efficient B2B operations.
Correct Options:
D. More modules and metadata can be added to Salesforce B2B Commerce. ✅:
B2B Commerce's extensible architecture lets users create new Configuration Modules through the CC Admin, then add metadata entries like pages or settings within them. This supports custom features, such as payment or tax modules, by defining API names and associating metadata for storefront visibility. It's ideal for integrations, keeping configurations modular and cache-refreshable for quick updates across environments.
Incorrect Options:
A. Metadata can be added to existing modules, but you cannot add new modules. ❌:
While metadata addition to existing modules is supported, B2B Commerce fully allows creating new modules via the "New" button in CC Admin. Limiting to existing ones would hinder custom extensions like Digital River payments, where new modules enable isolated configurations without bloating predefined ones.
B. Configuration settings can only be extended through API's ❌:
Though APIs facilitate programmatic access, extensions primarily occur via the UI-driven CC Admin for creating modules and metadata. Relying solely on APIs skips the straightforward admin tools designed for non-developers, making it less accessible for routine customizations like adding payment pages.
C. Select "New" in your storefront's Configuration Settings and create a custom setting. ❌:
The "New" action in Configuration Settings targets individual settings within modules, not holistic module creation. For broader extensions, users first create modules, then add settings/metadata inside them—directly creating custom settings here bypasses the modular structure, potentially leading to disorganized or undeployable configs.
Reference:
Salesforce Help: Manage Configuration Settings
Salesforce Developer Documentation: Store and Experience Metadata
What is default behavior for how theSalesforce B2B Commerce Global APIs transform Salesforce data?
A. Fields names are returned using the Salesforce naming convention.
B. Fields names are returned with „c." prepended in their name.
C. Fields names are returned with a lowercase first letter,camelcase convention
D. Fields names can be mapped to any naming convention desired
Explanation:
Salesforce B2B Commerce Global APIs standardize data responses for consistent integration across storefronts and external systems. By transforming field names from Salesforce's API format (e.g., PascalCase with __c) to a developer-friendly camelCase style, these APIs simplify JSON handling in JavaScript or mobile apps. This default ensures predictable payloads during operations like cart retrieval, reducing mapping overhead while allowing custom tweaks for specific B2B workflows.
Correct Options:
C. Fields names are returned with a lowercase first letter,camelcase convention ✅
Global APIs in B2B Commerce automatically convert Salesforce field names to camelCase, starting with a lowercase letter (e.g., "effectiveAccountId" from "EffectiveAccountId__c"). This aligns with JavaScript conventions, making responses easier to consume in frontend code without manual transformations, and supports seamless data flow in RESTful interactions for carts, products, and orders.
Incorrect Options:
A. Fields names are returned using the Salesforce naming convention. ❌
Salesforce's native convention uses PascalCase for API names (e.g., "EffectiveAccountId__c"), but B2B Commerce APIs transform this to camelCase for better interoperability. Retaining the original would complicate client-side parsing, especially in web apps expecting JSON-friendly formats.
B. Fields names are returned with „c." prepended in their name. ❌
Custom fields in Salesforce include "__c" suffixes internally, but Global APIs strip these and apply camelCase without prepending "c.". This avoids cluttering responses and focuses on readable, convention-aligned names for practical API consumption.
D. Fields names can be mapped to any naming convention desired ❌
While custom mappings are possible via extensions or wrappers, the default behavior enforces camelCase without user-defined conventions out-of-the-box. Arbitrary mappings would require additional configuration, potentially impacting performance and consistency across standard API calls.
Reference:
Salesforce Developer Documentation: Global API Classes for B2B Commerce
Salesforce Developer Documentation: Storefront APIs
In which three different ways can a theme be enabled in Salesforce B2B Commerce? (3 answers)
A. A Storefront setting
B. An Account Group field value
C. A per user setting
D. Account
E. Dynamically through a hook
Explanation:
Theming allows for visual customization of a B2B Commerce storefront. A theme must be activated through specific mechanisms to control its application, whether globally, for specific customer segments, or based on dynamic conditions for a tailored user experience.
✅ Correct Options: A, B, E
A. A Storefront setting
A theme can be set as the default for the entire storefront from the Storefront Management panel in the CC Admin app. This applies the theme globally to all users unless overridden by a more specific rule, such as an account group.
B. An Account Group field value
Theming can be targeted to specific B2B customer segments. By assigning a theme to an Account Group record, all users belonging to accounts within that group will experience the storefront with that designated theme.
E. Dynamically through a hook
For advanced conditional theming, a developer can use a theme hook. This is code written in the theme's hooks.js file that programmatically determines and returns the appropriate theme name based on custom logic (e.g., time of day, user attributes).
❌ Incorrect Options:
C. A per user setting
There is no native, out-of-the-box feature within B2B Commerce that allows an individual end-user to select their own theme from a settings menu. Theming is controlled at an administrative or systemic level.
D. Account
While theming can be applied per Account Group, it cannot be applied directly to a single Account record. The platform's configuration layer uses Account Groups, not individual Accounts, for this level of segmentation.
📖 Reference:
Salesforce Help: Apply a Theme to Your Storefront
Which two steps are necessary to enable Salesforce B2B Commerce logging in the managed package?
A. Ensure you save a value in the Logging Token input field in the Global Settings section of CC Admin.
B. Turn On theCheckbox "Cloudcraze Logging" in CC Admin
C. Ensure the value saved in the Logging token field is appended to the ccLog query parameter.
D. Set a cookie with the Id of the user accessing the storefront in CC Admin
Explanation:
To debug issues, developers enable detailed logging. The platform requires specific setup steps to activate this feature and to uniquely identify log output for a specific user session among many in the system.
✅ Correct Options: A, C
A. Ensure you save a value in the Logging Token input field in the Global Settings section of CC Admin.
This is the primary step to activate the logging system. Providing any value in this "Logging Token" field acts as the switch that turns on the internal logging mechanisms for the storefront.
C. Ensure the value saved in the Logging token field is appended to the ccLog query parameter.
To retrieve the logs for a specific user session, the unique logging token value must be added to the URL as ?ccLog=YourTokenHere. This filters the massive system logs to show only entries tagged with that specific token.
❌ Incorrect Options:
B. Turn On the Checkbox "Cloudcraze Logging" in CC Admin
This checkbox does not exist in the standard CC Admin interface. Logging is enabled solely by populating the "Logging Token" text field, not by toggling a checkbox.
D. Set a cookie with the Id of the user accessing the storefront in CC Admin
Logging is not enabled or configured by manipulating cookies within the CC Admin UI. Session identification for log retrieval is handled entirely through the ccLog URL query parameter method.
📖 Reference:
Salesforce Help: Troubleshoot Using Logs
Based on error emails flowing in, a developer suspects that recent edits made to a checkout flow have created a defect. The developer has data points available to use as inputs in reproducing the scenario. What should the developer do next?
A. Open the flow, select Debug, provide the session ID for replay, and select Run
B. Open the flow, select Attach to Live Session, provide the session ID, and select Attach.
C. Open the flow, select Debug, provide the Input values, and select Run.
D. Open the flow, select Debug with Inputs, provide the Input values, and select Run.
Explanation:
A developer needs to validate a hypothesis about a flow error. The goal is to replicate the exact scenario reported by users in a controlled, offline environment without affecting live users to diagnose and fix the underlying problem.
✅ Correct Option: A. Open the flow, select Debug, provide the session ID for replay, and select Run
This is the precise method for replaying a specific user's session. By using the recorded Session ID from the error reports, the Flow debugger replays all the variable values and steps from that exact session, perfectly recreating the scenario that caused the defect.
❌ Incorrect Options:
B. Open the flow, select Attach to Live Session, provide the session ID, and select Attach.
"Attach to Live Session" is used for real-time debugging of a user who is currently active on the site. It is not for replaying past sessions and is ineffective for debugging errors that have already occurred.
C. Open the flow, select Debug, provide the Input values, and select Run.
While this is a valid general Flow debug method, it relies on the developer manually guessing and inputting all variables. This is error-prone and unlikely to perfectly replicate the complex state of a real user's session, making it less effective than session replay.
D. Open the flow, select Debug with Inputs, provide the Input values, and select Run.
There is no standard button or option labeled "Debug with Inputs" in Flow debugger. The correct process is to use the standard "Debug" button and then choose the "Replay" option to enter a Session ID.
📖 Reference:
Salesforce Help: Debug Flows (See "Replay a Debug Session from a Log")
In checkout, what event should the developer's code listen for in order to help troubleshoot and respond to actions?
A. CommerceBubbleEvents
B. CommerceErrorEvents
C. CommerceActionEvents
D. CommerceDiagnosticEvents
Explanation:
A developer is working with a Salesforce B2B Commerce storefront and needs to improve the reliability of the checkout process. This involves proactively identifying and responding to potential issues that could arise during a customer's checkout journey. To achieve this, the developer must listen for specific events fired by the platform that provide detailed information about the flow, including any errors or notable occurrences. The correct approach involves subscribing to the event type that provides comprehensive diagnostic data for monitoring and troubleshooting purposes.
Correct Option: D 🏆
CommerceDiagnosticEvents are the correct choice for this task. These are standard platform events provided by Salesforce B2B Commerce specifically to track and diagnose a variety of operations, including those within the checkout flow. They capture crucial information about the checkout process, such as the status of various stages, potential errors, and performance metrics. By listening for these events, a developer can create custom automation (e.g., Flows, Apex triggers, or external integrations) to log issues, alert administrators, or even automatically retry failed steps, making them essential for building a robust and resilient storefront.
Incorrect Options
A. ❌ CommerceBubbleEvents
This is not a standard or recognized event type within the Salesforce B2B Commerce platform for this purpose. The term "bubble events" refers to a concept in Lightning Web Components (LWC) where events propagate up through the DOM tree. While this is fundamental to LWC development, it is a client-side mechanism for component communication and not a server-side event for troubleshooting the entire checkout process, which involves multiple API calls and platform services.
B. ❌ CommerceErrorEvents
While a developer might logically assume this is the right event for handling errors, it is not a standard platform event provided by Salesforce B2B Commerce for this specific purpose. The platform uses more granular and comprehensive events like CommerceDiagnosticEvents to provide a full picture of the transaction, which includes both successful and unsuccessful outcomes, rather than just isolated errors. This allows for more thorough analysis and proactive issue resolution.
C. ❌ CommerceActionEvents
This is not a valid or standard event type in the Salesforce B2B Commerce platform. Events in Salesforce are named based on their purpose or the object they relate to. There is no predefined CommerceActionEvents platform event. Actions in a storefront, such as a user clicking a button, are typically handled by client-side JavaScript or Apex controllers, not by a dedicated platform event for external listening.
Reference:
Salesforce Developer Documentation: Standard Platform Event Object List
Witch static method invocation is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an apex @RemoteAction methos?
A. ccrz.cc_CallContext.init(ccrz.cc_RemoteActionContext)
B. ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext)
C. ccrz.cc_CallContext.initRemoteActionContext(ccrz.cc_RemoteActionContext)
D. ccrz.cc_CallContext.initializeCallContext(ccrz.cc_RemoteActionContext)
Explanation:
The static method invocation that is used to initialize ccrz.cc_CallContext with information
from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult
in an Apex @RemoteAction method is
ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext). This method takes in a
ccrz.cc_RemoteActionContext object as a parameter and returns a
ccrz.cc_RemoteActionResult object.
The ccrz.cc_RemoteActionContext object contains
information about the current storefront, user, cart, price list, currency, locale, and session.
The ccrz.cc_RemoteActionResult object contains information about the status, result, and
errors of the remote action. The other methods are not valid or do not exist. Salesforce
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. Import static resources for the text values and add them into the LWC
B. Use a CustomLabel xml file in the LWC to add the text values there.
C. Create custom labels for the text values and import them in the LWC.
D. Create a custom Metadata object for the text values and query it in the LWC.
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.
{welcomeHeader}
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)
Which two user permissions in addition to View Setup and Configuration are required to Question No : 20 Salesforce B2B-Commerce-Developer : Practice Test 17 bulk create Product data translations via Data Loader?
A. Import Custom Objects
B. B2B Commerce Super User
C. Create and set up Experiences
D. Manage Translations
Explanation:
To bulk create product data translations via Data Loader, permissions
beyond View Setup and Configuration are necessary. "Import Custom Objects" permission
is required to import bulk data into Salesforce, including translations for custom objects.
"Manage Translations" permission is essential for managing translation workbench settings
and importing/exporting translation files, which is crucial for handling product data
translations.
A developer has the task to create custom Lightning web components (LWCs). Which two steps must a developer take when creating custom LWCs?
A. Create an Apex class
B. Authorize an org for an SFDX project.
C. CloneaLWC.
D. Deploy a custom component.
Explanation:
To create custom Lightning web components (LWCs), a developer must take
two steps: authorize an org for an SFDX project and deploy a custom component.
Authorizing an org for an SFDX project allows the developer to connect to a Salesforce org,
such as a scratch org, a sandbox, or a production org, and use it as a development
environment. Deploying a custom component allows the developer to push the LWC code
from the local project to the org and make it available for use. Creating an Apex class is not
a required step for creating custom LWCs, as not all LWCs need to use Apex. Cloning an
LWC is not a required stepeither, as it is an optional way to create a new LWC based on an
existing one. Salesforce References: Lightning Web Components Developer Guide:
Authorize an Org for Development, Lightning Web Components Developer Guide: Deploy
Your Component
| Page 2 out of 18 Pages |
| Previous |