Step 1: Create ManagedEventSubscription with Tooling API

Create a managed subscription configuration for Order_Event__e.

Prerequisites

  • Create the Order_Event__e platform event by following the steps in Step 1: Define a Platform Event in the main Java quick start.
  • To complete the steps, you can use your favorite REST API tool. We recommend using Postman with the Salesforce API Collection, which contains handy templates for Salesforce API calls, including calls for creating ManagedEventSubscription. For instructions on how to set up Postman, see Quick Start: Connect Postman to Salesforce in Trailhead.
  1. Send a POST request to this REST endpoint: /services/data/v61.0/tooling/sobjects/ManagedEventSubscription

    If you’re using Postman, in the Salesforce Platform APIs collection, expand Event Platform and Managed Event Subscriptions, and then click Create managed event subscription. If you don't find the Managed Event Subscriptions folder, refresh the collection. Click View more actions (...) next to the collection name, click Pull changes, and in the new tab, click Pull Changes.

    Use this request body.

  1. After you create the ManagedEventSubscription in Tooling API, the response returned contains the ID of the created ManagedEventSubscription record, similar to this response.