How do declarative Outbound Messages transmit event notifications to external listeners without writing Apex code?
Answer
Basics: It is a "push on change" mechanism: when a record meets criteria, Salesforce posts an XML message to a URL you configure. The receiver replies with an acknowledgement. Important correction: Outbound Messages belong to Workflow Rules. Flow has no Outbound Message action, and Workflow Rules are retired (end of support December 31, 2025; existing rules keep running, but do not build new ones). For new designs use Platform Events, Change Data Capture, or the Flow HTTP Callout action.
How it works:
- Setup > Outbound Messages > New: choose object, endpoint URL, fields to send, optional "Send Session ID".
- Attach the message as an action to a Workflow Rule (on create or update criteria).
- After the transaction commits, Salesforce queues the message and delivers it asynchronously.
- The listener must return a SOAP
Ackof true. - If delivery fails, Salesforce retries with growing intervals for up to 24 hours, then drops it (verify the current window).
- Monitor under Setup > Outbound Messaging Delivery Status.
Advanced / deep dive: The message uses a generated WSDL, includes the notification, org ID and the record sObject with chosen fields. Because delivery is retried, the same message can arrive more than once and order is not guaranteed, so the receiver must be idempotent (use the notification Id and record Id with timestamps). Messages are sent as the system, so the receiver should validate the source (IP ranges, mutual TLS or the session ID callback). The session ID option lets the listener call back into Salesforce, but consider the security implications. Modern replacements: Platform Events (publish from Flow or Apex, subscribe via Pub/Sub API), CDC for record changes, and Flow HTTP Callout/External Services for pushing REST payloads. These give JSON, replay (72-hour retention) and better governance.