---
schema_version: "1"
id: e65dba470322763d93ac4da51b9e06c7cab000a7867a8b83e2cfe112d04ac8a1
title: ResourcePreference
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-scheduler-dev-guide/guides/salesforce-scheduler/objects/sforce-api-objects-resourcepreference.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/sforce-api-objects-resourcepreference.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d4d7f528d8f77f3262b9dfeb10277dc3c1d70f0a67890958fbeebdd42f1f029c
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# ResourcePreference

Represents an account’s preference for a specified service resource.

Resource preferences indicate which service resources should be assigned to a service appointment. You can designate service resources as preferred, required, or excluded on accounts.

## Supported Calls

`create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `update()`, `upsert()`

## Fields

### LastReferencedDate

-   **Type**: dateTime
-   **Properties**: Filter, Nillable, Sort
-   **Description**: The date when the resource preference was last modified.

### LastViewedDate

-   **Type**: dateTime
-   **Properties**: Filter, Nillable, Sort
-   **Description**: The date when the resource preference was last viewed.

### PreferenceType

-   **Type**: picklist
-   **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
-   **Description**: Resource preference type. Values include:


    -   `Preferred`— Indicates that the user would like their appointment assigned to the resource.
    -   `Required`— Indicates that the resource must be assigned to the appointment.
    -   `Excluded`— Indicates that the resource must not be assigned to the appointment.
    Resource preferences serve more as a suggestion than a requirement. You can still assign a service appointment to any resource regardless of the related account’s resource preferences.


### RelatedRecordId

-   **Type**: reference
-   **Properties**: Create, Filter, Group, Sort
-   **Description**: The account with the resource preference. This is a polymorphic relationship field.
-   **Relationship Name**: RelatedRecord
-   **Relationship Type**: Lookup
-   **Refers To**: Account

### ResourcePreferenceNumber

-   **Type**: string
-   **Properties**: Autonumber, Defaulted on create, Filter, Sort
-   **Description**: An auto-generated number identifying the resource preference.

### ServiceResourceId

-   **Type**: reference
-   **Properties**: Create, Filter, Group, Sort, Update
-   **Description**: The service resource that is preferred, required, or excluded. This is a relationship field.
-   **Relationship Name**: ServiceResource
-   **Relationship Type**: Lookup
-   **Refers To**: ServiceResource

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[ResourcePreferenceFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object.

[ResourcePreferenceHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object.

