Newer Version Available

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

ReturnOrder

Represents the return or repair of inventory or products in field service. This object is available in API version 42.0 and later.

Return orders are available in Lightning Experience, Salesforce Classic, the Salesforce app, the Field Service Lightning mobile app for Android and iOS, and communities built using Salesforce Tabs + Visualforce.

Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Special Access Rules

Field Service Lightning must be enabled.

Fields

Field Name Details
AccountId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The account associated with the return order.
CaseId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The case associated with the return order.
ContactId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The contact associated with the return order.
Description
Type
textarea
Properties
Create, Nillable, Update
Description
Notes or context about the return order.
DestinationLocationId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location where the items are being returned to. For example, if the return order tracks the return of products from a technician’s van to a warehouse, the warehouse is the destination location.
ExpectedArrivalDate
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The date when the items are expected to arrive at the destination location.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last modified. Its label in the user interface is Last Modified Date.
LastViewedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last viewed.
OrderId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The order associated with the return order. When you associated a return order with an order, you can associate the return order’s line items with order products.
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The owner of the return order.
ProductRequestId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product request associated with the return order. When you associated a return order with a product request, you can associate the return order’s line items with the product request’s line items.

A return order might be related to a product request if the return order tracks the return of unused products or products to be repaired or replaced. For example, a technician creates a product request for three motors to prepare for a field visit. If the technician finds that only two motors are needed, they can create a return order to return the third to the original location, and list the product request in this field.

ReturnOrderNumber
Type
string
Properties
Autonumber, Defaulted on create, Filter, Sort
Description
(Read only) Auto-generated number identifying the return order.
ReturnedById
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the user returning the items.
ShipFromAddress
Type
address
Properties
Filter, Nillable
Description
The return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipFromCity
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipFromCountry
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipFromGeocodeAccuracy
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy level of the geocode for the return shipping address. See Compound Field Considerations and Limitations for details on geolocation compound fields.

This field is available in the API only.

Note

ShipFromLatitude
Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the return shipping address. Acceptable values are numbers between –90 and 90 with up to 15 decimal places. See Compound Field Considerations and Limitations for details on geolocation compound fields.

This field is available in the API only.

Note

ShipFromLongitude
Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the return shipping address. Acceptable values are numbers between –180 and 180 with up to 15 decimal places. See Compound Field Considerations and Limitations for details on geolocation compound fields.

This field is available in the API only.

Note

ShipFromPostalCode
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipFromState
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The state of the return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipFromStreet
Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the return shipping address. This address tracks the location of the items at the start of the return or repair. For example, if a customer is returning an item, the Ship From address is the customer’s address.
ShipmentType
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The type of shipment associated with the return order. Available values are:
  • Standard (default value)
  • Rush
  • Overnight
  • Next Business Day
  • Pickup
SourceLocationId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The items’ location at the start of the return or repair. For example, if the return order tracks the return of products from a technician’s service vehicle to a warehouse, the service vehicle is the source location.
Status
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The status of the return order. Available values are:
  • Draft
  • Submitted
  • Approved
  • Canceled
  • Closed

Usage

You can use return orders to track customer returns, customer repairs, or the return of inventory from a technician’s van stock to a warehouse or supplier. Customers can initiate a return from a community, or agents can create return orders in response to a customer call or technician request.

Return orders are composed of return order line items, which allow you to add details about the items being returned. To represent the returned items, each line item must list one or more of the following: product, product item, asset, product request line item, and order product. Return orders can be associated with a product request, case, account, contact, and order if needed. This versatility lets you use return orders to track a wide range of return scenarios.