Newer Version Available

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

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>58.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>