---
schema_version: "1"
id: 1e9f9329b1d58c5fcd7b7d7338166a74f4106618cbc119afb79cdcec98278208
title: PushTopic
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_pushtopic.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_pushtopic.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7757e80853727efdcf3787e65ab4299671154f92677f44f8bf9b952d40b0edbe
description: Represents a query that is the basis for notifying Streaming API clients of changes to records in an org. This object is available in API version 21.0 and later.
---
# PushTopic

Represents a query that is the basis for notifying Streaming API clients of changes to records in an org. This object is available in API version 21.0 and later.

## Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

## Special Access Rules

- This object is available only if Streaming API is enabled for your org.
- Users with the Create permission can create this record.
- To receive notifications, users must have read access on both the object in the PushTopic query and the PushTopic itself.

## Fields

| Field | Details |
| --- | --- |
| ApiVersion | 
Type

double

Properties

Create, Filter, Sort, Update

Description

Required. API version to use for executing the query specified in Query. It must be an API version greater than 20.0. If your query applies to a custom object from a package, this value must match the package's ApiVersion.

Example value: 68.0





 |
| Description | 

Type

string

Properties

Create, Filter, Nillable, Sort, Update

Description

Description of the PushTopic. Limit: 400 characters



 |
| IsActive | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether the record currently counts towards the organization's allocation.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Required. Descriptive name of the PushTopic, such as MyNewCases or TeamUpdatedContacts. Limit: 25 characters. This value identifies the channel and must be unique.



 |
| NotifyForFields | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update

Description

Specifies which fields are evaluated to generate a notification.

Possible values are:

- All
- Referenced (default)
- Select
- Where





 |
| NotifyForOperationCreate | 

Type

boolean

Properties

Create, Filter, Update

Description

true if a create operation should generate a notification, otherwise, false. Defaults to true. This field is available in API version 29.0 and later.



 |
| NotifyForOperationDelete | 

Type

boolean

Properties

Create, Filter, Update

Description

true if a delete operation should generate a notification, otherwise, false. Defaults to true. Clients must connect using the cometd/29.0 (or later) Streaming API endpoint to receive delete and undelete event notifications. This field is available in API version 29.0 and later.



 |
| NotifyForOperationUndelete | 

Type

boolean

Properties

Create, Filter, Update

Description

true if an undelete operation should generate a notification, otherwise, false. Defaults to true. Clients must connect using the cometd/29.0 (or later) Streaming API endpoint to receive delete and undelete event notifications. This field is available in API version 29.0 and later.



 |
| NotifyForOperationUpdate | 

Type

boolean

Properties

Create, Filter, Update

Description

true if an update operation should generate a notification, otherwise, false. Defaults to true. This field is available in API version 29.0 and later.



 |
| NotifyForOperations | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Restricted picklist, Sort

Description

Specifies which record events may generate a notification.

In API version 29.0 and later, this field is read-only, and doesn’t contain information about delete and undelete events. Use NotifyForOperationCreate, NotifyForOperationDelete, NotifyForOperationUndelete and NotifyForOperationUpdate to specify which record events should generate a notification.

Possible values are:

- All (default)
- Create
- Extended
- Update

A value of Extended means that neither create or update operations are set to generate events.





 |
| Query | 

Type

string

Properties

Create, Filter, Sort, Update

Description

Required. The SOQL query statement that determines which record changes trigger events to be sent to the channel.

Limit: 1,300 characters





 |

## Usage

The PushTopic defines when notifications are generated in the channel. Determine which fields to configure by checking out these links in the Streaming API Developer Guide.

- [PushTopic Queries](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_streaming.meta/api_streaming/pushtopic_queries.htm "HTML (New Window)")
- [Events](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_streaming.meta/api_streaming/events.htm "HTML (New Window)")
- [Notifications](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_streaming.meta/api_streaming/notifications.htm "HTML (New Window)")

#### See Also

- [_Streaming API Developer Guide_](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_streaming.meta/api_streaming/intro_stream.htm "
    Streaming API Developer Guide
    - HTML (New Window)")