Use Managed Packages to Develop Your AgentExchange Solution
Service Order
Service Order Detail
Partner Order Submit API
OEM User License Guide
Previous Versions
Recall orders that you’ve submitted to Salesforce Partner Operations.
The COA_ServiceOrderRecall class contains a single @InvocableMethod for recalling orders that have been submitted to Salesforce Partner Operations but haven’t yet been processed. When you recall an order, it’s removed from the processing queue and isn’t activated. When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:
1CHANNEL_ORDERS.CLASS.METHOD(ARGS)For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
This example receives a list of service orders, recalls them, and returns a list of outputs from the recall operation.
For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code in your implementation, you must include the namespace prefix.
Note
1public static void recallOrders(List<Service_Order__c> serviceOrders){
2 List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput> serviceOrderRecallInput = new List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput>();
3
4 for(Service_Order__c serviceOrder: serviceOrders){
5 COA_ServiceOrderRecall.COA_ServiceOrderRecallInput input = new COA_ServiceOrderRecall.COA_ServiceOrderRecallInput();
6 input.serviceOrderId = serviceOrder.Id;
7 serviceOrderRecallInput.add(input);
8 }
9
10 List<COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput> serviceOrderRecallOutputs = COA_ServiceOrderRecall.recall(serviceOrderRecallInput);
11
12 for(COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput serviceOrderRecallOutput: serviceOrderRecallOutputs){
13 System.debug('Service Order Id: '+serviceOrderRecallOutput.serviceOrderId);
14 System.debug('Success?: '+serviceOrderRecallOutput.isSuccess);
15 System.debug('Response Messages: '+serviceOrderRecallOutput.responseMessages);
16 }
17}