Skip to main content

Integration

Shopify and Salesforce Integration

Custom API integration pushing Shopify order and account data into Salesforce for B2B sales teams managing wholesale, trade, and high-value customer accounts.

Shopify
Salesforce

Integration

What This Integration Does

This integration pushes Shopify order data into Salesforce so that B2B sales teams see every transaction against the accounts they manage, without switching between systems or waiting for someone to update a spreadsheet. Orders placed through Shopify appear as Salesforce opportunities with full line-item detail, linked to the correct account and contact records.

For businesses that sell through both direct sales and an online store, this solves a persistent visibility problem. Sales reps working an account in Salesforce can see that account’s Shopify orders alongside their own pipeline. They can spot changes in ordering patterns and understand the full commercial relationship, not just the deals they have personally closed.

The integration maps Shopify’s e-commerce data model onto Salesforce’s CRM objects using custom fields and object relationships specific to your org. Shopify thinks in orders and line items; Salesforce thinks in opportunities and products. The integration translates between the two cleanly so your sales team works with data that fits their existing processes. It sits within our e-commerce and CRM integrations portfolio alongside the WooCommerce and Salesforce Integration for teams not on Shopify.

The Workflow

Shopify order webhooks trigger the sync. When an order is placed, a webhook fires to your Laravel backend. The payload is verified, normalised, and dispatched to a queue job that handles the Salesforce API calls.

The job first resolves the Shopify customer to a Salesforce account. It searches by email, then by company name, with configurable matching rules for your data. If the account exists, the order is linked to it. If no match is found, the system either creates a new account or routes the order to a review queue for manual assignment. You choose which behaviour during setup.

Each order becomes a Salesforce opportunity in a dedicated e-commerce pipeline with stages reflecting order status: placed, paid, shipped, delivered, and closed. Line items map to Salesforce products and price book entries. Order metadata (discount codes, shipping method, notes) is stored in custom fields on the opportunity record.

Refunds and cancellations in Shopify trigger updates to the corresponding opportunity. A full refund moves the opportunity to a cancelled stage. Partial refunds adjust the amount and add a note with the refund details. The opportunity history in Salesforce shows the complete lifecycle of each order.

A scheduled reconciliation job runs daily, comparing order totals between Shopify and Salesforce to catch any webhooks that failed to process. Discrepancies are logged and flagged for review.

Before and After

Before: Sales reps manage their pipeline in Salesforce but have no visibility into what the same accounts are ordering through the Shopify store. Account reviews require pulling Shopify exports and manually cross-referencing. When a key account’s online ordering drops, nobody notices for weeks. Reporting on total account revenue requires combining data from two systems in a spreadsheet.

After: Every Shopify order appears on the relevant Salesforce account automatically. Reps see online and direct revenue in one view. A drop in ordering frequency is visible immediately in the account timeline. Salesforce reports and dashboards include e-commerce revenue alongside direct sales, giving management an accurate picture of each account’s total value.

Who Needs This

This integration is built for B2B and hybrid businesses that use Shopify for online ordering and Salesforce for managing customer relationships and sales pipelines. It is most valuable when the same customers who buy through your store are also managed by a sales team: trade accounts, wholesale clients, or enterprise customers with both self-serve and rep-assisted purchasing.

It also fits D2C brands that have grown to the point where high-value customers warrant dedicated account management. When individual customers become strategically important, their purchase history needs to be where the account manager works, and that is Salesforce.

If your sales team’s account reviews involve tabbing between Shopify admin and Salesforce, or if someone on your operations team spends hours each week reconciling order data between the two platforms, this integration removes that friction.

How We Build This

The project begins with mapping your Salesforce org structure: which objects, fields, and pipelines will hold e-commerce data, and how Shopify customers map to Salesforce accounts and contacts. If your org uses custom objects or non-standard account hierarchies, we accommodate that in the mapping.

We authenticate against Salesforce using OAuth 2.0 with the JWT bearer flow, which suits server-to-server integrations that run without user interaction. The integration uses Salesforce’s REST API with composite requests to create or update multiple related objects in a single call, minimising API consumption. For a full picture of the APIs involved, see the Salesforce API Integration and Shopify API Integration pages.

Shopify webhooks are registered through the Admin API with HMAC verification on every delivery. Each event type has a dedicated handler with retry logic and dead-letter tracking for events that fail after multiple attempts.

Initial setup includes a historical backfill, importing existing Shopify orders into Salesforce so the integration does not start from a blank slate. We run this as a batched process to stay within Salesforce’s API limits. Post-launch, we provide a monitoring endpoint that reports sync status, lag, and error rates.

Ready to Connect Shopify and Salesforce?

Your sales team should not have to guess what their accounts are doing in your store. We will build the connection that brings Shopify order data into Salesforce where it belongs, sitting alongside the rest of the account relationship.

Get in touch to scope your Shopify and Salesforce integration.

Related

Written by

Alex

CEO

I’m a software developer and CEO of Digital Royalty, helping growing teams scale their SaaS platforms without losing quality, visibility, or control. I focus on building structured, maintainable systems with clear processes, reporting, and accountability. With over a decade of experience across agency and in-house roles, I specialise in delivering long-term, scalable solutions that support complex, evolving products.

Portrait of Alexander De Sousa, founder of Digital Royalty
Founder-led
“I’ve put everything I know into how this company works — the standards, the method, the care on every project. It runs through the whole team, and I hold us all to it.”

Alexander De Sousa · Founder LinkedIn

Featured on BBC Radio Solent

Get started

Tell us what you need

A few quick questions, then a straight answer from a real person — usually within a few hours.

Tell us what you're working on

Whether it's a new site, a platform, or a process that shouldn't be manual any more — we'll tell you honestly if we can help.