---
schema_version: "1"
id: 13fda8f8cb84da451385f58dce8545afbbb218669c80004a6713117fa277d773
title: SchedulingObjective
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_schedulingobjective.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_schedulingobjective.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e8cf64ffda8b833d6d1864095a08d4addaa8ecc258c72227450426f79da3b654
description: Represents a scheduling objective in Workforce Engagement. Scheduling objectives define business goals that the scheduling tools consider when identifying agents for shifts.
---
# SchedulingObjective

Represents a scheduling objective in Workforce Engagement. Scheduling objectives define business goals that the scheduling tools consider when identifying agents for shifts.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Suffix and Directory Location

SchedulingObjective components have the suffix .SchedulingObjective and are stored in the SchedulingObjective folder.

## Version

SchedulingObjective components are available in API version 55.0 and later.

## Special Access Rules

This type is available only if Workforce Engagement is enabled in your org. To view, create, edit, and delete records, the user requires the Workforce Engagement Planner permission set.

## Fields

| Field Name | Description |
| --- | --- |
| isProtected | 
Field Type

boolean

Description

Indicates whether the component is protected (true) or not (false). The default value is false.



 |
| masterLabel | 

Field Type

string

Description

Required. The name of the objective.



 |
| schedulingCategory | 

Field Type

SchedulingCategory (enumeration of type string)

Description

Required. What the scheduling logic applies the objective to. The valid values are:

- A—Service Appointment
- B—Shift





 |
| schedulingObjectiveParameters | 

Field Type

[SchedulingObjectiveParameter\[\]](#schedulingObjectiveParameterID)

Description

Parameters associated with a scheduling objective, such as the number of days before and after a shift that the logic considers when balancing assignments.



 |
| schedulingObjectiveType | 

Field Type

SchedulingObjectiveType (enumeration of type string)

Description

Required. Specifies the type of objective. Possible values are:

- AgentPreference—In the UI, this value appears as Maximized Preferences.
- BalanceNonStandardShifts
- BalanceShifts





 |

## SchedulingObjectiveParameter

Represents a parameter that’s associated with a scheduling objective.

| Field Name | Description |
| --- | --- |
| parameterKey | 
Field Type

ObjectiveParameterKey (enumeration of type string)

Description

Required. The scheduling objective parameter key. Possible values are:

- DaysAhead
- DaysBack





 |
| value | 

Field Type

string

Description

The scheduling objective parameter value.



 |

## Declarative Metadata Sample Definition

The following is an example of a SchedulingObjective component.

<?xml version="1.0" encoding="UTF-8"?>
<SchedulingObjective xmlns="http://soap.sforce.com/2006/04/metadata">
    <masterLabel\>Balance Shifts</masterLabel\>
    <schedulingCategory\>B</schedulingCategory\>
    <schedulingObjectiveType\>BalanceShifts</schedulingObjectiveType\>
    <schedulingObjectiveParameters\>
        <parameterKey\>DaysAhead</parameterKey\>
        <value\>30</value\>
    </schedulingObjectiveParameters\>
</SchedulingObjective\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <name\>SchedulingObjective</name\>
	<members\>Balance Shifts</members\>
    </types\>
    <version\>55.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").