What are two ways a developer should ensure that a store verifies changes by using an external service?
Correct Answer: B,C
Explanation
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 Apex class 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