Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Obtain Processes That Subscribe to a Platform Event in Metadata API

Use Metadata API to retrieve all processes subscribed to a platform event.
  1. Retrieve all event subscriptions in your org with this sample package manifest.
    1<?xml version="1.0" encoding="UTF-8"?>
    2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    3   <types>
    4      <members>*</members>
    5      <name>EventSubscription</name>
    6   </types>
    7   <version>45.0</version>
    8</Package>
  2. In each .subscription file, look at the referenceData parameter. The value is the API name of a process.

Example

In this .subscription file, referenceData points to version 4 of the Printer_Management process.
1<?xml version="1.0" encoding="UTF-8"?>
2<EventSubscription xmlns="http://soap.sforce.com/2006/04/metadata">
3    <active>true</active>
4    <eventType>Printer_Status__e</eventType>
5    <referenceData>Printer_Management_4</referenceData>
6</EventSubscription>