Newer Version Available

This content describes an older version of this product. View Latest

Filtered Subscriptions

Reduce the number of PushTopic event notifications by specifying record fields to filter on when you subscribe to a channel.

Specify the filter criteria in an expression you append to the subscription URI, as follows.

/topic/ChannelName?<expression>

ChannelName is the channel, and <expression> is the expression containing one or more conditions. Join conditions with the & operator. Only the & operator is supported. Use this syntax for the <expression>.

?fieldA=valueA&fieldB=valueB&...

Include each field used in a filter condition in the PushTopic query. The & operator acts like the logical OR operator, so record events are matched if any condition is true.

If you use an ID in filter criteria, use the 18-character ID format; 15-character IDs aren’t supported.

Note

Example

This subscription returns event notifications for records whose industry is Energy or shipping city is San Francisco.

1/topic/myChannel?Industry='Energy'&ShippingCity='San Francisco'

The PushTopic query for this subscription includes the Industry and ShippingCity fields.