Explain webhook patterns for Salesforce — inbound and outbound.
Suggested answer
Outbound Webhook (Salesforce → External): Salesforce pushes data to an external HTTP endpoint when a record event occurs. Implementation options:
- Outbound Messaging: SOAP-based, workflow-triggered. Good for guaranteed delivery but SOAP-only.
- Apex Trigger + Queueable callout: Flexible REST-based outbound call. Can use Named Credentials. Must handle retry and error logging.
- Platform Event → External subscriber: External system subscribes via CometD or MuleSoft. Decoupled and scalable.
Inbound Webhook (External → Salesforce): An external system pushes data into Salesforce. Implementation options:
- Salesforce REST API: External system calls the standard REST API to create/update records. Requires OAuth authentication.
- Apex REST (@RestResource): Custom endpoint exposing business-logic-aware entry points (e.g., /services/apexrest/orders/). Ideal for complex inbound processing.
- Experience Cloud API endpoint: For partner-facing ingestion without full Salesforce credentials.
Always validate incoming payloads, authenticate callers, and handle idempotency on inbound webhooks.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.