Which two statements are true about Global API’s in Salesforce B2B Commerce? (2 answers)

Which two statements are true about Global API’s in Salesforce B2B Commerce? (2 answers)
A . Each globalAPI method takes in a Map<String, Object> as a single parameter and returns a Map<String, Object>
B . Global APIs are versioned.
C . Global APIs will catch any Exceptions that are thrown as part of missing parameters.
D . Global APIs will handle Transaction scope, and the Subscriber calling it does not need to handle scope.

Answer: A,B

Explanation:

Global APIs are methods that can be called from any Apex class or Visualforce page within the B2B Commerce managed package or subscriber code. Each global API method takes in a Map<String, Object> as a single parameter and returns a Map<String, Object>. This allows for flexibility and extensibility of the API. Global APIs are versioned, which means that they have a version number in their name, such as ccApi_1_0. This ensures backward compatibility and allows for new features and enhancements to be added without breaking existing functionality. Global APIs do not catch any Exceptions that are thrown as part of missing parameters, which means that the caller is responsible for handling any errors or validations. Global APIs do not handle Transaction scope, and the Subscriber calling it does not need to handle scope. This means that the caller can decide whether to use transactions or not, depending on the business logic and performance requirements.

Salesforce Reference: B2B Commerce Developer Guide: Global APIs, B2B Commerce Developer Guide: Global API Versioning

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments