Shopify + Salesforce
Connect Shopify and Salesforce to Unify Commerce and CRM Data
Automatically sync customers, orders, and revenue data between your storefront and your CRM so every team works from the same numbers.
Why integrate Shopify and Salesforce?
Shopify powers millions of storefronts worldwide, and Salesforce is the dominant CRM platform — together, they cover the full arc of a customer relationship, from first purchase to long-term account. When the two run separately, sales teams lose purchase context, marketing runs on stale data, and support agents have to ask customers to repeat themselves. Integrating Shopify with Salesforce on tray.ai closes those gaps by keeping data moving between your commerce engine and your CRM in real time.
Automate & integrate Shopify & Salesforce
Use case
Sync New Shopify Customers to Salesforce as Leads or Contacts
Every time a new customer places an order or creates an account on Shopify, tray.ai automatically creates or updates a matching Lead or Contact record in Salesforce. Duplicate detection keeps your CRM data clean, and custom field mappings carry over email, phone, location, and acquisition source. Sales and marketing can start working new buyers immediately, without any manual data entry.
Use case
Create Salesforce Opportunities from High-Value Shopify Orders
When a Shopify order exceeds a revenue threshold or includes specific products, tray.ai can automatically generate a Salesforce Opportunity and assign it to the relevant account owner. Your B2B or wholesale sales team can follow up while the purchase is still fresh. Custom rules let you define what counts as high-value based on your own business logic.
Use case
Log Shopify Orders as Salesforce Activities and Order Objects
Build a complete purchase history for every customer inside Salesforce by logging each Shopify order as a custom Order object or Activity record. Support agents and account managers can see every product purchased, order status, and fulfillment detail without leaving Salesforce. That single view cuts handle time and makes for noticeably better customer conversations.
Use case
Trigger Salesforce Marketing Cloud or Pardot Campaigns from Shopify Events
Use Shopify behavioral events — first purchase, repeat order, cart abandonment, product return — as triggers for targeted Salesforce marketing campaigns. tray.ai listens for these Shopify webhooks and passes the relevant customer and product data into Salesforce Marketing Cloud or Pardot journeys in real time. Personalized, timely outreach happens automatically instead of as a manual segmentation exercise.
Use case
Sync Shopify Refunds and Cancellations Back to Salesforce
When an order is refunded or cancelled in Shopify, tray.ai updates the corresponding Salesforce records to match — adjusting Opportunity amounts, updating Contact activity logs, and alerting account owners where appropriate. Keeping refund and cancellation data in sync prevents revenue reporting gaps and means your CRM reflects what you actually earned.
Use case
Update Shopify Customer Tags Based on Salesforce Segment or Lifecycle Stage
When a Salesforce Contact moves to a new lifecycle stage, customer segment, or account tier, tray.ai can automatically update that customer's tags in Shopify. Your Shopify store can then serve personalized pricing, content, or promotions based on CRM data — for example, applying a wholesale price list tag when a B2B account is approved in Salesforce.
Use case
Generate Salesforce Cases from Shopify Order Issues
When a Shopify order is flagged with a fulfillment exception, a chargeback, or a negative review, tray.ai can automatically open a Salesforce Service Cloud Case with the full order context attached. The right support agent is assigned based on product line, geography, or account tier, and SLA timers start immediately. Resolution teams get the full picture without hunting across systems.
Get started with Shopify & Salesforce integration today
Shopify & Salesforce Challenges
What challenges are there when working with Shopify & Salesforce and how will using Tray.ai help?
Challenge
Avoiding Duplicate Records Across Both Platforms
Shopify customers can place orders as guests or with multiple email addresses, making it hard to reliably match them to existing Salesforce Contacts or Accounts without creating duplicates.
How Tray.ai Can Help:
tray.ai's data mapping and conditional logic lets you configure multi-field matching — checking email, phone, and name combinations — before creating any new Salesforce record. You can also run an upsert pattern that updates existing records rather than spawning duplicates, keeping your CRM clean without manual deduplication work.
Challenge
Handling High-Volume Order Events Without Data Loss
During peak periods like Black Friday or flash sales, Shopify can fire thousands of webhook events per hour. Without reliable queuing, CRM sync workflows get overwhelmed and events get dropped or processed out of order.
How Tray.ai Can Help:
tray.ai runs on a scalable, event-driven architecture that queues and processes webhook payloads reliably even during high-throughput spikes. Each Shopify event is handled independently, so no order or customer update gets lost during your busiest sales periods.
Challenge
Mapping Complex Shopify Order Structures to Salesforce Data Models
A single Shopify order contains nested objects — line items, shipping addresses, discount codes, fulfillments, tax details — that don't map cleanly to standard Salesforce fields without real transformation logic.
How Tray.ai Can Help:
tray.ai's visual workflow builder and JavaScript expression engine let you parse, flatten, and transform complex nested Shopify payloads into exactly the field structure your Salesforce org expects. Custom object schemas, related record creation, and conditional field mapping all live within a single workflow — no custom code deployments required.
Challenge
Keeping Salesforce Revenue Data Accurate After Refunds and Edits
Shopify orders get modified after creation all the time — partial refunds, address changes, discount applications, cancellations — and all of it needs to land in Salesforce to keep reporting accurate.
How Tray.ai Can Help:
tray.ai listens for the full range of Shopify order lifecycle webhooks, not just creation events, and maps each update type to the right Salesforce action. Whether an order is partially refunded or fully cancelled, the corresponding Salesforce records update automatically, keeping your revenue dashboards consistently accurate.
Challenge
Respecting Salesforce API Rate Limits at Scale
Salesforce enforces strict API call limits per 24-hour period, and a high-volume Shopify store can burn through them quickly if every order event triggers multiple individual Salesforce API calls.
How Tray.ai Can Help:
tray.ai manages Salesforce API consumption by supporting bulk upsert operations, batching related record updates, and using Salesforce Composite API calls where possible. Built-in retry logic and rate-limit awareness keep your integration stable without requiring manual throttling configuration.
Start using our pre-built Shopify & Salesforce templates today
Start from scratch or use one of our pre-built Shopify & Salesforce templates to quickly solve your most common use cases.
Shopify & Salesforce Templates
Find pre-built Shopify & Salesforce solutions for common use cases
Template
New Shopify Customer to Salesforce Contact Sync
Automatically creates or updates a Salesforce Contact whenever a new customer registers or places their first order in Shopify, with duplicate checking and full field mapping.
Steps:
- Listen for the Shopify customer/create or order/create webhook event
- Search Salesforce for an existing Contact matching the customer's email address
- Create a new Salesforce Contact or update the existing record with Shopify customer fields
Connectors Used: Shopify, Salesforce
Template
Shopify Order to Salesforce Opportunity Creator
Monitors incoming Shopify orders and creates a Salesforce Opportunity for orders that meet configurable value or product criteria, assigning them to the correct owner.
Steps:
- Receive Shopify order/create webhook and evaluate order total against threshold rules
- Look up the matching Salesforce Account or Contact by customer email
- Create a Salesforce Opportunity with line-item detail, amount, and assigned owner
Connectors Used: Shopify, Salesforce
Template
Real-Time Shopify Order History Sync to Salesforce
Continuously logs every Shopify order as a custom Order object in Salesforce, giving all CRM users a live, searchable purchase history for every customer.
Steps:
- Trigger on every Shopify order/paid or order/fulfilled webhook event
- Map Shopify order fields — line items, SKUs, totals, fulfillment status — to Salesforce Order object fields
- Upsert the Salesforce Order record and relate it to the parent Contact or Account
Connectors Used: Shopify, Salesforce
Template
Shopify Refund and Cancellation Sync to Salesforce
Keeps Salesforce revenue and activity records accurate by reflecting Shopify refunds and cancellations in real time, including Opportunity updates and owner notifications.
Steps:
- Listen for Shopify refund/create or order/cancelled webhook events
- Find the related Salesforce Opportunity or Order record by order ID
- Update the record amount and status, then send an internal Salesforce Chatter notification to the account owner
Connectors Used: Shopify, Salesforce
Template
Salesforce Lifecycle Stage to Shopify Customer Tag Automation
Updates Shopify customer tags whenever a Salesforce Contact or Account changes lifecycle stage, enabling storefront personalization driven by CRM data.
Steps:
- Detect a Salesforce Contact or Account field update via Salesforce Outbound Message or polling
- Map the new lifecycle stage or segment value to the corresponding Shopify customer tag
- Call the Shopify API to update or replace the customer's tags accordingly
Connectors Used: Salesforce, Shopify
Template
Shopify Fulfillment Exception to Salesforce Service Cloud Case
Automatically opens a prioritized Salesforce Service Cloud Case when a Shopify order hits a fulfillment exception, chargeback, or fraud flag, with full order context attached.
Steps:
- Listen for Shopify fulfillment/create failure events or order risk assessment webhooks
- Retrieve the full Shopify order payload including customer details, line items, and risk score
- Create a Salesforce Case with priority, subject, and description populated, then route to the correct queue
Connectors Used: Shopify, Salesforce