---
schema_version: "1"
id: 44486aa447884aa70a9d07cb0173de6fbf6428029522aa85e3e331f16c4054e8
title: AssignmentRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_assignmentrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assignmentrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 66711d830935d87c76c84410e97bb69ded81ba9c0e3c3d1466a2c1835af111b8
description: Represents an assignment rule associated with a Case or Lead.
---
# AssignmentRule

Represents an assignment rule associated with a Case or Lead.

## Supported Calls

describeSObjects(), query(), retrieve(), search()

## Special Access Rules

- This object is read only. Assignment rules are created, configured, and deleted in the user interface.
- Customer Portal users can’t access this object.

## Fields

| Field | Details |
| --- | --- |
| Active | 
Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether this assignment rule is active (true) or not (false).



 |
| Name | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Name of this assignment rule.



 |
| SobjectType | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Type of assignment rule—Case or Lead.



 |

## Usage

Before creating or updating a new Case or Lead, a client application can query (by name) the AssignmentRule to obtain the ID of the assignment rule to use, and then assign that ID to the assignmentRuleId field of the AssignmentRuleHeader. The AssignmentRuleHeader can be set using either SOAP API or REST API.

Assignment rules can also be specified when creating or upserting Case or Lead objects via the Bulk API or the Bulk 2.0 API.

#### See Also

- [Overview of Salesforce Objects and Fields](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm "Salesforce objects and fields are analogous to database tables and the table columns. Objects and fields structure data. For example, the central object in the Salesforce data model represents accounts—companies and organizations involved with your business, such as customers, partners, and competitors.")