---
schema_version: "1"
id: 15f035a6336f5f73f385424fbfd870b05af9ceae3f1408316bf7ab37ef6ac6e2
title: OrderSource
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/hc_sforce_api_objects_ordersource.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/hc_sforce_api_objects_ordersource.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: ca1063df3435bfa9e7b26c1918f39fad213d0c3cc41b0873510e9475991c29e2
description: Represents the source details of an order. This object captures the point of origin for an order and the subsequent action, ensuring full traceability for audit purposes and operational visibility across any organizational process. This object is available in API version 67.0 and later.
---
# OrderSource

Represents the source details of an order. This object captures the point of origin for an order and the subsequent action, ensuring full traceability for audit purposes and operational visibility across any organizational process. This object is available in API version 67.0 and later.

## Supported Calls

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

## Special Access Rules

Users must have the Manage Pricing and Billing permission set.

## Fields

### CareServiceVisitId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The care service visit that’s associated with the work order.
    
    This field is a relationship field.
- **Relationship Name**: CareServiceVisit
- **Refers To**: CareServiceVisit

### Comment

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The comments associated with the order.

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The date and time when the record was last referenced.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The date and time when the record was last viewed.

### Name

- **Type**: string
- **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort
- **Description**: The name of the record.

### OrderId

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort
- **Description**: The ID of the order associated with the source.
    
    This field is a relationship field.
- **Relationship Name**: Order
- **Relationship Type**: Master-detail
- **Refers To**: Order (the master object)

### ReasonType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The business reason for creating the order from the specified source.

### SourceReferenceRecordId

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: The ID of the reference record used as the source for the order.
    
    This field is a polymorphic relationship field.
- **Relationship Name**: SourceReferenceRecord
- **Refers To**: WorkOrder

### WorkOrderId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The ID of the work order associated with the order.
    
    This field is a relationship field.
- **Relationship Name**: WorkOrder
- **Refers To**: WorkOrder

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[OrderSourceHistory](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.

[OrderSourceShare](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.