Skip to content

Integrations — Streaming XM Cloud forms and events into Salesforce with Sitecore Connect

Created:
Updated:

Leads and contacts are still the currency of many Sitecore projects. Even when I am the only engineer on an XM Cloud build, I have to make sure form submissions and engagement events reach Salesforce reliably or marketing and sales teams will not see the value.

Historically, teams wired Sitecore XP directly to Salesforce with custom APIs or legacy connectors. In the XM Cloud and composable era, Sitecore Connect becomes the primary integration hub:

This post walks through the pattern I use in that situation—a pragmatic design that:

At a glance, the flow looks like this:

Xm Cloud or headless app

Server-side endpoint

Queue or event hub

Sitecore Connect\nflows

Salesforce\nleads and contacts

Customer data platform\nor warehouse


How I model a canonical lead and event schema

Before wiring any connectors, I want to be clear on what I send to Salesforce.

Define a canonical lead/contact schema

I work with marketing and sales to define:

I document this schema in docs/integrations/xm_to_salesforce_schema.md and treat it as a contract.

Map XM Cloud forms to the canonical schema

For each XM Cloud form I:

This mapping can live:


How I capture forms and events from XM Cloud

I need a reliable way to get submissions and events out of XM Cloud and into Connect.

Form submissions

Depending on the architecture:

The pattern I use most often:

  1. The front end submits to a server-side endpoint (Next.js route handler or Azure Function).
  2. This endpoint:
    • validates the payload,
    • logs it (for example in Application Insights),
    • writes a record into a queue or topic (for example Azure Service Bus),
    • optionally triggers a Sitecore Connect webhook or connector.

Engagement events

Likewise, key engagement events (page views, call-to-action clicks, downloads) can be:

I rarely send every event to Salesforce; instead I:


How I use Sitecore Connect as the integration hub

With submissions and events landing in a queue or via webhooks, Sitecore Connect becomes the orchestrator.

Connect to sources and Salesforce

In Sitecore Connect I:

I make sure:

Implement flows for forms and events

Typical flows:

I keep flows small and composable and reuse mappings where possible.


How I handle retries, idempotency, and errors

Integrations fail. Networks glitch. APIs throttle. I try to design for this from day one.

Idempotency keys

I use idempotency keys to prevent duplicates:

I store these keys:

Retry policies and dead letters

I configure Connect and the queue to:

I try to include enough context in logs:


How I think about security, personal data, and regions

These flows handle personal data and sometimes sensitive marketing data.

Data minimization

I only send to Salesforce what is needed:

Regionality and residency

If a project operates in multiple regions, I:

I document these choices for compliance teams.


How I fan out to CDP, data warehouse, and beyond

Once forms and key events are flowing reliably, I usually:

Patterns that work well:

I try to keep:


How I handle observability and stakeholder reporting

Integrations succeed when stakeholders can see what is happening.

I track and report:

I use:

With this foundation, XM Cloud no longer sits as an island; it becomes a first-class source of truth for Salesforce and the rest of the go-to-market stack.



Previous Post
Integrations — Rendering Content Hub content directly via GraphQL
Next Post
Integrations — Series overview and roadmap