{"id":"81666ff4-7c2d-4460-a422-5b24450a2b85","task":"Publish a Salesforce Platform Event from an external system and handle the subscriber response","domain":"salesforce.com","steps":["Define a Platform Event object in Setup (MyEvent__e) with the required fields; note the full API name including the __e suffix.","From an external system, POST to /services/data/vXX.0/sobjects/MyEvent__e/ with a JSON body containing the event's field values — treat it like a regular sObject insert.","Confirm the response contains 'success': true and a generated ID; Platform Events do not truly persist as records, so the ID is ephemeral.","Subscribers (Flows, Apex triggers on Platform Events, or external CometD clients) receive the event asynchronously; design for eventual delivery, not synchronous confirmation.","For external subscribers, connect to /cometd/vXX.0/ using a CometD client, subscribe to /event/MyEvent__e, and supply the replayId -1 to receive new events or a stored replayId to replay from a checkpoint.","Implement replayId persistence in the subscriber so that a restart replays any events missed during downtime, up to the 72-hour retention window."],"gotchas":["Platform Events published via the REST API are subject to the org's Platform Event publishing allocation — high-volume publishers should monitor the org limit via the Limits API.","Subscribers connected via CometD must re-handshake within the session timeout (default 40 seconds) or they will be disconnected and miss events without a stored replayId to recover.","High-volume Platform Events (>100k/day) should use the Pub/Sub API gRPC interface instead of CometD for reliable, back-pressure-aware consumption."],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/81666ff4-7c2d-4460-a422-5b24450a2b85"}