WordPress and Salesforce
Connecting WordPress to Salesforce reliably, and why the checkout is the wrong place to make synchronous API calls.
The requirement
Marketing wants form submissions in Salesforce. Sales wants website activity on the lead record. Finance wants order data reconciled. Each is reasonable, and implemented naively each one adds latency and a failure mode to the visitor's experience.
The reliable pattern
Write the event locally first, then forward it asynchronously with retries. The website's job is to accept the submission and confirm it to the user; getting it into the CRM is a separate concern that should be able to fail and recover without the visitor noticing.
What the integration needs
- An outbound queue with retry and backoff
- An idempotency key so retries do not create duplicate records
- A durable log of what was sent and what Salesforce accepted
- Dead-letter handling with an alert someone acts on
- A reconciliation view for the cases that fail permanently
The failure people forget
Salesforce being slow is not an error. A request that takes thirty seconds and then succeeds will time out at your end while still having been processed, which produces duplicates on retry. Idempotency keys exist precisely for this.
Talk to us about your project
If you are planning a WordPress build, a WooCommerce migration or a growth programme, we will tell you honestly whether it is a fit.