Explanation: A trigger is a programmatic way of executing some logic when a record is inserted, updated, deleted, or undeleted in Salesforce. A trigger can invoke an Apex class that contains the code to perform a REST callout to an external system. A REST callout is a way of sending an HTTP request to a service endpoint and receiving a response. A REST callout can be synchronous or asynchronous, depending on whether the Apex code waits for the response before continuing the execution. A synchronous callout is suitable for scenarios where the response is needed immediately, such as order fulfillment1.
An Apex proxy class is a class that is generated from a WSDL (Web Service Description Language) document of an external SOAP web service. An Apex proxy class can be used to make a SOAP callout to the external web service, but not a REST callout. A SOAP callout is another way of sending an HTTP request to a service endpoint and receiving a response, but it uses a different format and protocol than REST2.
Process Builder is a declarative tool that allows you to automate business processes by defining criteria and actions. Process Builder can invoke an Apex class that implements the Process.Plugin interface, which allows you to extend the functionality of Process Builder with custom logic. However, Process Builder does not support synchronous callouts, because it runs in the background and does not wait for the response from the external system. Process Builder only supports asynchronous callouts, which are executed after the transaction is committed3.
Batch Apex is a way of processing large volumes of data asynchronously by breaking them into smaller batches of records. Batch Apex can be used to perform complex or long-running operations on data, such as data cleansing, archiving, or integration. Batch Apex can make callouts to external systems by implementing the Database.AllowsCallouts interface in the batch class. However, Batch Apex is not suitable for scenarios where the callout needs to be synchronous, because it runs in the background and does not wait for the response from the external system. Batch Apex also has some limitations, such as the maximum number of batches in the queue, the maximum number of records per batch, and the maximum number of callouts per batch4.
A Lightning Component is a reusable unit of user interface that can be used to build modern web apps with Salesforce. A Lightning Component can make a callout to an external system by using JavaScript code or by invoking an Apex controller class that contains the logic for the callout. A Lightning Component can make a synchronous or asynchronous callout, depending on whether the JavaScript code or Apex code waits for the response before continuing the execution. However, a Lightning Component is not a good choice for scenarios where the callout needs to be triggered by a record change, such as when an opportunity is closed/won. A Lightning Component requires user interaction, such as clicking a button or loading a page, to initiate the callout5.
Therefore, the correct answer is A, because writing a trigger that invokes an Apex class to make a REST callout to the Order Management System is the only option that satisfies the requirements of making a synchronous callout when an opportunity is closed/won.
References: 1: Callouts From Triggers | Apex Developer Guide | Salesforce Developers 2: Generate an Apex Class from a WSDL | Apex Developer Guide | Salesforce Developers 3: Invoking Apex from Process Builder | Process Automation Developer Guide | Salesforce Developers 4: Using Batch Apex | Apex Developer Guide | Salesforce Developers 5: Make HTTP Requests from JavaScript Code in Lightning Components | Lightning Aura Components Developer Guide | Salesforce Developers