Newer Version Available

This content describes an older version of this product. View Latest

COA_ServiceOrderSubmit Class

Submit orders to Salesforce Partner Operations for processing and activation.

Namespace

CHANNEL_ORDERS

Usage

The COA_ServiceOrderSubmit class contains a single @InvocableMethod for submitting orders to Salesforce Partner Operations. When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:

For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.

Example

This example receives a list of service orders, submits them, and returns a list of outputs from the submit 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

Order Status

When you submit a draft order using the COA_ServiceOrderSubmit class, the response tells you if the operation succeeded. The response doesn’t set the status of the related service order record, so the Service_Order_Status__c field remains Draft. If you build an implementation to set the status of submitted orders, we suggest the following logic: if the response includes a success code, set the order status to Received. Otherwise, set the status to Error. For orders with errors, you can store notes from Salesforce Partner Operations in the Error_Comment__c field.