DigitalGenius

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

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.

Never let a third-party API sit between a visitor and a confirmation message. Queue it, confirm locally, forward afterwards.

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.

Get in touch