Skip to content

Solution 04: ShopWave Omnichannel Retail

AI-Generated Content — Use for Reference Only

This content is AI-generated and has only been validated by AI review processes. It has NOT been reviewed or validated by certified Salesforce CTAs or human subject matter experts. Do not rely on this content as authoritative or completely accurate. Use it solely as a reference point for your own study and preparation. Always verify architectural recommendations against official Salesforce documentation.

Spoiler Warning

Attempt the scenario paper FIRST before reviewing this solution. Set a 180-minute timer, build your own artifacts using the 9 Essential Artifacts checklist, then compare.

Assumptions

  1. ShopWave’s existing Salesforce org (Sales Cloud, 40 users) is Enterprise Edition and can be upgraded; no new org needed
  2. MuleSoft Anypoint Platform for middleware (standard for Salesforce-anchored integration architectures)
  3. Shopify Plus provides REST/GraphQL APIs with webhook support; Square POS supports webhooks for near-real-time push
  4. B2B Commerce (Lightning Experience) is the Salesforce product for the wholesale portal
  5. The 85K Insider subscription members are managed through Stripe Billing and remain there
  6. Budget $8.5M/18 months covers MuleSoft, B2B Commerce, Service Cloud expansion, and SI engagement

Key Architectural Decisions

Decision 1: Keep Shopify Plus — Do NOT Migrate to Commerce Cloud (D4 — HEAVY)

Retain Shopify Plus for DTC because 3 years of marketing customizations (style quiz, promotional engine, recommendation logic) represent significant investment. Commerce Cloud migration adds 6-9 months of replatforming risk, competes with the B2B deadline, and directly violates the VP of Marketing’s non-negotiable. Shopify handles 35K orders/day at peak without issues. The real problem is lack of integration, not the e-commerce platform.

CTA Insight

The board tests whether you can resist consolidating everything onto Salesforce. The right answer is often “keep best-of-breed and integrate” rather than “replace with Salesforce.”

Decision 2: Salesforce as Customer Hub + MuleSoft Orchestration (D4 + D5 — HEAVY)

Salesforce as unified customer system of record with MuleSoft as middleware because the core problem is “six islands that do not talk to each other.” Point-to-point (15+ connections) is unmaintainable.

  • Salesforce: Customer 360 golden record, Service Cloud omnichannel cases, B2B Commerce wholesale portal, Sales Cloud B2B pipeline
  • MuleSoft API-led connectivity: Experience APIs (per channel), Process APIs (orchestration, customer resolution, inventory allocation), System APIs (per backend)

Decision 3: Loyalty on Salesforce + B2B Commerce for Wholesale (D4)

Loyalty Management natively on Salesforce — existing PostgreSQL system is unsupported (contractor unavailable), store associates cannot access it, top customer complaint. Migrate 1.4M members and 8M point transactions; preserve loyalty card numbers as external IDs. Integrate with Shopify checkout and Square POS via MuleSoft for real-time earn/redeem. Go live with in-store loyalty BEFORE B2B launch for quick win.

B2B Commerce for the wholesale portal — natively supports account hierarchies, volume-based pricing, credit terms (Net 30/60/90), and buyer self-service. Rejected custom Experience Cloud portal because the 10-month contractual deadline leaves no room for building catalog, pricing tiers, and order workflow from scratch.

Decision 4: Integration Cadence by System (D5 — HEAVY)

Different patterns per system because each flow has different latency and volume characteristics.

SystemPatternCadenceJustification
Shopify ordersWebhookReal-timeService needs immediate order visibility
Square POSWebhookNear-real-timeLoyalty points must reflect within minutes
NetSuite inventoryPolling + events15-min + stock-outs180 locations, 15K movements/day
NetSuite financialsBatchNightlyFinance needs daily reconciliation
HubSpot contactsBatchEvery 4 hoursMarketing does not need sub-minute data
Stripe paymentsWebhookReal-timeChargebacks need immediate visibility
LoyaltyAPI callReal-timeEarn/redeem at checkout must be synchronous
B2B to NetSuiteEvent-driven<30 minWholesale buyers expect status within 2 hours

Critical Diagrams

Integration Architecture

graph TB
    subgraph Channels["Customer Channels"]
        SHOP[Shopify Plus — 8.5K-35K orders/day]
        SQ[Square POS — 120 stores]
        B2B[B2B Commerce — 88 buyers]
    end

    subgraph Mule["MuleSoft Anypoint — Integration Layer"]
        EXP[Experience APIs]
        PROC[Process APIs — Order, Customer, Inventory]
        SYS[System APIs — Shopify, Square, NetSuite, Stripe, HubSpot]
    end

    subgraph SF["Salesforce — Customer Hub"]
        SC[Service Cloud]
        LOY[Loyalty Mgmt — 1.4M members]
        B2BC[B2B Commerce Engine]
        CDP[Golden Record — Unified Contact]
    end

    subgraph Backend["Backend Systems"]
        NS[NetSuite — Inventory, Finance]
        HUB[HubSpot — Marketing]
        STRIPE[Stripe — Payments]
    end

    subgraph Legend
        direction LR
        NEW[🟢 NEW - Being Built]
        KEEP[⚪ KEEPING - No Changes]
        RETIRE[🔴 RETIRING - Decommissioning]
        INT[🟠 INTEGRATION LAYER]
    end

    SHOP -->|Webhooks real-time| EXP
    SQ -->|Webhooks near-real-time| EXP
    B2B --> B2BC
    EXP -->|Route + transform| PROC
    PROC -->|Customer resolution| CDP
    PROC -->|Earn/redeem real-time| LOY
    PROC -->|Case routing| SC
    SYS -->|Polling 15-min + stock-outs| NS
    SYS -->|Batch every 4 hours| HUB
    SYS -->|Webhooks real-time| STRIPE
    PROC -->|Orchestrate| SYS
    B2BC -->|Order events <30 min| PROC

    style SC fill:#cce5ff,stroke:#0d6efd
    style LOY fill:#d4edda,stroke:#28a745
    style B2BC fill:#d4edda,stroke:#28a745
    style CDP fill:#d4edda,stroke:#28a745
    style EXP fill:#fff3cd,stroke:#fd7e14
    style PROC fill:#fff3cd,stroke:#fd7e14
    style SYS fill:#fff3cd,stroke:#fd7e14
    style SHOP fill:#e9ecef,stroke:#6c757d
    style SQ fill:#e9ecef,stroke:#6c757d
    style B2B fill:#d4edda,stroke:#28a745
    style NS fill:#e9ecef,stroke:#6c757d
    style HUB fill:#e9ecef,stroke:#6c757d
    style STRIPE fill:#e9ecef,stroke:#6c757d

Build vs Buy Decision Matrix

graph LR
    subgraph BUILD["BUILD on Salesforce"]
        B1[Customer 360 Profile]
        B2[B2B Wholesale Portal]
        B3[Loyalty Management]
        B4[Service Cloud Cases]
    end

    subgraph KEEP["KEEP As-Is"]
        K1[Shopify Plus — 3yr investment]
        K2[Square POS — 120 stores]
        K3[NetSuite — Financial SoR]
        K4[Stripe — Payments]
        K5[HubSpot — Marketing]
    end

    style B1 fill:#d4edda
    style B2 fill:#d4edda
    style B3 fill:#d4edda
    style B4 fill:#d4edda
    style K1 fill:#cce5ff
    style K2 fill:#cce5ff
    style K3 fill:#cce5ff
    style K4 fill:#cce5ff
    style K5 fill:#cce5ff

Customer identity resolution: Email is primary match key (used by 4/6 systems). Phone is secondary for Square-only customers. Deterministic matching (exact email) first, then probabilistic (name + zip fuzzy match) for unresolved records. Human review queue for low-confidence matches.

Identity & SSO Flow

sequenceDiagram
    participant Employee as ShopWave Employee<br/>(Sales / Service / Marketing)
    participant Browser as Browser
    participant Okta as Okta (IdP)
    participant SF as Salesforce

    Employee->>Browser: Navigate to Salesforce
    Browser->>Okta: Redirect (SP-initiated SAML 2.0)
    Okta->>Okta: Authenticate (MFA — push or TOTP)
    Okta->>Browser: SAML Assertion (Federation ID = employee email)
    Browser->>SF: POST SAML to ACS URL
    SF->>SF: Match Federation ID → User record
    SF->>SF: Assign profile + permission sets by role
    SF->>Browser: Session Cookie + Redirect
sequenceDiagram
    participant Buyer as B2B Wholesale Buyer
    participant Browser as Browser
    participant SF as B2B Commerce Portal

    Buyer->>Browser: Navigate to B2B Portal
    Browser->>SF: Login page (email + password)
    SF->>SF: Authenticate (MFA recommended)
    SF->>SF: Assign B2B Buyer profile<br/>(account hierarchy determines visibility)
    SF->>SF: Apply sharing: buyer sees own company orders/pricing only
    SF->>Browser: Session Cookie + B2B Storefront

SSO Design Rationale

Internal employees (350 + growing): SAML 2.0 SP-initiated SSO via Okta (standard enterprise IdP for mid-market retail). Okta handles MFA. ShopWave’s existing Sales Cloud org already supports SSO; expanding to the full user base requires Okta group-to-Salesforce permission set mapping for role-based access (service agents, marketing, store associates, B2B sales).

B2B wholesale buyers (88 accounts): Username/password through B2B Commerce portal with MFA recommended. B2B buyers do not share ShopWave’s corporate IdP. Account hierarchy enforcement ensures each buyer sees only their company’s orders, invoices, and pricing (Req 19). Self-registration with admin approval for new buyer contacts.

Store associates (mobile tool): Same Okta SSO flow, accessed via Salesforce Mobile App on store devices. Session timeout set to 8 hours (shift length) to avoid repeated re-authentication during clienteling.

Integration Error Handling

ShopWave’s 8 integrations span real-time, near-real-time, and batch patterns. Error handling is calibrated to business impact — a failed loyalty redemption at checkout is more urgent than a delayed marketing sync.

IntegrationPatternRetryDLQMonitorFallback
Shopify orders (inbound)Webhook → MuleSoft → Salesforce3x exponential (1s, 5s, 30s); Shopify retries 8 times over 4 hours (exponential backoff)MuleSoft DLQ + Integration_Error__c with Shopify order IDAlert to integration team on >5 failures/hour; escalate to on-call during seasonal salesService agents see “order syncing” status; Shopify is SoR for orders — no data loss; manual re-trigger available
Square POS (inbound)Webhook → MuleSoft → Salesforce3x exponential (2s, 10s, 60s)MuleSoft DLQ + Integration_Error__c with Square transaction IDAlert on >10 failures/hour (higher threshold: 120 stores generate noise)In-store transactions continue unaffected; loyalty points queued and applied on reconnect
NetSuite inventory (bidirectional)MuleSoft polling every 15 min + stock-out events2x retry per poll cycleFailed inventory updates logged with SKU + location + timestampAlert to ops team when sync lag exceeds 30 minutes; dashboard shows last-sync per warehouse5% buffer stock on high-velocity SKUs absorbs sync delays; stock check API call at Shopify checkout provides real-time validation
NetSuite financials (outbound)MuleSoft scheduled nightly batch1 automatic re-run at T+3 hoursFailed journal entries in Integration_Error__c with GL codingMorning alert to finance team if nightly batch failsFinance can manually trigger batch re-run; all financial data retained in Salesforce until confirmed in NetSuite
HubSpot contacts (bidirectional)MuleSoft batch every 4 hours1 automatic retry next cycleFailed records in Integration_Error__c with HubSpot contact IDWeekly sync health digest to marketing teamSegments can be manually exported; engagement data (opens/clicks) delayed but not lost — HubSpot retains all data
Stripe payments (inbound)Webhook → MuleSoft → Salesforce3x exponential (1s, 5s, 30s); Stripe retries for 72 hoursMuleSoft DLQ + Integration_Error__c with Stripe event IDImmediate alert on chargeback webhook failures (financial risk); standard threshold for payment confirmationsStripe is SoR for payments; service agents can look up payment status directly in Stripe dashboard as interim
Loyalty earn/redeem (synchronous)Real-time API call via MuleSoft2x immediate retry (100ms, 500ms) — synchronous, so must be fastFailed transactions logged with loyalty card number + attempted actionAlert on >3 failures in 5 minutes (checkout flow is blocked)Circuit breaker: If loyalty service is down, checkout proceeds without points; queued earn/redeem processed when service restores; customer notified via email
B2B orders → NetSuite (outbound)Event-driven via MuleSoft (<30 min)3x exponential (5s, 30s, 300s)Integration_Error__c with B2B order ID and NetSuite payloadAlert to B2B operations team on any failure (wholesale buyers expect portal status updates within 2 hours)B2B order confirmed in Salesforce; NetSuite submission queued; buyer portal shows “processing” status until NetSuite confirms

Seasonal Sales Events — Circuit Breakers

During the 4 annual seasonal sales events (35K orders/day, 4x normal volume), MuleSoft circuit breakers activate on all non-critical integrations if error rates exceed 10%. HubSpot sync and NetSuite financial batch are deprioritized; Shopify order ingestion, Stripe payment processing, and loyalty earn/redeem maintain priority. Load testing at 2x peak (70K orders/day) validates this behavior before each seasonal window.

Governance & DevOps

Environment Strategy

flowchart LR
    DEV1[Dev Sandbox 1<br/>B2B Portal Team] --> QA[QA / Integration<br/>Partial Copy]
    DEV2[Dev Sandbox 2<br/>Loyalty + Service] --> QA
    DEV3[Dev Sandbox 3<br/>Integration Layer] --> QA
    DEV4[Dev Sandbox 4<br/>SI Workstream] --> QA
    QA --> PERF[Performance<br/>Full Copy]
    PERF --> UAT[UAT<br/>Full Copy]
    UAT --> PROD[Production]

    style QA fill:#e3f2fd,stroke:#1565c0
    style PERF fill:#e8f5e9,stroke:#2e7d32
    style UAT fill:#fff3cd,stroke:#fd7e14
    style PROD fill:#fce4ec,stroke:#c62828

Sandbox Strategy

SandboxTypePurposeNotes
DEV-1Developer ProB2B Commerce portal developmentB2B product catalog seed data; mock wholesale accounts
DEV-2Developer ProLoyalty Management + Service Cloud enhancementsSynthetic loyalty members; mock point transactions
DEV-3Developer ProMuleSoft integration development and testingMock API endpoints for all 8 system connections
DEV-4Developer ProSI workstream (parallel to internal team)Isolated from internal dev to prevent merge conflicts
QAPartial CopyIntegration testing with MuleSoft sandboxConnected to Shopify dev store, Stripe test mode, NetSuite sandbox
PERFFull CopyPerformance and load testingMirrors production data volumes; used for seasonal peak simulation (35K+ orders/day)
UATFull CopyBusiness stakeholder acceptanceB2B buyers, service agents, store associates, marketing validate real workflows

Performance Sandbox — Seasonal Necessity

A dedicated Performance sandbox (Full Copy) is essential for ShopWave. The 4x seasonal volume spike (8.5K → 35K orders/day) means integration capacity must be validated before every seasonal event. Load tests simulate 70K orders/day (2x peak) across the full integration chain: Shopify → MuleSoft → Salesforce → NetSuite. This sandbox is refreshed quarterly, 4 weeks before each seasonal sales event.

Branching Strategy

  • main — production-ready; deploys to Production outside of deployment freeze windows
  • develop — integration branch; deploys to QA sandbox
  • feature/[workstream]/[ticket]-description — organized by workstream (b2b, loyalty, service, integration) to manage 4 parallel development tracks (Req 44)
  • release/[version] — release candidate branches cut from develop for UAT validation
  • All merges to develop require peer code review + passing CI (Apex tests + MuleSoft unit tests)
  • Release branches require UAT sign-off from business stakeholders per workstream

Deployment Freeze Windows

EventFreeze PeriodDuration
Spring Sale2 weeks before + during event~3 weeks
Summer Sale2 weeks before + during event~3 weeks
Fall Sale2 weeks before + during event~3 weeks
Holiday Sale2 weeks before + during event~3 weeks

Total annual freeze: ~12 weeks (23% of the year). All releases must be planned around these windows. Emergency hotfixes during freeze require VP of Technology approval + rollback plan.

Testing Strategy

Test TypeEnvironmentScopeCriteria
Apex Unit TestsDeveloper sandboxesAll custom Apex, triggers, Flows>75% coverage; mock callouts for all MuleSoft-invoked APIs
MuleSoft Unit TestsMuleSoft Design CenterAll API specs, transformations, error handlingMUnit tests for each system API, process API, and experience API
Integration TestsQAAll 8 integration connections end-to-endData flows validated with test-mode APIs (Shopify dev store, Stripe test, NetSuite sandbox)
Performance TestsPERF (Full Copy)Seasonal peak simulation70K orders/day sustained for 4 hours; loyalty earn/redeem <500ms p95; inventory sync within 15-min SLA
UATFull CopyAll 4 workstreams validated by business usersB2B buyers test portal; service agents test omnichannel; store associates test mobile clienteling tool
Regression SuiteQACore flows after each releaseAutomated test suite covering order ingestion, loyalty transactions, and B2B order-to-fulfillment

CoE / Post-Go-Live Governance

Team Growth: Internal team grows from 5 (2 admins, 2 devs, 1 architect) to 8-10 during the SI engagement (Req 41). The SI handles B2B Commerce and MuleSoft integration buildout; internal team shadows and takes over workstreams incrementally during Months 12-18.

Release Cadence:

  • Standard releases: Bi-weekly, planned around deployment freeze windows
  • Workstream releases: Each of the 4 parallel workstreams (B2B, loyalty, service, integration) can release independently to QA, but production deployments are consolidated into bi-weekly windows
  • Emergency hotfixes: VP of Technology approval required; mandatory during freeze windows

Ongoing Governance:

  • Monthly integration health review (MuleSoft API usage, error rates, latency trends)
  • Quarterly architecture review before each seasonal sales event (capacity planning, circuit breaker thresholds, buffer stock levels)
  • Annual MuleSoft license review — monitor API call volumes against tier limits as order volumes grow 30% YoY

Requirements Addressed

  1. ✅ Unified customer profile — Golden record in Salesforce resolving identities across 6 systems (email + phone matching) (Reqs 1-2, 12)
  2. ✅ B2B wholesale portal — B2B Commerce with account hierarchies, volume pricing, credit terms, self-service (Req 3)
  3. ✅ Keep Shopify Plus — 3 years of marketing customizations preserved; integrate, don’t replace (implicit non-negotiable)
  4. ✅ Omnichannel loyalty — Loyalty Management on Salesforce with real-time earn/redeem across Shopify + Square via MuleSoft (Reqs 6, 15, 29)
  5. ✅ 15-minute inventory sync — MuleSoft polling + stock-out events across 180 locations (Reqs 5, 26)
  6. ✅ Cross-channel service view — Service Cloud with complete order history from Shopify + Square + B2B (Reqs 2, 24-25)
  7. ✅ API-led integration — MuleSoft 3-layer architecture (experience / process / system) for 8 systems (Reqs 24-31)
  8. ✅ B2B launch within 10 months — Dedicated SI capacity + parallel workstream strategy (Reqs 43-44)
  9. ✅ Deployment freeze compliance — 4 seasonal freeze windows respected; release cadence planned around 12 weeks/year of blackout (Req 42)

Risk Assessment

RiskImpactProbMitigation
B2B launch misses 10-month contractual deadlineCriticalMedStaff 60% SI capacity on B2B; defer loyalty to Phase 1b if needed
35K peak orders/day overwhelm integration layerHighMedMuleSoft horizontal scaling; load test at 2x peak (70K/day); circuit breakers on all APIs
Customer identity resolution produces excessive duplicatesHighHighStart deterministic only; add probabilistic Phase 2; accept 5-10% initial unresolved rate
NetSuite inventory sync lag causes oversellingCriticalMedReserve 5% buffer stock for high-velocity SKUs; real-time stock check at checkout via API

Domain Scoring Notes

  • D4 Solution Architecture (HEAVY): Build-vs-buy discipline (keep Shopify/Square/NetSuite/Stripe/HubSpot, build only what Salesforce does best). System-of-record clarity — NetSuite for finance/inventory, Shopify for DTC orders, Salesforce for customer profile. Loyalty Management justification. B2B Commerce tied to timeline constraint.
  • D5 Integration (HEAVY): API-led connectivity (three MuleSoft layers). Pattern selection per data flow with justification. Error handling — dead-letter queues, retry policies, reconciliation, circuit breakers. Customer identity resolution across 6 identifiers. Inventory orchestration (180 locations, 15K movements/day, 15-min SLA).
  • D6 Dev Lifecycle (MED): 4 parallel workstreams need branching strategy. Deployment freezes around 4 seasonal sales events (~12 weeks/year of blackout). SI handoff plan.

Reporting Approach

Standard Salesforce reports cover wholesale pipeline (Req 36), service metrics (Req 38), and loyalty enrollment/tier reports (Req 39). The CRO unified revenue dashboard (Req 32) requires cross-system data — CRM Analytics is essential here, pulling order data from Shopify (via MuleSoft sync), Square POS, B2B Commerce, and NetSuite financial reconciliation into a single dataset. Marketing campaign attribution (Req 33) linking online conversions to in-store purchases within 7 days needs CRM Analytics recipes joining Salesforce campaign data with HubSpot engagement and Square POS transactions. Store manager daily reports (Req 34) and VP retail operations dashboards (Req 35) across 120 locations also benefit from CRM Analytics for cross-location rollups and performance rankings. Financial reconciliation (Req 37) against NetSuite GL is a nightly batch comparison via scheduled Apex.

What Would Fail

Common Mistakes

1. Recommending Commerce Cloud to replace Shopify. VP of Marketing said “this project is dead to me” if you rebuild DTC. Commerce Cloud adds 6-9 months risk, destroys 3 years of customizations, and solves nothing that integration cannot solve better.

2. Making Salesforce the system of record for inventory or finance. The CFO said “NetSuite is our financial source of truth. Period.” If your architecture creates a second set of financial books in Salesforce, you directly contradict a stated non-negotiable.

3. Skipping customer identity resolution. 20-30% of customers exist in multiple systems under different identifiers. Without a resolution strategy, your “unified customer profile” is a slide title, not an architecture.

Self-Scoring Checklist

  • Did I keep Shopify and justify why (not just assert it)?
  • Did I classify each integration by pattern, cadence, and justification?
  • Did I use API-led connectivity (three layers), not just “MuleSoft connects things”?
  • Did I address customer identity resolution with a matching strategy?
  • Did I account for 35K peak orders and deployment freeze windows?
  • Did I make NetSuite the SoR for inventory/finance (not Salesforce)?