A product is assigned to the entitlement policy but is missing from the Price Book related to the Buyer Group. The entitlement policy has View products and View prices in catalog checked. How will the product behave on the B2B Portal?
Correct Answer: C
B2B-Commerce-Developer Exam Question 82
What interface must a developer implement to override Tax in Checkout?
Correct Answer: D
To override tax in checkout, a developer must implement the sfdc_checkout.TaxCalculations interface. The sfdc_checkout.TaxCalculations interface is an Apex interface that provides methods for customizing the tax calculation logic for a cart or an order. The interface allows the developer to define how to retrieve tax rates and rules, how to apply tax amounts and adjustments, and how to handle tax errors and exceptions. The developer can use the sfdc_checkout.TaxCalculations interface to integrate with a third-party tax service provider or to implement their own tax calculation logic. The other interfaces do not exist or are not related to tax calculation. Salesforce Reference: B2B Commerce Developer Guide: Tax Integration, B2B Commerce Developer Guide: Tax Calculations Interface
B2B-Commerce-Developer Exam Question 83
How are variables bound when services use the ccSercviceDao class to execute queries?
Correct Answer: D
B2B-Commerce-Developer Exam Question 84
Northern Trail Outfitters (NTO) has acquired a company and is looking to manage product data across the org seamlessly. The company has a governance policy to not install any tool or use third-party API applications to export or import the data into Salesforce. However, users have access to Salesforce CLI. Which set of tasks must a developer perform whento export data from Salesforce or import data into Salesforce?
Correct Answer: D
Explanation The correct answer for how to export data from Salesforce or import data into Salesforce using Salesforce CLI commands is running a command like: sfdx force:data:tree:export -q "SELECT Id, Name FROM Product2" -u "<your username>" and sfdx force:data:tree:import -f Product2.json -u "<your username>". The sfdx force:data:tree:export command is a Salesforce CLI command that exports data from an org into JSON files that conform to the SObject Tree API specification. The SObject Tree API specification is a format that defines how records are represented in JSON files for data import or export. The -q flag specifies the SOQL query that selects the records and fields to be exported. The -u flag specifies the username or alias of the org where the data will be exported from. Running this command will generate JSON files that contain the data from the org based on the SOQL query. The sfdx force:data:tree:import command is a Salesforce CLI command that imports data into an org using JSON files that conform to the SObject Tree API specification. The -f flag specifies the path of the JSON file that contains the data to be imported. The -u flag specifies the username or alias of the org where the data will be imported to. Running this command will create records in the org based on the data in the JSON file. Running a command like: sfdx force:data:bulk:export -Product2 -all 0 and sfdx force:data:bulk:import -f Product2.json -all is not a correct answer, as it uses invalid syntax and flags for the sfdx force:data:bulk:export and sfdx force:data:bulk:import commands. The correct syntax and flags for these commands are sfdx force:data:bulk:upsert -s Product2 -f Product2.csv -w 10 -u <your username> and sfdx force:data:bulk:status -i <job ID> -u <your username>. Running a command like: sfdx force:data;tree:export -Product2 -all q and sfdx force:data:tree:import -f Product2.json -all is not a correct answer either, as it uses invalid syntax and flags for the sfdx force:data:tree:export and sfdx force:data:tree:import commands. The correct syntax and flags for these commands are sfdx force:data:tree:export -q "SELECT Id, Name FROM Product2" -u <your username> and sfdx force:data:tree:import -f Product2.json -u <your username>. Running a command like: sfdx force:tree:data:export -q "SELECT Id, Name FROM Product2" -u <your username> and sfdx force:tree:data:import -f Product2Json -all is not a correct answer either, as there is no such command as sfdx force:tree:data:export or sfdx force:tree:data:import. The correct commands aresfdx force:data:tree:export and sfdx force:data:tree:import. Salesforce References: [Salesforce CLI Command Reference: force:data:tree:export], [Salesforce CLI Command Reference: force:data:tree:import], [Salesforce CLI Command Reference: force:data:bulk], [Salesforce Developer Tools for Visual Studio Code]
B2B-Commerce-Developer Exam Question 85
What is a best practice when passing query parameters from user interface to an apex controller?
Correct Answer: A
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