Design automatic case creation from IoT asset alerts without creating case storms.
Your confidence:Not rated
Model answer
- Don't send raw telemetry to Salesforce. Detect anomalies and correlate upstream in the IoT or stream platform: windowing per asset and fault, plus fleet-level cascade detection.
- Publish incidents as a high-volume Platform Event through the Pub/Sub API, with an incident key, asset serial, fault code, severity and timestamps.
- Subscribe idempotently: an Apex trigger (batch processing) upserts a Case on
Incident_Key__c. Repeat alerts increment a counter and update last-seen instead of creating cases. - Enrich: link the Asset and the entitlement from the service contract, set priority from severity and contract, and route via Omni-Channel.
- Cascades: a fleet-wide fault creates one parent incident with child cases per affected customer.
- Resilience: replay from the stored replay ID after subscriber outages, monitor publishing and delivery allocations โ verify, and dead-letter logging for poison events.
- Next steps: remote diagnosis, then a work order into Field Service if on-site work is needed.
โ Key points to hit
โ Red-flag answers
- One case per raw alert
- Synchronous REST inserts from devices
- No idempotency (duplicates on replay)
- Correlation logic inside Flow at telemetry scale
โช Follow-ups
Why Platform Events over direct REST inserts?
Events decouple the publisher from Salesforce transaction limits and availability, allow replay after an outage, let several consumers react to one event, and are processed in batches by triggers. Direct inserts couple the IoT platform to Salesforce latency and limits, and lose messages during outages unless the publisher queues them.
What happens if the subscriber fails for an hour?
Events are retained for a limited window (high-volume events are kept for a period such as 72 hours โ verify). The subscriber resumes from its last replay ID, and idempotent processing makes reprocessing safe. Monitor subscriber health and alert on lag.