What are two ways a developer should ensure that a store verifies changes by using an external service?
A.
Create a flow using an action to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
B.
Create an Apex class implementing the sfdc_checkout.CartShippingCharges interface to retrieve shipping charges from an external service and register it as the .. calculation integration in the store administration.
C.
Create an Apex class to retrieve shipping charges from an external service and update the Cart DeliveryGroup Method.
D.
Create a trigger to retrieve shipping charges from an external service and update the Cart Delivery, Group Methods
To verify changes by using an external service, a developer can use either of these two ways:
Create an Apex class that implements the sfdc_checkout.CartShippingCharges interface and defines the getShippingCharges method. This method takes a Cart object as an input parameter and returns a list of CartDeliveryGroupMethod objects with the updated shipping charges. The developer then needs to register the Apex class as the Shipping Calculation Integration in the store administration. This way, the store can call the external service to calculate the shipping charges for each delivery group in the cart.
Create an Apexclass that defines a method to retrieve the shipping charges from an external service and update the Cart Delivery Group Method object. The developer then needs to invoke this method from a trigger on the Cart Delivery Group Method object. This way, the store can update the shipping charges whenever the delivery group method is inserted or updated.
The other options are not valid ways to verify changes by using an external service. Creating a flow using an action is not supported for B2B Commerce, and creating a trigger on the Cart Delivery Group object will not update the shipping charges for each delivery group method. References:
Integrate with External Services
CartShippingCharges Interface
CartDeliveryGroupMethod Object
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit