ExamGecko
Question list
Search
Search

Question 105 - Certified B2B Commerce Developer discussion

Report
Export

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 TRUE
Answers
A.
Return TRUE
B.
Return sfdc_checkout.lntegrationStatus.Status.SUCCESS
Answers
B.
Return sfdc_checkout.lntegrationStatus.Status.SUCCESS
C.
Return sfdc.checkout.lnventoryStatus.Status.SUCCESS
Answers
C.
Return sfdc.checkout.lnventoryStatus.Status.SUCCESS
D.
Return sfdc.checkout.lnventoryStatus.SUCCESS
Answers
D.
Return sfdc.checkout.lnventoryStatus.SUCCESS
Suggested answer: C

Explanation:

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

asked 23/09/2024
Stephen DeWhite
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first