Download Salesforce Accredited B2B Commerce Developer.B2B-Commerce-Developer.VCEplus.2023-10-05.27q.vcex

Vendor: Salesforce
Exam Code: B2B-Commerce-Developer
Exam Name: Salesforce Accredited B2B Commerce Developer
Date: Oct 05, 2023
File Size: 27 KB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Demo Questions

Question 1
A user wants to have a customized experience for adding items to the cart. The user also wants the mini cart module to reflect changes to the state of the cart afterwords. How should this requirement be fulfilled?
  1. Leverage the Addto Cart Global API which add items to the cart and also refreshes the page with the new data.
  2. Trigger the global cartChange' event and then trigger changeMiniCart' event after the Add to Cart Action on the custom button.
  3. Write a custom Remote Action to refresh the Mini Cart and refresh the Cart Line item count on the Cart Link in the header.
  4. Trigger the global cartChange' event after the Add to Cart Action on the custom button.
Correct answer: D
Explanation:
To have a customized experience for adding items to the cart and also update the mini cart module, the requirement can be fulfilled by triggering the global ''cartChange'' event after the Add to Cart Action on the custom button. This event will notify all the components that are listening to it that the cart has changed and they should refresh their data accordingly. The mini cart module is one of these components, so it will update its state based on the new cart data. SalesforceReference:B2B Commerce and D2C Commerce Developer Guide,Events
To have a customized experience for adding items to the cart and also update the mini cart module, the requirement can be fulfilled by triggering the global ''cartChange'' event after the Add to Cart Action on the custom button. This event will notify all the components that are listening to it that the cart has changed and they should refresh their data accordingly. The mini cart module is one of these components, so it will update its state based on the new cart data. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Events
Question 2
A user wants to leverage a three columnlayout on a page. The user also wants to move the mini-cart widget from the right to the center column. How can this requirement be fulfilled?
  1. Gross Layout Override
  2. Subscriber Template
  3. Page Include
  4. HandleBar Template Override
Correct answer: A
Explanation:
To leverage a three column layout on a page and move the mini-cart widget from the right to the center column, the requirement can be fulfilled by creating a Gross Layout Override. This is a custom Visualforce page that overrides the default layout of a page and allows changing its structure and content. The user can create a Gross Layout Override that uses a three column layout and places the mini-cart widget in the center column. Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide,Gross Layout Overrides
To leverage a three column layout on a page and move the mini-cart widget from the right to the center column, the requirement can be fulfilled by creating a Gross Layout Override. This is a custom Visualforce page that overrides the default layout of a page and allows changing its structure and content. The user can create a Gross Layout Override that uses a three column layout and places the mini-cart widget in the center column. Salesforce 
Reference: B2B Commerce and D2C Commerce Developer Guide,Gross Layout Overrides
Question 3
What are the templating, Javascript, and CSS frameworks what the cloudcraze managed package leverages?
  1. Angularjs, Backbonejs, and handlebarsjs
  2. Bootstrap, Backbonejs, and handlebarsjs
  3. Bootstrap, Angularjs, and Backbonejs
  4. Angularjs, react.js, and handlebarsjs
Correct answer: B
Explanation:
The templating, JavaScript, and CSS frameworks that the cloudcraze managed package leverages are Bootstrap, Backbone.js, and Handlebars.js. Bootstrap is a CSS framework that provides responsive design and layout components. Backbone.js is a JavaScript framework that provides models, views, collections, and events for building single-page applications. Handlebars.js is a templating engine that allows generating HTML from JSON data. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Front-End Development
The templating, JavaScript, and CSS frameworks that the cloudcraze managed package leverages are Bootstrap, Backbone.js, and Handlebars.js. Bootstrap is a CSS framework that provides responsive design and layout components. Backbone.js is a JavaScript framework that provides models, views, collections, and events for building single-page applications. Handlebars.js is a templating engine that allows generating HTML from JSON data. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Front-End Development
Question 4
What are three advantages of using ccLog over the Salesforce standard System.debug class? (3 answers)
  1. There is no need to use string concatenation to easily tag log statements with a subject.
  2. ccLog can debug syntax errors found in the JavaScript.
  3. There is no need to create a User Trace Flag.
  4. Append #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console.
  5. There is no need to manually set a cookie to debug with the Site Guest User.
Correct answer: ADE
Explanation:
Three advantages of using ccLog over the Salesforce standard System.debug class are:There is no need to use string concatenation to easily tag log statements with a subject. ccLog allows passing a subject parameter to the log method, which will prepend the subject to the log message. For example,ccLog.log('This is a message', 'Subject')will log[Subject] This is a message.There is no need to create a User Trace Flag. ccLog can be enabled by setting the value of CO.logToken to true in CCAdmin, which will activate logging for all users who access the storefront.There is no need to manually set a cookie to debug with the Site Guest User. ccLog can be enabled for the Site Guest User by appending #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console. For example,https://my-storefront.com/#ccLog=debugwill enable logging for the Site Guest User with the debug level. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Logging
Three advantages of using ccLog over the Salesforce standard System.debug class are:
There is no need to use string concatenation to easily tag log statements with a subject. ccLog allows passing a subject parameter to the log method, which will prepend the subject to the log message. For example,ccLog.log('This is a message', 'Subject')will log[Subject] This is a message.
There is no need to create a User Trace Flag. ccLog can be enabled by setting the value of CO.logToken to true in CCAdmin, which will activate logging for all users who access the storefront.
There is no need to manually set a cookie to debug with the Site Guest User. ccLog can be enabled for the Site Guest User by appending #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console. For example,https://my-storefront.com/#ccLog=debugwill enable logging for the Site Guest User with the debug level. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Logging
Question 5
What are three ways to implement custom post Order processing? (3 answers)
  1. Use a Salesforce workflow rule that executes when an Order record is created.
  2. Extend cc_hk_invoice tohandle custom business logic post Order processing
  3. Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic.
  4. Modify or add custom Cart formula fields to handle logic.
  5. Use Process builder to implement business processes that execute when an Order record is created.
Correct answer: BCE
Explanation:
Three ways to implement custom post Order processing are:Extend cc_hk_invoice to handle custom business logic post Order processing. This hook allows modifying the invoice data or performing additional actions after an Order is placed. For example, the hook can send an email notification or update a custom field on the invoice record.Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic. This hook allows specifying a custom Visualforce page that will be displayed after an Order is placed.The custom page can include additional business logic or user interface elements.Use Process Builder to implement business processes that execute when an Order record is created. Process Builder is a tool that allows creating workflows and actions based on criteria and conditions. For example, Process Builder can create a task, send an email, or update a record when an Order record is created. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Hooks, Process Builder
Three ways to implement custom post Order processing are:
Extend cc_hk_invoice to handle custom business logic post Order processing. This hook allows modifying the invoice data or performing additional actions after an Order is placed. For example, the hook can send an email notification or update a custom field on the invoice record.
Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic. This hook allows specifying a custom Visualforce page that will be displayed after an Order is placed.
The custom page can include additional business logic or user interface elements.
Use Process Builder to implement business processes that execute when an Order record is created. Process Builder is a tool that allows creating workflows and actions based on criteria and conditions. For example, Process Builder can create a task, send an email, or update a record when an Order record is created. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Hooks, Process Builder
Question 6
What are three ways to test the value of Page Label on any Salesforce B2B Commerce Community Page? (3 answers)
  1. Access the source HTML for the page viathe browser developer tools.
  2. Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME') in the JavaScript console.
  3. Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console.
  4. Enable the 'display page label names' in cc admin.
  5. Execute (('PAGE_LABEL_NAME')) in the JavaScript console
Correct answer: BCD
Explanation:
Three ways to test the value of Page Label on any Salesforce B2B Commerce Community Page are:Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME'] in the JavaScript console. This will return the value of the page label with the given name from the pagevars object, which contains all the page labels that are used on the page.Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console. This will return the value of the page label with the given name from the pageLabelMap object, which contains all the page labels that are defined in CCAdmin.Enable the 'display page label names' in cc admin. This will display the name of each page label next to its value on the storefront pages, which can help identify and verify the page labels. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Page Labels
Three ways to test the value of Page Label on any Salesforce B2B Commerce Community Page are:
Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME'] in the JavaScript console. This will return the value of the page label with the given name from the pagevars object, which contains all the page labels that are used on the page.
Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console. This will return the value of the page label with the given name from the pageLabelMap object, which contains all the page labels that are defined in CCAdmin.
Enable the 'display page label names' in cc admin. This will display the name of each page label next to its value on the storefront pages, which can help identify and verify the page labels. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Page Labels
Question 7
What are two guidelines for logging that are used within the core Salesforce B2B Commerce product? (2 answers)
  1. Items or data within computational intensive loops shouldbe logged.
  2. The close method of ccrz.ccLog must be called at the end of the remote action.
  3. No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed.
  4. It is okay to log any data on the server that is already logged on the client side.
Correct answer: BC
Explanation:
Two guidelines for logging that are used within the core Salesforce B2B Commerce product are:The close method of ccrz.ccLog must be called at the end of the remote action. This method will flush the log messages to the browser console or to a custom object, depending on the logging mode. If this method is not called, the log messages may not be displayed or saved properly.No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed. This method will initialize the call context object, which contains information such as the current user, cart, storefront, and configuration settings. These information are required for logging, so calling ccrz.ccLog before initializing the call context will result in an error. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Logging
Two guidelines for logging that are used within the core Salesforce B2B Commerce product are:
The close method of ccrz.ccLog must be called at the end of the remote action. This method will flush the log messages to the browser console or to a custom object, depending on the logging mode. If this method is not called, the log messages may not be displayed or saved properly.
No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed. This method will initialize the call context object, which contains information such as the current user, cart, storefront, and configuration settings. These information are required for logging, so calling ccrz.ccLog before initializing the call context will result in an error. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Logging
Question 8
What is a best practice when passing query parameters from user interface to an apex controller?
  1. Query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component.
  2. String parameters should be trimmed using String.trim().
  3. Query parameters should be passed only to Salesforce B2B Commerce classes that you are extending.
  4. Query parameters should be stored on a backbone model prior to passing them to the server
Correct answer: A
Explanation:
A best practice when passing query parameters from user interface to an apex controller is to query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component. This function will encode any special characters in the query parameters to prevent cross-site scripting (XSS) attacks or SOQL injection attacks. For example,ccrz.ccRemoteActions.getProducts('{!JSINHTMLENCODE(searchTerm)}')will encode the searchTerm parameter before passing it to the apex controller. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Security
A best practice when passing query parameters from user interface to an apex controller is to query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component. 
This function will encode any special characters in the query parameters to prevent cross-site scripting (XSS) attacks or SOQL injection attacks. For example,ccrz.ccRemoteActions.getProducts('{!JSINHTMLENCODE(searchTerm)}')will encode the searchTerm parameter before passing it to the apex controller. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Security
Question 9
What is a method to resolve if the current storefront customer is a Salesforce B2B Commerce guest user in an apex class?
  1. ccrz.cc_CallContext.currUser.isGuest
  2. ccrz.cc_CallContext.isGuest
  3. UserInfo.getUserType()
  4. ... UserType
Correct answer: B
Explanation:
A method to resolve if the current storefront customer is a Salesforce B2B Commerce guest user in an apex class is to use ccrz.cc_CallContext.isGuest. This property will return true if the current user is a guest user, or false otherwise. For example,if(ccrz.cc_CallContext.isGuest){ // do something for guest user }will execute some logic only for guest users. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Call Context
A method to resolve if the current storefront customer is a Salesforce B2B Commerce guest user in an apex class is to use ccrz.cc_CallContext.isGuest. This property will return true if the current user is a guest user, or false otherwise. For example,if(ccrz.cc_CallContext.isGuest){ // do something for guest user }will execute some logic only for guest users. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Call Context
Question 10
What is a valid way of referencing the CC Cart Object whose API name is E_Cart__c in a SOQL query?
  1. _Cart__c
  2. c.E_Cart__c
  3. ccrz__E_Cart__c
  4. cloudcraze__E_Cart__c
Correct answer: C
Explanation:
A valid way of referencing the CC Cart Object whose API name is E_Cart__c in a SOQL query is to use ccrz__E_Cart__c. This is the transformed name of the object that is used by the Salesforce B2B Commerce framework. All custom objects and fields that are part of the cloudcraze managed package have the prefix ccrz__ in their API names. For example,SELECT Id, Name FROM ccrz__E_Cart__cwill query the CC Cart Object records. SalesforceReference: B2B Commerce and D2C Commerce Developer Guide,Query Transformation
A valid way of referencing the CC Cart Object whose API name is E_Cart__c in a SOQL query is to use ccrz__E_Cart__c. This is the transformed name of the object that is used by the Salesforce B2B Commerce framework. All custom objects and fields that are part of the cloudcraze managed package have the prefix ccrz__ in their API names. For example,SELECT Id, Name FROM ccrz__E_Cart__cwill query the CC Cart Object records. Salesforce
Reference: B2B Commerce and D2C Commerce Developer Guide,Query Transformation
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!