AEM and Salesforce: sending form leads into the CRM
Adaptive forms are the easy part of lead capture. A team in Sydney or Melbourne can build a multi-step Adobe Experience Manager form in an afternoon, wire it to a landing page, and watch the submissions arrive. The difficult part begins the moment the form hands its payload to Salesforce: the JSON has to match a rigid schema, the record has to be recognised as new rather than duplicate, and the transfer has to survive a timeout, a quota limit or a failed validation without anyone noticing a lead has vanished.
That conversation surfaced repeatedly at CIRCUIT, Adobe's two-day developer conference in Chicago, where Java developers, architects and systems engineers compared approaches to AEM integrations, microservices, analytics and mobile delivery. The session recordings from the 2015 and 2016 events remain a useful reference, because the underlying question has not changed: how do you move data reliably between an Experience Manager front end and a CRM that never accepted the payload format you assumed it wanted?
What follows is the path most teams settle on after the first round of trial and error. It covers why synchronisation fails at the boundary, how to map adaptive form fields onto Salesforce objects, which integration pattern to choose, how to keep the pipeline observable and replayable, and what Australian privacy, consent and residency expectations add to the design.
Context matters here, because Australian implementations carry a few distinctive wrinkles. Sales and marketing teams often run Salesforce in the Sydney region while their authoring tier sits on infrastructure bought through a global cloud provider, so data can cross a border during the hand-off. Support hours are staggered by eight to ten hours from US-based partners, and lead volume is spiky rather than smooth: a retail campaign at six in the morning Eastern Sydney time can overwhelm a synchronous endpoint that handled a trickle of enquiries the week before.
Why lead sync breaks at the boundary
Adaptive forms validate brilliantly and then hand off data that assumes a friendly receiver. A standard AEM submission posts a JSON payload to the form's action URL. The receiver expects a specific structure, a specific content type and a specific set of mandatory fields. When Salesforce sits behind that URL, the mismatch shows up as a 400 response from the REST API, a duplicate record, or something worse: a successful response nobody ever inspected.
The failures are rarely exotic. A multi-step form that posts only the final step loses everything captured earlier. A hidden field added for campaign tracking arrives empty and collides with a required Salesforce field. A date and time string without a zone offset lands hours off, because Australian teams run on AEST and ACST while the CRM instance ticks over in US Pacific. Checkbox consent can be dropped by a boolean-to-string conversion, which quietly removes the evidence your marketing team needs later.
The durable fix is to treat every submission as an event with an identity rather than a fire-and-forget request. Assign a unique submission identifier in the form itself, carry it through the workflow, and store it against the Salesforce record as an external ID. That single change turns a replay from a duplicate-farming problem into a harmless upsert, and it gives support teams something concrete to search for when a salesperson says a lead never arrived.
Mapping the payload onto Salesforce objects
Mapping is where most of the effort goes, and it pays to be explicit. The adaptive form's data model produces a nested JSON structure, while a Salesforce Lead wants a flat record with a small number of mandatory fields, including LastName and Company. Many Australian marketing forms collect neither a company nor a surname in that order, so a sensible convention is to default Company to a placeholder such as "Individual" rather than rejecting an otherwise valid enquiry, and to derive LastName from the full name field with a documented fallback.
The remaining fields benefit from the same discipline. Email, phone, suburb and postcode map directly. LeadSource should be set through an org-specific picklist value rather than a hard-coded string, because the option set is configured locally and differs between a Sydney org and a global template. Campaign tracking, the referring page and UTM parameters belong in a Description or a dedicated set of custom fields, which keeps them out of the way of deduplication rules. Date and time values should be sent as ISO 8601 with an offset, and currency should be paired with an explicit currency code.
Custom objects earn their place when a form captures something the standard Lead layout cannot hold, such as a vehicle valuation, a course preference or a tenancy application. Build those with external ID fields and clear ownership, otherwise the marketing team will keep creating parallel spreadsheet-shaped objects in the CRM and the integration will fragment. The framing that helped most here came from ICF Olson's Circuit session, which treated a form submission as an integration concern with data governance attached, rather than as a front-end problem that happens to end at a submit button.
Choosing an integration pattern that fits
There are four workable approaches, and the right choice depends on who will maintain it. A direct post from the form action to the Salesforce REST API is the simplest and works fine for low-volume forms, but it puts retries in the hands of a visitor's browser and leaves no durable record of failures. An AEM workflow with a scheduled Sling job adds instance history, configurable retry behaviour and a place to inspect stuck steps, at the cost of OSGi configuration discipline.
A middleware service with a durable queue sits between the two. The form posts to an endpoint that acknowledges quickly, the service validates and transforms the payload, and a worker delivers it with controlled redelivery. That is the pattern most teams adopt once lead volume becomes unpredictable, because a queue absorbs campaign spikes and gives you a dead-letter path for genuinely bad data. Integration platforms and iPaaS tools offer the same shape with less code, but they add a vendor, a second data store and a licence line to maintain.
Whichever route you take, treat configuration as code. Keep the field mapping, picklist lookups and endpoint definitions in version control, promote them through the same pipeline as your AEM bundles, and record the Salesforce API version you target so a seasonal update cannot silently change behaviour under you. Some teams bring in delivery partners for a focused proof of concept; GP Technical Airlift is one example of the kind of specialist engagement that can produce a working mapping and a test harness inside a sprint, which is often faster than building the muscle in-house.
Keeping submissions reliable and replayable
Reliability work is unglamorous and decisive. The two failure modes that matter are silent loss and duplicate creation, and both are cheap to prevent once you have identifiers, queues and logging in place.
Common causes of silent failure:
- Form fields posted only from the final step of a multi-step form
- API quota exhaustion during a campaign, returning an error nobody reads
- A mapping change deployed without a versioned fallback for in-flight payloads
- Records landing in a sandbox or the wrong org after an environment switch
Checks worth adding before go-live:
- Persist every submission ID against the CRM external ID and count mismatches daily
- Log HTTP status, Salesforce error codes and payload hashes to a searchable sink
- Alert on queue depth and oldest message age rather than on error rate alone
- Run a scheduled reconciliation comparing form submission counts with CRM record counts
Transport itself is often the least glamorous choice. Many architects point to AEM replication agents as a practical way to move payloads between instances when the author tier stays available, because replication gives you ordered delivery and a retry policy without writing a transport service. For lead data, replication from author to a dispatching server, or from publish to author, can carry the submission package reliably enough that the transform and CRM write happen in one controlled place, away from the visitor's request thread.
Consent, privacy and residency in Australia
Australian requirements shape the mapping more than engineers expect. The Privacy Act 1988 and the Australian Privacy Principles govern how collected information is used, and APP 8 requires you to account for disclosures of personal information overseas. Because Salesforce operates an Australian data centre region, many local organisations choose the Sydney instance so lead records stay onshore, but the integration layer still needs to declare what it sends and where it lands, particularly if a middleware service runs in another jurisdiction or a CDN caches payloads at the edge.
Marketing consent deserves its own field. Do not infer permission to call or email a lead from the fact that they completed a form. Capture an explicit choice, store the timestamp and the wording shown at the time, and honour it in the CRM and downstream tools. The Spam Act 2003 requires consent for commercial email, and marketers should also respect the Australian Communications and Media Authority do-not-call register before dialling a new enquiry. A tick box that never survives the payload mapping is not consent, it is a dispute waiting to happen.
Security and operational hygiene round out the picture. Notifiable Data Breaches obligations apply if lead data is lost or compromised, which means the integration needs an audit trail rather than an ephemeral log. Teams working to the ASD Cyber Security Baseline typically add secrets rotation for Salesforce connected apps, IP allow-listing on middleware endpoints, and quarterly access reviews for the mapping service account. Accessibility and channel expectations add one more local detail: with most Australians now encountering campaign forms on a phone, a form that submits successfully on desktop but times out on mobile data will quietly cost more leads than any integration defect.
Weighing the four approaches against each other:
| Pattern | Typical latency | Failure handling | Best suited to |
|---|---|---|---|
| Direct post from form to Salesforce REST API | Seconds | Browser-level retry only, silent failures common | Low-volume forms with one destination |
| AEM workflow with scheduled job | Minutes | Workflow instance history and re-run | Teams already managing OSGi configuration |
| Middleware service with durable queue | Seconds to minutes | Redelivery, dead-letter, replay | Spiky campaign volume and multiple targets |
| Integration platform or iPaaS | Minutes | Vendor-managed retries and logs | Organisations without a Java platform team |
The patterns line up like this.
Ready to get your lead pipeline audited? Book a forty-five-minute mapping workshop with our AEM and integration engineers and leave with a field-by-field plan, a sample payload transformed into a valid Salesforce record, and a short list of the changes required before your next campaign goes live. Bring your current form definition and a redacted export of your Lead layout, and we will run the mapping against real data rather than a screenshot. If you prefer to start on your own, the CIRCUIT session archive is a good place to compare approaches, and a small pilot form connected to a sandbox org will tell you more in an afternoon than another design document ever will.