forcedotcom/sf-skills / plugins/builder/integration/skills/integration-eventing-subscription-configure
integration-eventing-subscription-configure
VerifiedCreate, read, update, and delete ManagedEventSubscription metadata in Salesforce. Use this skill for any work involving managed event subscriptions, platform event subscriptions, event channel subscribers, or .managedEventSubscription-meta.xml files. TRIGGER when: user asks to subscribe to a platform event, create a managed subscription, set up event replay, configure an event channel subscriber, update replay preset, activate or deactivate a subscription, delete a subscription, or manage ManagedEventSubscription metadata. SKIP when: user needs to create the platform event channel itself (use platform-custom-object-generate skill) or needs Flow-based event subscriptions (use automation-flow-generate skill).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.0 KB |
| assets/managed-event-subscription-template.xml | config | 1.1 KB |
| references/delete-guide.md | markdown | 2.1 KB |
| references/topic-name-formats.md | markdown | 1.3 KB |
| references/update-constraints.md | markdown | 1.4 KB |
references/delete-guide.md
View on GitHub# Deleting a ManagedEventSubscription
## Warning
Deleting a ManagedEventSubscription permanently destroys its stored replay position. If you recreate the subscription, it will start from its `<defaultReplay>` — it will not resume from where it left off.
DELETE is safe to call regardless of the subscription's current state — it atomically stops any running subscription, clears the committed Replay ID, and removes the record. **No prior STOP transition is required.**
After deletion, avoid reusing the same DeveloperName immediately — the Pub/Sub API service can take up to ~2 minutes to reflect the deletion. Create a new record with a different name if immediate re-creation is needed.
## Procedure
### Step 1 — Remove the metadata file
Delete the file from your project:
```text
managedEventSubscriptions/<DeveloperName>.managedEventSubscription-meta.xml
```
### Step 2 — Create a destructiveChanges.xml
In your deployment package root, create `destructiveChanges.xml`:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members><DeveloperName></members>
<name>ManagedEventSubscription</name>
</types>
<version>67.0</version>
</Package>
```
Replace `<DeveloperName>` with the exact developer name of the subscription to delete.
### Step 3 — Create an empty package.xml
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>67.0</version>
</Package>
```
### Step 4 — Deploy
```bash
sf project deploy start --manifest package.xml --post-destructive-changes destructiveChanges.xml --target-org <alias>
```
## Common Errors
| Error | Cause | Fix |
|-------|-------|-----|
| `INVALID_CROSS_REFERENCE_KEY` | DeveloperName not found | Confirm the exact name with `sf api request rest "/services/data/v67.0/tooling/query/?q=SELECT+DeveloperName+FROM+ManagedEventSubscription"` |
| Subscription reappears or Pub/Sub returns NOT_FOUND after delete | ~2 minute propagation delay in Pub/Sub API service | Wait 2 minutes before attempting any operation on the same topic |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |